/ Модель

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

Лицензия
Apache 2.0
Базовая модель
Qwen3-4B
Библиотека
speculators
Опубликована
2 ноя 2026

Qwen3-4B-speculator-perfectblend-b16.dspark

Генерация текстаТекст → текст3 профессии
165скачиваний за 30 дней0лайковвеса обновлены2 ноя 2026

Описание модели

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

Черновая модель DSpark для ускорения генерации Qwen/Qwen3-4B методом speculative decoding в vLLM.

MeganEFlynn/Qwen3-4B-speculator-perfectblend-b16.dspark — экспериментальная черновая модель DSpark для ускорения генерации с помощью speculative decoding. Она предназначена для совместной работы с основной моделью Qwen/Qwen3-4B в vLLM и библиотеке speculators; самостоятельно генерировать ответы не может. Модель предлагает до 16 токенов за итерацию, использует пять слоёв чернового трансформера, а веса сохранены в формате safetensors с точностью bfloat16.

Чекпойнт обучен для Qwen/Qwen3-4B на смеси из восьми наборов данных с диалогами, математическими задачами, кодом и инструкциями. В описанных тестах длина принятых черновых последовательностей различалась по категориям: модель показала более высокие значения на математических рассуждениях и HumanEval, чем на вопросах и ответах. Это ускоритель декодирования, а не самостоятельная модель для решения этих задач.

Для работы нужны совместимые версии vLLM и speculators, а также исходная модель Qwen/Qwen3-4B и её токенизатор. Эффективность зависит от запросов, оборудования и настроек обслуживания; результаты проверки на обучающих данных не гарантируют аналогичного ускорения на других темах. Лицензия репозитория — Apache-2.0; поведение и ограничения основной модели сохраняются.

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

  • ускорение генерации ответов Qwen/Qwen3-4B в vLLM
  • ускорение генерации кода при обслуживании Qwen/Qwen3-4B
  • ускорение ответов на математические запросы
  • проверка speculative decoding на смесях диалоговых и инструкционных данных

Ограничения

Не является самостоятельной языковой моделью и требует Qwen/Qwen3-4B, её токенизатора и совместимых версий vLLM и speculators. Принятие черновых токенов и ускорение зависят от запросов, оборудования и конфигурации; результаты могут отличаться на данных вне обучающей смеси.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

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

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

Открыть на Hugging Face

Qwen3-4B DSpark Speculator (Block Size 16, "PerfectBlend" 8-subset mix)

This repository contains a DSpark speculative decoding draft model trained for Qwen/Qwen3-4B. It proposes up to 16 tokens per decoding iteration and is intended for use with the vllm-project/speculators implementation and vLLM.

This is an experimental checkpoint from a data-ablation series. It was trained on an 8-file blend ("perfect blend") of the inference-optimization/Qwen3-8B-Regenerated-Collection dataset — everything in the 13-file collection except tulu3, magpie, nemotron_chat, nemotron_math, and nemotron_stem. The blend contains regenerated responses from MetaMathQA, UltraInteract, UltraChat, Orca-Math, UltraFeedback, evol-codealpaca, AutoIF, and lmsys-arena (~1.38M source rows, roughly 49% of the full mixture token count), for ~2.7 epochs, matching the compute budget of the tulu3-only run (252,775 vs 259,362 optimizer steps).

Model details

  • Architecture: DSpark draft model
  • Verifier: Qwen/Qwen3-4B
  • Speculative block size: 16
  • Draft transformer layers: 5
  • Verifier hidden-state layers: 1, 9, 17, 25, 33
  • Markov head: vanilla, rank 256
  • Confidence head: enabled with Markov features
  • Default proposal method: greedy
  • Precision: bfloat16
  • Draft vocabulary size: 151,936
  • Parameters file size: 1.23 GB

Training

