/ Модель

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

Контекст
262 144 токена
Параметры
2,9 млрд
Лицензия
Apache 2.0
Архитектура
qwen3 · dense
Базовая модель
Qwen3.8-27B-DFlash2
Опубликована
21 авг 2026

Qwen3.8-27B-Kearuga-DFlash2

Генерация текстаТекст → текст3 профессии

Черновая модель DFlash2 для ускорения спекулятивной генерации целевой Qwen3.8-27B в совместимом сервере SGLang.

1 347скачиваний за 30 дней1лайквеса обновлены24 сен 2026

Бенчмарки

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

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

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

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

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

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

0xWhiteMage разработал черновую модель Qwen3.8-27B-Kearuga-DFlash2 для ускорения генерации целевой модели Qwen3.8-27B методом спекулятивного декодирования. Это плотная архитектура семейства Qwen3 с классом DFlash2DraftModel; несмотря на обозначение 27B в названии, в метаданных указано 2,9 млрд параметров. Модель дообучена на выходах Kearuga и откалибрована по активациям целевой модели. Она принимает текст и предлагает черновые продолжения, которые целевая модель проверяет при генерации. Указаны контекст 262 144 токена и поддержка английского и китайского языков.

Модель предназначена для совместной работы с Qwen3.8-27B в SGLang. По замерам автора на NVIDIA DGX Spark с Blackwell NVFP4-вариант был в 2,5 раза компактнее BF16-черновика и обеспечивал прирост скорости генерации; точные результаты зависят от оборудования и конфигурации. Черновик настроен на Kearuga: совместимость с другими вариантами Qwen3.8-27B архитектурно возможна, но не проверена. Для NVFP4 требуется GPU NVIDIA Blackwell и поддержка modelopt_fp4 в SGLang. Наблюдаются расхождения продолжений при близких значениях вероятностей, хотя целевую модель при проверке токенов не меняют. Лицензия — Apache-2.0.

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

  • ускорение генерации текста с Qwen3.8-27B через спекулятивное декодирование
  • ускорение ответов чат-модели на английском языке
  • ускорение генерации кода целевой моделью Kearuga
  • ускорение математических ответов целевой моделью Kearuga
  • ускорение генерации вызовов инструментов целевой моделью

Ограничения

Модель настроена на активации Kearuga; её приём черновых токенов другими целевыми моделями не проверен. NVFP4-ускорение требует GPU NVIDIA Blackwell и сборки SGLang с поддержкой modelopt_fp4; при близких значениях вероятностей возможны отличия продолжений.

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

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

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

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

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

Открыть на Hugging Face

🧙‍♂️⚡ Qwen3.8-27B-Kearuga-DFlash2

Kearuga's own DFlash 2 speculative drafter for 0xWhiteMage/Qwen3.8-27B-Kearuga — distilled on Kearuga's own outputs, quantized to NVFP4 (W4A4, ModelOpt layout) with activation scales calibrated on Kearuga's features, and served with a frequency-pruned 64K draft head.


⚡ Overview

On a single NVIDIA DGX Spark (GB10 / Grace-Blackwell, SM121), evaluated against the same Kearuga target served with the stock BF16 z-lab/Qwen3.8-27B-DFlash2 drafter at K = 10, this drafter delivers — paired, in one window, on one clock:

