/ Модель

Характеристики

Контекст
3 токена
Лицензия
CC BY-NC 4.0
Архитектура
dreammachine · dense
Библиотека
transformers
Опубликована
12 авг 2026

dream-machine-ai

Классификация текстаТекст → label3 профессии

Dream-Machine-08-09 — Transformer dual-tower для извлечения кандидатов и ранжирования товаров в рекомендательных системах.

45скачиваний за 30 дней0лайковвеса обновлены26 авг 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Dream-Machine-08-09 — рекомендательная модель DreamMachine Research Team, представленная как Transformer dual-tower с multi-hash embeddings. Она предназначена для извлечения кандидатов и ранжирования товаров в системах рекомендаций: в карточке описаны многоканальный recall, повторное ранжирование с оценками CTR, CVR и времени взаимодействия, а также сценарии работы с каталогами масштаба до миллиарда объектов. Репозиторий содержит веса в формате safetensors и компоненты Transformers; для загрузки пользовательских классов указано использование trust_remote_code.

В README приведены результаты на симулированных 1 000 товарах электронной коммерции: HR@10 — 1,0, NDCG@10 — 0,537, AUC — 0,4849. Эти результаты относятся к указанному тесту и сами по себе не подтверждают качество на реальном трафике. Модель принимает структурированные признаки объектов и пользователей и выдаёт представления для поиска и ранжирования; заявлены языки китайский и английский. Лицензия CC BY-NC 4.0 разрешает использование с некоммерческим ограничением.

Сценарии применения

  • поиск релевантных товаров для пользователя
  • извлечение кандидатов из крупного каталога товаров
  • ранжирование рекомендаций по вероятности клика
  • оценка вероятности покупки товара
  • персонализация рекомендаций для электронной коммерции

Ограничения

Метрики приведены для симулированного теста на 1 000 товарах и не показывают качество на реальном трафике; AUC в этом тесте составляет 0,4849. Лицензия CC BY-NC 4.0 ограничивает коммерческое использование.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

License: CC BY-NC 4.0 Space Dataset Python 3.9+ PyTorch 2.0+ Transformers Paper DOI GitHub

"Even a 4-year-old can understand why the Magic Shop knows exactly what toy you want next."

🌟 Space  ·  📄 Paper  ·  🚀 Quick Start  ·  📊 Benchmarks  ·  🏗️ Architecture  ·  ⚖️ Scaling Laws


✦ What Makes Dream-Machine-08-09 Different

  ╔══════════════════════════════════════════════════════════════════════╗
  ║  ✦ 10¹⁰-item scale  — Multi-Hash Embedding, zero ID explosion      ║
  ║  ✦ ≤ 100 ms P99      — RAG multi-channel recall + FAISS ANN        ║
  ║  ✦ One codebase      — laptop RTX 3060 → 250 × A100 cluster        ║
  ║  ✦ 7 novel contribs  — not a wrapper, a full research system       ║
  ║  ✦ Closed-form laws  — predict the right config before training    ║
  ╚══════════════════════════════════════════════════════════════════════╝

📊 Benchmarks

Evaluated on 1,000 simulated e-commerce items (JD / Taobao schema).
Numbers reflect the real checkpoint hf_model/model.safetensors.

MetricValueNotes
AUC0.48491 K items, cold-start
HR@101.0Perfect recall within top-10
NDCG@100.537Ranking quality at top-10
Latency (GPU forward)< 5 msItem tower + user tower
Serving latency (FastAPI)≤ 100 msEnd-to-end incl. FAISS ANN
Max item catalogue10¹⁰Via Multi-Hash, B = 100 M

📈 Scaling Laws — See Before You Train

Four closed-form scaling charts from the technical report.
Pick the right model config before writing a single training line.

Parameter Scaling Overview

Parameter Scaling Overview

Each curve = one scale tier (10² → 10¹⁰ items). x-axis: trainable parameters; y-axis: NDCG@10. Dashed lines mark the 9 recommended operating points.

Batch Size vs. Performance

Batch Size Scaling

Too-small batches → noisy InfoNCE gradients; too-large → wasted GPU memory. Sweet spot per tier marked ★.

Hash Bucket Size Scaling

Hash Bucket Size Scaling

ε_eff = (1 − e^{−N/2B})^K. Collision drops sharply as B grows; returns diminish past B ≈ 3×N. Optimal B/N ratio for K = 3 shown.

Dual-Parameter Scaling Surface

Dual Parameter Scaling

2-D surface over (d_model, L) pairs. Colour encodes NDCG@10. White ridge = Pareto frontier: max quality per parameter budget.