The model was trained from the speculators repository at commit 1c800f2b053bcd538fc11bf49ec843d4dfa81a95 with vLLM 0.31.0.

  • Data: 8-file blend of Qwen3-8B-Regenerated-Collection — 1,382,562 source lines (1 row dropped from evol_codealpaca for an error-metadata field) → 1,382,556 prepared rows (~4.2B tokens, mean sequence length ~3,056)
    • metamathqa (394,996), ultrainteract (288,578), orca_math (200,034), ultrachat (207,863), evol_codealpaca (111,099), autoif (61,491), lmsys_arena (57,361), ultrafeedback (61,134)
  • Epochs: ~2.7 (capped by --max-steps) — 252,775 global steps
  • World size: 6
  • Sequence length: 8,192 (multipacked), max anchors 1,024
  • Optimizer: Muon (Muon LR 3e-3)
  • Learning rate: 6e-4
  • Weight decay: 0
  • Scheduler: cosine with 4% warmup
  • Seed: 42
  • Loss: 0.1 * CE + 0.9 * TV, fused implementation
  • Position weighting: fixed exponential decay, gamma 7.0
  • Wall time: ~2d 9h on 6× GPUs (plus render server on 2× GPUs)

The complete invocation is included in train_command.txt. Per-epoch validation metrics are archived in val_metrics_history/.

Final validation metrics (epoch 2, blend val split)

MetricValue
Loss0.3044
Acceptance rate0.6727
Acceptance length7.1007
Full accuracy0.6915

Note: the validation split is a random 10% of this run's own (blend) data, so these values are not comparable across runs trained on different subsets.

Speculator benchmark results

The checkpoint was evaluated with the speculator_benchmarks acceptance eval (9 subsets, temperature 0 and Qwen3-4B default sampling, maximum generation length 128, up to ~200-400 requests per category), serving with vllm serve Qwen/Qwen3-4B --spec-model <this checkpoint> --spec-tokens 16 --spec-method dspark.

Temperature 0 (greedy)

CategoryAcceptance length
HumanEval5.831
Math reasoning7.696
QA3.528
Question4.430
RAG4.669
Summarization3.665
Tool call4.100
Translation5.093
Writing4.454
Weighted overall4.610

Qwen3-4B default sampling (temp 0.6 / top_p 0.95 / top_k 20)

CategoryAcceptance length
HumanEval5.691
Math reasoning7.323
QA3.475
Question4.197
RAG4.509
Summarization3.646
Tool call4.061
Translation4.737
Writing4.331
Weighted overall4.487

The weighted overall is computed as 1 + total accepted speculative tokens / total draft iterations. Full per-position results: acceptance_temp0.csv, acceptance_defaulttemp.csv.

Comparison within the data-ablation series

All three runs share the same recipe (block 16, Muon 3e-3, CE+TV 0.1/0.9, cosine, seed 42, 6 ranks) and approximately the same compute budget (228k–259k optimizer steps); only the data mixture differs.

RunDataStepsTemp 0Default sampling
full-mix b16all 13 files, 1 epoch228,1354.6894.594
perfectblend b16 (this)8-file blend, ~2.7 epochs252,7754.6104.487
tulu3 b16tulu3 only, 4 epochs259,3614.6114.501

The 8-file blend and the tulu3-only subset tie within noise at temp 0 (4.610 vs 4.611); neither approaches the full mixture (+1.7%). Per-subset results do track the training mix: perfectblend is the best of the three on HumanEval (5.83, code-heavy evol_codealpaca in the mix) and strong on math reasoning (7.70, metamathqa + orca_math ≈ 595k rows), while tulu3 leads on qa/question/rag.

Usage

Use this repository as the speculative model for Qwen/Qwen3-4B through a version of vLLM and speculators that supports DSpark (speculators 0.10.0a0, vLLM 0.31.0). The verifier model and tokenizer must remain Qwen/Qwen3-4B, and the configured speculative-token count is 16:

vllm serve Qwen/Qwen3-4B \
  --spec-model MeganEFlynn/Qwen3-4B-speculator-perfectblend-b16.dspark \
  --spec-tokens 16 --spec-method dspark

Limitations

  • This is a research checkpoint for speculative decoding, not a standalone language model.
  • It inherits the behavior, limitations, and license considerations of the verifier model.
  • Acceptance and speedup depend on prompts, hardware, batch size, vLLM version, and serving configuration.
  • Trained on an 8-subset blend; acceptance on out-of-distribution domains may differ from the benchmark results above.

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

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

GPU в ailist

Универсальный рантайм · speculators

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

Модели нужен код из репозитория; запуск откроется после проверки совместимости.

Класс архитектуры
DSparkDraftModel
Ревизия весов
a3a5b35

0 моделей