Serving ConfigurationSingle Stream (C1) Aggregate4 Concurrent Streams (C4) AggregateDomains Better (C1 + C4)
Stock BF16 drafter, K = 10 (baseline)30.85 tok/s98.31 tok/s—
This drafter, K = 12, plain SGLang33.30 tok/s (+7.9 %)102.57 tok/s (+4.3 %)10 / 10
This drafter, K = 12, + 64K draft-head map (overlay)35.33 tok/s (+14.5 %)108.90 tok/s (+10.8 %)10 / 10
  • 🎯 Lossless up to floating-point numerics: The target verifies every drafted token with its own untouched BF16 lm_head; a drafter can only change speed, not what the target outputs — up to bf16 rounding. Measured (2026-09-23, 40 prompts × 256 greedy tokens, thinking off): continuations from the speculative server and from the same target served without speculation diverge on 28/40 prompts, every first divergence at a top-2 logprob margin ≤ 0.25 (a bf16 near-tie); two runs of the speculative server itself diverge on 6/40 with the same margins — no divergence at a decided position. Fidelity-40 against the BF16 base is identical to the target served alone (mean KL 0.0165, JS 0.0034, top-1 agreement 40/40).
  • 🗜️ 2.5× Smaller Footprint: 1.55 GB NVFP4 vs 3.85 GB BF16 — because the decode cycle on a GB10 is memory-bandwidth-bound, every byte eliminated from the weight stream directly saves execution time.
  • 🏎️ Per-Domain Net Decode Speed (C1 Medians, 20 requests): Code 46.3 → 57.6 tok/s, Math 51.2 → 62.2 tok/s, Tool calls 80.8 → 114.6 tok/s, Prose 19.4 → 21.6 tok/s, Instruction-following 19.9 → 21.8 tok/s.
  • 🛡️ Quality-200 Objective Gate: Passes 155 / 180 on the frozen Quality-200 suite (GSM8K 67/80 · HumanEval 38/40 · IFEval 34/40 · agentic coding 16/20), safely inside the pre-registered 154–160 band. (The target alone scores 157; all five candidate drafters landed in 154–159, reflecting the suite's near-tie noise floor rather than a drafter degradation).

[!NOTE] The absolute performance figures are measured on a GB10 with the target's full 262K context enabled and the owner's 2400 MHz SM clock lock active. Re-measuring with the lock lifted showed identical results (the GB10 natively executes this decode loop at 2.40–2.48 GHz; it is memory-bandwidth-bound, not compute-bound). These figures are not comparable to RTX 5090 / B200 setups — the GB10's 273 GB/s unified memory defines the physical ceiling, and this drafter maximizes bandwidth efficiency toward that ceiling.


📊 Paired Empirical Benchmark (Bake-Off, 2026-09-17)

All candidate configurations were evaluated in a single maintenance window, booted back-to-back on the exact same container image, target weights, flags, and hardware clock.

  • Battery: 50 prompts (10 prompts × 5 domains) × 2 runs.
  • Sampling: temperature 0 (greedy), thinking disabled, domain-calibrated max_tokens (code 700, math 600, etc.).
  • Metric Definition: "Net decode tok/s" = (completion_tokens − 1) / (t_last_token − t_first_token) per request (TTFT excluded). Paired per-prompt deltas evaluated with bootstrap 95% confidence intervals.

1. Per-Domain Breakdown: This Drafter (K = 12, 64K Map) vs. Stock BF16 Baseline (K = 10)

CellDomainBaseline Med. tok/sThis Drafter Med. tok/sPaired Δ95% CI of Paired Diff (tok/s)Verdict
C1Code46.2757.62+23.1 %[+9.52, +12.02]better
C1Math51.2162.18+24.2 %[+8.22, +13.21]better
C1Tool Calls80.82114.63+26.2 %[+15.89, +31.97]better
C1Prose19.4521.64+10.8 %[+1.49, +2.91]better
C1Instruction-Following (IFEval)19.8721.80+9.4 %[+0.85, +2.39]better
C4Code38.8445.65+16.1 %[+5.23, +6.70]better
C4Math41.1747.33+13.0 %[+4.41, +7.82]better
C4Tool Calls49.0269.25+31.5 %[+9.76, +35.16]better
C4Prose16.0717.22+8.6 %[+0.95, +2.05]better
C4Instruction-Following15.4217.68+11.0 %[+0.61, +2.11]better
  • TTFT Impact: Median TTFT at C1 improved from 0.28–0.30 s down to 0.27–0.28 s (tool prompts accelerated from 0.78 s down to 0.62 s), as the first decode cycle executes a cheaper draft step.

2. Candidate Rankings (Pre-Registered Expected Value Rule)

Candidates were evaluated under the pre-registered ranking criterion: $$\text{EV} = 0.8 \cdot \sum w_d \cdot \Delta C1_d + 0.2 \cdot \sum w_d \cdot \Delta C4_d$$

  • Workload Weights ($w_d$): Code: 0.30 · Tool: 0.20 · Math: 0.10 · Prose: 0.25 · Instruction-Following: 0.15 (frozen pre-bakeoff).
  • Quality Gates: Fidelity-40 top-1 40/40, mean KL ≤ 0.0170, no C1 domain regression vs baseline, C4 aggregate ≥ −1%.
RankCandidate ConfigurationEVC1 AggregateC4 AggregateGates
🥇 1This Drafter (K = 12, 64K Draft-Head Map)+18.20+14.5 %+10.8 %pass
🥈 2Spec-AUF Fine-Tune of Stock Drafter, Kearuga-Calibrated NVFP4, K = 12+14.11+8.9 %+5.0 %pass
🥉 3This Drafter (K = 12, Plain SGLang, No Overlay)+11.22+7.9 %+4.3 %pass
4maurienne-ai/Qwen3.8-27B-DFlash2-NVFP4-RTNcal, K = 10+7.10+7.2 %+6.2 %pass
5Stock Drafter Weights, Kearuga-Calibrated NVFP4, K = 10+6.84+6.9 %+5.1 %pass
—Stock BF16 z-lab/Qwen3.8-27B-DFlash2, K = 100 (baseline)30.85 tok/s98.31 tok/sbaseline

3. Exact Speculative Acceptance

Measured per request from the server's internal verify-call counter: $\frac{\text{completion_tokens} - 1}{\text{verify_calls}}$ (greedy, thinking off, K = 12, without draft-head map, $n = 5$ per domain):

DomainExact Acceptance (Tokens Committed / Cycle, incl. Bonus)
Code6.94 tokens
Math6.96 tokens
Tool Calls9.87 tokens
Prose2.54 tokens
Instruction-Following2.36 tokens

Sampling and thinking-on (production resident: this drafter, K = 12, with the 64K draft-head map; 2026-09-17; $n = 2$ prompts per domain, sequential, verified free of concurrent traffic):

DomainGreedy, thinking offModel-default sampling (T 1.0 · top-p 0.95 · top-k 20), thinking offModel-default sampling, thinking on
Code7.546.473.11 (reasoning trace fills the 700-token budget)
Math7.687.376.18
Tool Calls10.539.70—
Prose2.502.453.62
Instruction-Following2.412.32—
  • Sampling costs little acceptance: −0.1 to −1.1 tokens/cycle vs greedy (prose unchanged at ≈ 2.5). The speculative-sampling verify path is exact, so sampled outputs remain the target's own distribution.

  • Thinking-on is the real cost: with reasoning enabled, code acceptance falls from 7.5 to 3.1 tokens/cycle — the reasoning trace behaves like prose — so a thinking-on code request decodes at roughly prose speed (≈ 27 tok/s incl. TTFT on this probe vs ≈ 56–65 thinking off). This is the drafter's largest remaining headroom.

  • Thinking on, paired vs the stock drafter (2026-09-22; same 50-prompt battery × 2 runs, reasoning_effort=xhigh, model-default sampling, every cell booted with --disable-flashinfer-autotune): this drafter 32.90 tok/s C1 / 102.33 C4 vs stock K = 10 30.61 / 94.00 (−7.0 % / −8.1 %) and stock K = 12 29.61 / 93.96 (−10.0 % / −8.2 %) — faster in all five domains (code 34.6 vs 31.9, math 49.3 vs 43.0, tool 75.2 vs 53.3, prose 23.6 vs 21.9, IFEval 37.8 vs 34.5 tok/s). Thinking-on acceptance at K = 12: code 3.15 · math 5.68 · tool 7.14 · prose 2.50 · IFEval 3.79 tokens/cycle (stock K = 12 accepts up to 0.5 more per cycle on four domains but its cycle costs more). Fidelity-40 40/40 in every cell.

  • Reasoning effort matters more than the drafter for thinking-mode latency: the Kearuga chat template — like Qwen3.8's — defaults to reasoning_effort=xhigh. On the live resident (thinking on, model-default sampling, 2 prompts per domain, 4,096-token cap) both code prompts at xhigh spent the whole budget reasoning and never answered (135 s, 3.47 accepted/cycle), while medium answered in ≈ 90 s (5.05 accepted/cycle); on math medium cut wall time 53.7 → 20.4 s with acceptance 6.27 → 7.56. Recommendation for coding and agent clients: send chat_template_kwargs: {"reasoning_effort": "medium"} per request. (Full table in the serving repo README §1.)

  • Impact of the 64K Draft-Head Map: Tokens outside the hot set represent only 0.44% of Kearuga's output tokens. In the paired bake-off table above, gauge-based acceptance deltas vs. the stock drafter stay within $\pm 0.1$ tokens on code, math, prose, and instruction-following at C1 (speed on tool calls increases +26% / +31%).

4. Fidelity-40 Verification (vs. Native Unquantized BF16)

MetricTarget + Stock BF16 DrafterTarget + This Drafter
Mean KL Divergence (top-20 union)0.01650.0165
Mean Jensen-Shannon Divergence (JS)0.00340.0034
Top-1 Argmax Token Agreement40 / 4040 / 40 (100%)
Greedy 32-Token Continuations Byte-Identical to BF1620 / 4018 / 40 (bake-off boot) · 22 / 40 (production boot)
  • The target verifies every drafted proposal with its own untouched lm_head; the first-token distribution is mathematically independent of the drafter.
  • Continuation identity shifts by $\pm 2\text{--}3$ tokens across boots or drafter profiles purely due to near-tie logits verified in different order; a single drafter reproduces its continuations 40/40 deterministically across reboots.

5. Against No Speculation (2026-09-23)

The same target, image and flags with every --speculative-* flag removed (single tenant, thinking off, temperature 0, the serving repo's 50-prompt battery):

ConfigurationC1 aggregateC4 aggregateC1 medians: code · math · tool calls · prose · IFEval
Kearuga target, no drafter10.30 tok/s39.56 tok/s10.4 · 10.4 · 12.7 · 10.4 · 10.5
Kearuga target + this drafter (K = 12, 64K head, FP8 draft KV; paired-sweep cell)35.66 tok/s (3.46×)108.83 tok/s (2.75×)58.2 · 62.4 · 107.6 · 22.0 · 22.0 (5.6× · 6.0× · 8.5× · 2.1× · 2.1×)

Without a drafter the GB10 decodes this 24.85 GB target at a flat ≈ 10.3 tok/s per stream (weight-streaming bound). The drafter also costs KV capacity: without it the pool hits the 4 × 262,144-token cap with 21 GB unallocated; with it, 932,355 tokens. Method and raw numbers: serving stack v0.6.7, README §1.


🛠️ Build Methodology & Architecture

The drafter was developed across three dedicated optimization stages to maximize speculative decoding speed and minimize unified memory bus traffic on Grace-Blackwell GB10 hardware:

Optimization StagePrimary ObjectiveBaseline / InputTechnical MethodologyHardware & Serving Impact
Stage 1: DistillationOn-Target Distillationz-lab/Qwen3.8-27B-DFlash2 (81 tensors)24,644 greedy Kearuga conversations (8 domains, 80% think-off / 20% think-on), 205 FP8 activation hooks, block-diffusion CE ($\tau=7$) + $0.3 \times \text{selector CE}$Unlocks K=12 technical acceptance: Code +7.4%, Math +6.6%, Tools +10.7% (+0.5 to +0.8 tok/cycle)
Stage 2: Calibrated NVFP4Calibrated Quantization3.85 GB native BF16 drafter weightsModelOpt NVFP4 (E2M1, group 16, FP8 group scales) on 35 linear layers; forward pre-hook activation calibration over 100 multi-domain conversations (a stratified subsample of the 400-conversation Kearuga teacher set: 8 domains, 50% thinking-on); selector and conv kept in BF162.5× weight compression (3.85 GB → 1.55 GB); Kearuga-calibrated activation scales avoid the ~13% acceptance loss reported for uncalibrated RTN
Stage 3: 64K Draft HeadSub-Vocabulary AccelerationFull 248,320 × 5,120 BF16 target lm_head (2.54 GB)FR-Spec frequency census (14.74M tokens / 20K responses) + 114 fusion tokens = 65,650 rows (an even row count — an odd count sent cuBLAS to a 3× slower unaligned kernel); SGLang 5-file read-only overlayReplaces the 2.54 GB read with a 0.67 GB hot head; tool-call speedup +26.2% C1 / +31.5% C4

🎯 Stage 1 Technical Specifications: Distillation on Kearuga Outputs ("Run 2")

DimensionSpecificationImplementation Detail
Base Weightsz-lab/Qwen3.8-27B-DFlash2Revision 50307d4c (5-layer block diffusion, taps [5, 19, 33, 47, 61], selector rank 256 / top-k 16). Architecture unchanged; all 81 stock tensors exported.
Teacher CorpusKearuga On-Policy Generations24,644 conversations generated greedily by the Kearuga target (19,734 new rows, 80% thinking-off / 20% thinking-on, + 4,910 rows from run 1) across 8 domains (agentic, tool calls, code, math, prose, chat, IF, multilingual).
Target FeaturesQuantized Activation HooksBF16 twin of Kearuga equipped with 205 FP8 activation hooks, ensuring training aligns with the exact hidden states emitted by the served quantized target.
Objective & OptimizationBlock-Diffusion CE + SelectorTeacher-forced block diffusion (block size 16, 512 random anchors/seq, static position decay $\tau=7$) + $0.3 \times \text{selector CE}$. AdamW $1\text{e-}4$, 4% warmup, cosine decay, 6,161 steps (1 epoch, 43.2h on GB10).
Served EffectVerified SpeedupRun-2 weights unlock high acceptance at K = 12: Code +7.4%, Math +6.6%, Tool +10.7% (acceptance +0.5 to +0.8 tokens/cycle higher on technical domains).

🗜️ Stage 2 Technical Specifications: NVFP4 Weights & Activation Calibration

DimensionSpecificationImplementation Detail
Quantization FormatModelOpt NVFP4E2M1 weights, block size 16, FP8-E4M3 group scales, per-tensor FP32 global scale $\frac{\text{amax}}{6 \times 448}$. Fused shards share scale factors (q/k/v; gate/up). RTN rounding.
Quantized Scope35 Linears (186 Tensors)Candidate selector (candidate_selector.hidden_projection), feature fusion fc, and 10 conv kernel_projection modules remain in native BF16 (hf_quant_config.json).
Activation CalibrationKearuga Forward Pre-HooksForward pre-hooks on 35 linear layers during reference draft $\to$ verify loops across 100 multi-domain conversations from teacher data (stratified subsample of the 400-conversation set: 8 domains, 50% thinking-on; 29,686 verified draft tokens). Loaded via --speculative-draft-model-quantization modelopt_fp4.
Format SelectionBandwidth CeilingCommunity benchmarks and empirical sweeps show decode speed flattens past FP4 (41.3 BF16 $\to$ 43.8 FP8 $\to$ 44.6 FP4 tok/s). Drafter represents 1.55 GB of a ~25 GB weight stream.

⚡ Stage 3 Technical Specifications: 64K Draft Head (draft-vocab-v4-top65650.pt + SGLang Overlay)

DimensionSpecificationImplementation Detail
Architectural ConceptFR-Spec Sub-Vocabulary DraftingDraft over a frequency-ranked subset of tokens; verify over full vocabulary (output distribution is unchanged). Eliminates reading the target's full 248,320 × 5120 BF16 lm_head (2.54 GB/cycle).
Frequency Census14.74M Kearuga Output TokensAnalyzed across 20,000 responses with tool calls re-rendered through chat templates to surface <function=...> / <parameter=...>. 99,804 vocabulary IDs ever occur; top 65,536 IDs cover 99.56% of emissions.
cuBLAS Alignment65,650 Rows (Even)Adds 114 =identifier fusion tokens to the 65,536 hot rows = 65,650, an even row count. An odd row count (a 98,369-row map) sent cuBLAS to an unaligned kernel $3\times$ slower; new maps are now padded to a multiple of 8.
Runtime OverlaySGLang Spec-v2 Integration5 read-only overlay files (sglang-overlay/) route candidate drafting through the 65,650 hot rows (0.67 GB) and remap top-k indices to global IDs. Target verify head remains 100% untouched.

🔬 Empirical Ablations: What Did Not Work

To save future researchers and engineers redundant exploration, the following approaches were evaluated and rejected based on empirical performance:

Exploration / StrategyEmpirical ResultRoot Cause Analysis
Alternative Training LossesNeutral served acceptanceObjectives like Spec-AUF, D-PACE, and dual static decay improved offline loss but yielded 2.5–2.7 tokens/cycle on served prose. Kearuga is within KL 0.0165 of stock BF16, leaving little target-mismatch headroom.
Extended Draft Length ($K = 14, 16$)Neutral C1 / −2% to −6% C4Additional draft latency degrades multi-stream verification throughput without improving acceptance.
Draft Window ($1024 / 4096$)$\pm 0.2%$ throughput deltaNegligible impact on execution time.
FP8 Draft KV (--speculative-draft-kv-cache-dtype fp8_e4m3)+13.6 % KV pool for −1.1 % C1 / −1.3 % C4 (2026-09-22, paired)A capacity knob, not a speed one: drafter KV 8.45 + 8.45 GB → 4.80 + 4.80 GB; mean KL unchanged, 2 of 40 greedy continuations differ. Adopted as the kearuga-profile default in serving stack v0.6.6 (production pool 818,294 → 932,355 tokens, +13.9 %).
NVFP4 for the remaining BF16 linears (fc + 10 conv kernel_projection)+0.58 % C1 / −1.10 % C4 (2026-09-22, paired)Kearuga-calibrated export (1.27 GB vs 1.55 GB) with fidelity unchanged; ≈ 1 ms of a ≈ 113 ms cycle at M = 12, below the pre-registered +1 % ship gate. They stay BF16 in this release.
Aggressive Pruning (32K Vocabulary)Negative net throughputAcceptance degradation outweighed the memory bandwidth savings of a smaller draft head.
FP8 Quantized Draft Head−18% throughput lossCaused SGLang to diverge from the high-throughput native cuBLAS GEMM path.
Hardware Roofline Limit98.7% GPU utilizationProfiling confirms the GB10 streams ~25 GB weights/cycle at ~76% peak memory bandwidth. The remaining bottleneck is the target model's 2.54 GB BF16 lm_head (9% of cycle), requiring target-side optimization.

🚀 Serving & Deployment Guide

Validated on pinned Docker container lmsysorg/sglang@sha256:616a3e97f45191af975896cfa644279096cb31bd408a071c2e99ca7209c3cafe, NVIDIA Driver 580, Tensor Parallelism tp = 1.

1. One-Command Launch (Serving Repository)

The simplest deployment method is using the turnkey launcher from the GitHub serving repo:

git clone https://github.com/0xWhiteMage/Qwen3.8-27B-Kearuga-SGLang-DGX-Spark-DFlash2
cd Qwen3.8-27B-Kearuga-SGLang-DGX-Spark-DFlash2
cp .env.sample .env
./start-dflash2.sh
  • Automatically verifies hashes against drafter/SHA256SUMS and launches with K=12 and the 64K draft head overlay.
  • To run the baseline profile instead, set DRAFTER_PROFILE=stock in .env.

2. Standalone Docker Deployment Options

Option A: Plain SGLang (+7.9% C1 / +4.3% C4, Zero Code Modifications)

docker run --gpus all --shm-size 32g --ulimit memlock=-1:-1 --cap-add IPC_LOCK -p 8888:8888 \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  lmsysorg/sglang@sha256:616a3e97f45191af975896cfa644279096cb31bd408a071c2e99ca7209c3cafe \
  python3 -m sglang.launch_server \
    --model-path 0xWhiteMage/Qwen3.8-27B-Kearuga \
    --served-model-name "Qwen3.8 27B Kearuga" --trust-remote-code \
    --speculative-algorithm DFLASH \
    --speculative-draft-model-path 0xWhiteMage/Qwen3.8-27B-Kearuga-DFlash2 \
    --speculative-draft-model-quantization modelopt_fp4 \
    --speculative-num-draft-tokens 12 \
    --speculative-draft-window-size 2048 \
    --attention-backend flashinfer \
    --kv-cache-dtype bf16 --mamba-ssm-dtype bfloat16 \
    --context-length 262144 --max-running-requests 4 --max-total-tokens 1048576 \
    --mem-fraction-static 0.85 \
    --host 0.0.0.0 --port 8888

Option B: With 64K Draft-Head Map & Overlay (+14.5% C1 / +10.8% C4)

Mount the 5 read-only overlay files over the container's sglang directory and provide the precomputed token map:

REPO=/path/to/Qwen3.8-27B-Kearuga-DFlash2      # Local clone of this model repository
OV=$REPO/sglang-overlay
docker run --gpus all --shm-size 32g --ulimit memlock=-1:-1 --cap-add IPC_LOCK -p 8888:8888 \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  -v $REPO:$REPO:ro \
  -v $OV/sglang/srt/models/dflash.py:/sgl-workspace/sglang/python/sglang/srt/models/dflash.py:ro \
  -v $OV/sglang/srt/speculative/dflash_worker_v2.py:/sgl-workspace/sglang/python/sglang/srt/speculative/dflash_worker_v2.py:ro \
  -v $OV/sglang/srt/speculative/dflash_utils.py:/sgl-workspace/sglang/python/sglang/srt/speculative/dflash_utils.py:ro \
  -v $OV/sglang/srt/speculative/dflash_head_utils.py:/sgl-workspace/sglang/python/sglang/srt/speculative/dflash_head_utils.py:ro \
  -v $OV/sglang/srt/server_args.py:/sgl-workspace/sglang/python/sglang/srt/server_args.py:ro \
  lmsysorg/sglang@sha256:616a3e97f45191af975896cfa644279096cb31bd408a071c2e99ca7209c3cafe \
  python3 -m sglang.launch_server \
    --model-path 0xWhiteMage/Qwen3.8-27B-Kearuga \
    --served-model-name "Qwen3.8 27B Kearuga" --trust-remote-code \
    --speculative-algorithm DFLASH \
    --speculative-draft-model-path $REPO \
    --speculative-draft-model-quantization modelopt_fp4 \
    --speculative-num-draft-tokens 12 \
    --speculative-draft-window-size 2048 \
    --speculative-dflash-token-map $REPO/draft-vocab-v4-top65650.pt \
    --attention-backend flashinfer \
    --kv-cache-dtype bf16 --mamba-ssm-dtype bfloat16 \
    --context-length 262144 --max-running-requests 4 --max-total-tokens 1048576 \
    --mem-fraction-static 0.85 \
    --host 0.0.0.0 --port 8888
  • Startup Verification: Successful initialization prints confirmation in logs:
    [kearuga-drafthead] loaded hot token map: rows=65650 …
    [kearuga-drafthead] draft head rows=65650 dtype=torch.bfloat16 bytes=672256000 fp8=False hot_map=True
    

3. Recommended Draft Block Size ($K$)

Typical Concurrency / WorkloadRecommended --speculative-num-draft-tokensOperational Rationale
1–2 Concurrent Streams (Code / Agentic / Math)12 (Default)Verification is memory-bandwidth-bound at low batch size: additional draft tokens have minimal latency penalty while acceptance reaches 7–10 tokens/cycle.
4 Concurrent Streams (Prose / General Chat)10At C4, K = 12 gives back ~1% on prose/IFEval without the overlay. With the 64K overlay active, K = 12 consistently outperforms stock BF16 K = 10 across all domains.
≥ 8 Saturated Streams6–8Not measured on this hardware envelope (capped at 4 seats). DFlash acceptance tapers with large batch sizes, making smaller K optimal.

📦 Model Files & Assets

File NameFile SizeSHA-256 ChecksumDescription & Scope
Release—v1.0 · 2026-09-17Drafter v1.0 = model.safetensors 9a39463f… + draft-vocab-v4-top65650.pt cadaee01… + sglang-overlay/ (hashes in MANIFEST.json); files revision 4a109695; served by serving stack v0.6.7 (v0.6.4 → v0.6.7 changed measurements, docs and the drafter-KV dtype default only)
model.safetensors1.55 GB9a39463f…49da92186 tensors: 35 NVFP4 packed weights + FP8 block scales + FP32 global/input scales; selector, fc, and conv projections in native BF16
config.json2.6 KB9004fc02…9ca60c2Hyperparameters: DFlash2DraftModel, dflash_config (block 16, taps [5,19,33,47,61], selector rank 256 / top-k 16), quantization_config
hf_quant_config.json771 B1f611db1…16d3dff20ModelOpt NVFP4 quantization descriptor (group size 16, module exclusion rules)
quantize_manifest.json20 KB—Detailed module-by-module scales (amax, weight_scale_2, input_scale), fusion groups, and source checkpoint commit hash
draft-vocab-v4-top65650.pt527 KBcadaee01…8e16bebcPyTorch 1D int64 tensor containing 65,650 hot token IDs for --speculative-dflash-token-map
draft-vocab-v4-top65650.json——Equivalent 65,650 hot token IDs exported as a portable JSON array
sglang-overlay/—MANIFEST.json5 SGLang runtime files (4 patched + 1 new), PATCH.diff, and verification checksums for the pinned Docker image
SHA256SUMS——Canonical SHA-256 checksums for all repository files and assets

Note: Speculative drafters do not package a tokenizer; SGLang automatically leverages the target model's tokenizer.


⚠️ Operational Notes & Limitations

  • 🎯 Tuned for Kearuga: Distilled and calibrated specifically on Kearuga's activations. While architecturally compatible with other Qwen3.8-27B variants, acceptance on third-party targets has not been benchmarked.
  • 🖥️ Hardware Prerequisite: NVFP4 Tensor Core acceleration requires an NVIDIA Blackwell architecture GPU (e.g., GB10 / SM121) and SGLang with modelopt_fp4 support. Validated on tp = 1.
  • 🎲 Greedy vs. Sampling: The paired bake-off statistics are greedy (temperature 0). Model-default sampling (T 1.0 · top-p 0.95 · top-k 20) was measured on the production resident at −0.1 to −1.1 tokens/cycle vs greedy (table in §3, $n = 2$ per domain); thinking-on code drops to ≈ 3.1 tokens/cycle. Neither has been through the full 50-prompt paired battery.
  • 🔀 Near-Tie Continuation Divergence: Greedy continuations differ slightly from the stock drafter at near-tie logits (18/40 vs. 20/40 identical 32-token sequences vs. BF16). The target's underlying output distribution remains identical.
  • 🧪 Offline evaluation caveat: the HF/z-lab reference DFlash loop is not lossless on this Gated-DeltaNet hybrid — transformers' Cache.crop leaves rejected drafts in the recurrent state (huggingface/transformers#49036, z-lab/dflash#172) and inflates offline acceptance (1.9× in our 100-prompt diagnostic). Measure acceptance on SGLang, or snapshot and restore the recurrent states around each verify block.
  • 🔒 Digest-Pinned Overlay: The optional 64K overlay is verified against image lmsysorg/sglang@sha256:616a3e97…. Confirm base hashes via sglang-overlay/MANIFEST.json before applying to other builds.
  • 📈 Benchmark Context: Performance was measured from a 50-prompt battery on one DGX Spark (GPU clock lock on or off made no measurable difference as the decode loop is memory-bandwidth bound); user prompts, sequence lengths, and cache states will vary.

🔗 Related Resources


🤝 Acknowledgements & Community Credits

This model builds upon key contributions across the open-source community:

Architecture, Base Weights & Benchmarks

Drafter Quantization Research

Drafter Training & Adaptive-K Methods

  • DaoCloud: For the 1.95B-token speculative training corpus and SpecForge training methodology.
  • alphakek: For insights on target-distance and drafter adaptation on specialized models.
  • mrchuy: For bootstrapping drafter research.
  • AEON-7: For dynamic batch-aware K tapering architectures.
  • sxuff: For GB10 hardware profiling and FP4 drafter acceleration proofs.

Foundational Research Papers


📜 Citation

@misc{kearuga-dflash2-2026,
  title={Qwen3.8-27B-Kearuga-DFlash2: a Kearuga-distilled, Kearuga-calibrated NVFP4 DFlash 2 drafter with a frequency-pruned draft head for single-GPU DGX Spark serving},
  author={0xWhiteMage},
  year={2026},
  publisher={Hugging Face},
  url={https://huggingface.co/0xWhiteMage/Qwen3.8-27B-Kearuga-DFlash2}
}

📄 License

Released under the Apache 2.0 License. Derived from z-lab/Qwen3.8-27B-DFlash2 (Apache-2.0). The underlying base target model Qwen/Qwen3.8-27B is subject to Alibaba Cloud's original license terms.

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

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

GPU в ailist

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

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

Модели нужен vLLM (квантизация), но архитектура DFlash2DraftModel ему неизвестна.

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

0 моделей