🏗️ Architecture

                         Input JSON
                              │
                    ┌─────────▼──────────┐
                    │  FeatureExtractor   │
                    │  (JD / Taobao fmt)  │
                    └──┬──────────────┬──┘
                       │              │
          ┌────────────▼────┐  ┌──────▼──────────────┐
          │   Item Tower    │  │     User Tower       │
          │                 │  │                      │
          │ hash_ids × 3    │  │ hash_ids × 3         │
          │ category_l1–l3  │  │ demographics         │
          │ brand_hash_ids  │  │ city / region hashes │
          │ numeric [29]    │  │ numeric [57]         │
          │                 │  │                      │
          │ L=2 Transformer │  │ L=2 Transformer      │
          │ H=8  d=128      │  │ H=8  d=128           │
          │ L2-normalised   │  │ L2-normalised        │
          └────────┬────────┘  └────────┬─────────────┘
                   │  v ∈ S^{d−1}       │  u ∈ S^{d−1}
                   └──────────┬─────────┘
                              │
                    s(u,i) = u·v / τ    (τ = 0.07)
                              │
                   ┌──────────▼──────────┐
                   │  FAISS HNSW Index   │
                   │  top-K ANN recall   │
                   └──────────▼──────────┘
                              │
                   ┌──────────▼──────────┐
                   │  Cross-Attention    │
                   │  Listwise Re-ranker │
                   └──────────▼──────────┘
                         Top-N results

Seven Original Contributions

#ContributionKey Formula / Mechanism
C1Multi-Hash Transformer Dual-Tower (MHTDT)ε_eff = (1 − e^{−N/2B})^K
C2Hierarchical Feature ArchitectureTyped token: ID → sparse → dense numeric
C3RAG-Enhanced Multi-Channel RecallFAISS IVF-PQ + CF + popularity + rules
C4Cross-Attention Listwise Re-rankerSimultaneous CTR / CVR / dwell-time
C5Uncertainty-Weighted InfoNCE Multi-TaskLearnable log-variance σ_k² per task
C6Closed-Form Parameter Scaling Laws9 breakpoints 10² → 10¹⁰ items
C7Production Serving StackFastAPI + ONNX + INT8 + A/B, ≤ 100 ms

🚀 Quick Start

Installation

pip install transformers torch numpy faiss-cpu

Load the Model

from transformers import AutoConfig, AutoModel

config = AutoConfig.from_pretrained(
    "dream-machine-ai/Dream-Machine-08-09",
    trust_remote_code=True,
)
model = AutoModel.from_pretrained(
    "dream-machine-ai/Dream-Machine-08-09",
    trust_remote_code=True,
).eval()

End-to-End Inference

import torch
from transformers import AutoModel, AutoFeatureExtractor

model = AutoModel.from_pretrained(
    "dream-machine-ai/Dream-Machine-08-09", trust_remote_code=True
).eval()
fe = AutoFeatureExtractor.from_pretrained(
    "dream-machine-ai/Dream-Machine-08-09", trust_remote_code=True
)

# ── Product dict (JD / Taobao schema) ────────────────────────────────
product = {
    "sku_id": "AJ-RETRO1-OG-BRED-2026",
    "category": {
        "level1_name": "运动", "level2_name": "鞋靴", "level3_name": "篮球鞋",
    },
    "brand": {"brand_name": "Nike"},
    "price": {"current_price": 1499, "original_price": 1999, "discount": 7.5},
    "sales": {"total_sales": 320000, "monthly_sales": 18000},
    "rating": {"overall": 4.95, "quality": 4.97},
    "rec_features": {"ctr_7d": 0.21, "cvr_7d": 0.09},
}

# ── User dict ─────────────────────────────────────────────────────────
user = {
    "user_id": "U001",
    "demographics": {"gender": "male", "age_group": "25-30", "income_level": "10000-20000"},
    "location": {"city": "北京", "city_tier": "一线"},
    "interests": {"interest_categories": ["数码科技", "运动健身"]},
}

# ── Extract features & score ──────────────────────────────────────────
item_feat = {k: v.unsqueeze(0) for k, v in fe.extract_item(product).items()}
user_feat = {k: v.unsqueeze(0) for k, v in fe.extract_user(user).items()}

with torch.no_grad():
    outputs = model(user_feat, item_feat)

print(f"Score  s(u,i) = {outputs.similarity.item():.4f}")
print(f"User   shape  = {outputs.user_vector.shape}")   # [1, 128]
print(f"Item   shape  = {outputs.item_vector.shape}")   # [1, 128]

Production: Separate Tower Inference

# Offline: build FAISS index with item embeddings
item_embedding = model.get_item_embedding(item_feat)   # [1, 128]

# Online: user query in real time (< 5 ms)
user_embedding = model.get_user_embedding(user_feat)   # [1, 128]

# Inner product == cosine similarity (L2-normalised)
score = (user_embedding * item_embedding).sum(dim=-1)

Tokenizer (Multi-Hash ID Mapping)

from transformers import AutoTokenizer

tok = AutoTokenizer.from_pretrained(
    "dream-machine-ai/Dream-Machine-08-09", trust_remote_code=True
)
result = tok(item_id="SKU12345678")
# → {"input_ids": tensor([[12345, 67890, 34567]])}

# Batch
result = tok(item_ids=["SKU001", "SKU002", "SKU003"])
# → {"input_ids": tensor([[...], [...], [...]])}

⚖️ Scaling Laws

Use DreamMachineConfig.from_scale_tier(n_items) to get the paper-optimal config — no manual tuning required.

from configuration_dreammachine import DreamMachineConfig

cfg_1m = DreamMachineConfig.from_scale_tier(1_000_000)
# → d=256, L=6, K=3, B=3_000_000

cfg_1b = DreamMachineConfig.from_scale_tier(1_000_000_000)
# → d=768, L=8, K=5, B=50_000_000
Scale (N items)d_modelLKB (buckets)Params
10²64235 K~38.6 M
10³ ← this model1282350 K~77.6 M
10⁶256633 M~9.2 B
10⁹7688550 M~768 B
10¹⁰768127100 M~10.2 T

🔧 Training Details

HyperparameterValue
Scale tierN = 10³ items
d_model128
Transformer layers L2
Attention heads H8
Hash tables K3
Hash buckets B50,000
Temperature τ0.07
Batch size32
Training steps2,000
Learning rate1e-4 (OneCycleLR)
Negative ratio ρ4
FP16 AMP✅
LossUncertainty-Weighted BCE + InfoNCE + Engagement MSE

🌟 Live Space

Experience the model live — no installation required:

Open in Space

huggingface.co/spaces/dream-machine-ai

The Space showcases end-to-end inference, scaling law charts, and the full deployment guide backed by this model.


📁 Repository Layout

paper_hf_model/
├── README.md                           ← This file (Model Card)
├── LICENSE                             ← CC BY-NC 4.0
├── config.json                         ← DreamMachineConfig  (auto_map)
├── tokenizer_config.json               ← DreamMachineTokenizer config
├── preprocessor_config.json            ← DreamMachineFeatureExtractor config
├── configuration_dreammachine.py       ← Config class       (trust_remote_code)
├── modeling_dreammachine.py            ← Model class        (trust_remote_code)
├── tokenization_dreammachine.py        ← Tokenizer class    (trust_remote_code)
├── feature_extraction_dreammachine.py  ← Feature extractor  (trust_remote_code)
├── charts/                             ← Scaling law figures (PNG)
│   ├── param_scaling_overview.png
│   ├── batch_size_scaling.png
│   ├── hash_bucket_size_scaling.png
│   └── dual_param_scaling.png
└── hf_model/
    ├── config.json                     ← Exported config
    ├── model.safetensors               ← Weights (safetensors)
    ├── legacy_config.json              ← Original checkpoint config
    └── README.md                       ← Weights card

📚 Citation

@techreport{wen2026dreammachine,
  title       = {Magic Shop at Scale: Dream-Machine --- A Billion-Item
                 Real-Time Neural Recommendation Sorcerer},
  author      = {Wen, Fangjun},
  year        = {2026},
  institution = {DreamMachine Research Team},
  doi         = {10.5281/zenodo.21906715},
  url         = {https://doi.org/10.5281/zenodo.21906715},
  note        = {Technical Report, August 2026. arXiv cs.IR / cs.LG}
}

⚖️ License

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).

✅ Permitted❌ Prohibited
Academic research & publicationCommercial products or services
Personal learning & experimentationRevenue-generating deployments
Non-commercial derivative worksSublicensing for profit
Citing in papers with attributionAny business use without written permission

Commercial use of any kind — including integrating model weights, code, or outputs into a product or service — requires explicit prior written consent from the author (Fangjun Wen).

License: CC BY-NC 4.0

See LICENSE for the full license text.


Paper: DreamMachine: A Billion-Item Neural Recommendation Sorcerer
Author: Fangjun Wen · DreamMachine Research Team · August 2026

// built with focus · DreamMachine Research

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers · text-classification

Нельзя запустить

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
DreamMachineModel
Ревизия весов
87a9067

0 моделей