Skip to content

docs: calibrated A100/A30/L40S/H100 runs (Q2_K_XL, Q8_0, BF16) and DeepSeek-V4.1-Flash - #26

Merged
Vasyl-Trefilov merged 1 commit into
RustingStudio:mainfrom
yugt:datacenter-calibrated-q8-bf16-deepseek
Nov 11, 2026
Merged

Vasyl-Trefilov merged 1 commit into
RustingStudio:mainfrom
yugt:datacenter-calibrated-q8-bf16-deepseek

Conversation

@yugt

@yugt yugt commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #24, answering the review there: the four cards calibrated, two larger Qwen3.6-35B-A3B files (Q8_0 and full-precision BF16), and DeepSeek-V4.1-Flash-1017.

Docs only. Runs at e1c2d6e (the DeepSeek end-to-end timing at this branch, same code), one GPU per Slurm job.

Qwen3.6-35B-A3B, before and after calibrate (each job: bench, calibrate, bench, bench --mtp 0, for CUDA and Vulkan):

Decode after 512, CUDA, tok/s A100 80 GB A30 L40S H100
UD-Q2_K_XL, uncalibrated → calibrated 178 → 295 138 → 203 221 → 424 272 → 524 (80 GB HBM3)
Q8_0 200 → 305 126 → 209 169 → 276 298 → 532 (80 GB HBM3)
BF16 166 → 248 13 → 14 60 → 84 237 → 330 (NVL)
  • Nearly all of the decode gain is MTP: calibrated with --mtp 0 decodes at the uncalibrated speed wherever the experts fit in VRAM. MTP costs 4-13% of pp 4096 prefill (23% for Q2_K_XL Vulkan on the A30).
  • calibrate picked chunk 4096 everywhere except Q2_K_XL Vulkan on the A30 (2048), MTP 1-2, and MTP 0 for BF16 on the A30 and L40S, where the experts do not fit (3133 and 6657 of 10240 resident).
  • Where experts do not fit, the uncalibrated run is a cold start (page cache, no routing profile yet), so part of that before/after step is not calibration. Uncalibrated pp 512 also includes one-time kernel/pipeline compilation. The doc says which rows this affects.

DeepSeek-V4.1-Flash-1017 GSQ-RCO IQ2_XXS (248.8 GB): check passes, "The capital of France is" → " Paris." on both cards, and the same greedy text on every run. With the experts in the page cache, end-to-end decode is 4.5-4.6 tok/s at the default 9 GB VRAM expert budget on an A100 80 GB and an H100 NVL, and 6.6 (A100) / 8.9 (H100 NVL) tok/s at 60 GB. Before that, reading experts from the cluster file system takes seconds to a minute per token. This is one 30-token prompt and 33 decode tokens (the model stopped there), so nothing about long contexts.

Full tables (mean, min-max of 3 repetitions), host CPUs, file hashes and commands are in docs/datacenter-nvidia-results.md. SUPPORTED_GPUS.md gets the calibrated decode per row next to the same job's --mtp 0 number; BENCHMARKS.md gets a pointer to the DeepSeek numbers.

🤖 Generated with Claude Code

…epSeek-V4.1-Flash

Bench before and after `calibrate` on each card for three Qwen3.6-35B-A3B files,
plus DeepSeek-V4.1-Flash-1017 IQ2_XXS generate on an A100 and an H100 NVL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Vasyl-Trefilov

Copy link
Copy Markdown
Member

@yugt What for you want to use RustingStrata? I mean if you think about running some bigger models, I can add them and optimize to make them way faster

@Vasyl-Trefilov
Vasyl-Trefilov merged commit f47e370 into RustingStudio:main Nov 11, 2026
2 checks passed
Vasyl-Trefilov pushed a commit that referenced this pull request Nov 18, 2026
Vasyl-Trefilov pushed a commit that referenced this pull request Nov 18, 2026
* feat(cuda): Volta tensor cores in prefill attention (M2-T2)

Move `attn_prefill_t`'s QK^T and PV products from the emulated
`mma.m16n8k16` to `mma.sync.aligned.m8n8k4` (SASS HMMA.884) on sm_70,
under `#if __CUDA_ARCH__ < 800 && GEMM_TC`, with the per-lane mapping
already proven by `gemm_q` in M2-T1.

- QK^T: A = Q rows `8*j + t + 4*hi`, B = K row `8*(4*ng + c) + t + 4*hi`,
  eight `mma884` per 16-deep k step; accumulators `s2[ng][j][4*p4 + 2*p2 + e]`
  are a view of the existing `float s[FA_BK/8][4]`.
- softmax: rows `8*j + (t&1) + 2*p2 + 4*hi`, keys
  `8*(4*ng + c) + (t&2) + 4*p4 + e`, row max/sum across the eight lanes of
  the row with `__shfl_xor_sync(.., 2/4/8)`; `mT`/`lT` hold the lane's four
  rows, `lT` reduced once after the last tile.
- PV: P staged into a warp-private 64 x (FA_BK + 8) half tile appended after
  `vs` in `fa_sm` (`__syncwarp()` publishes it), A read as two `ld_s32`, B
  from the transposed V tile as four `ld.shared.u16`; accumulators
  `o2[j][grp][...]` are a view of the existing `float o[HD/8][4]`.
- store loop mirrors `gemm_q`'s sm_70 loop; the key/dim loops are written
  over `FA_BK/32` and `HD/32` groups for M2-T3.

The shared-memory request grows by the 5120 B staging tile (max 72704 B at
hd = 256, below the 96192 B opt-in) in `attn_prefill_m` and
`dyn_shmem_need`, with the asserted numbers updated. `STRATA_GEMM_FMA`
(`GEMM_TC`) now selects the fallback for the prefill GEMM *and* attention.

Additive-only in kernels.cu: the `m16n8k16` path stays verbatim in the
`#else` branch, the sm_80 preprocessed source is byte-identical and the
sm_70 FMA variant is source-identical to v100.

* docs: M2-T2 prefill attention tensor-core numbers (V100)

Append the dated M2-T2 block: the m8n8k4 mapping used by
`attn_prefill_t`, the `attn_prefill_matches_decode` and `kv_q8`
relative errors on both the tensor-core and the `STRATA_GEMM_FMA`
build, the bench table (prefill 2045.3 / 2795.3 / 2263.7 tok/s against
833.6 / 1030.7 / 489.2 for the FMA build, decode unchanged), the
`nsys` per-kernel comparison (`attn_prefill_256` 6.124 ms vs 70.760 ms
per launch, -91.3 %; total kernel time -64.6 %), and the no-new-`Xid`
statement.
Vasyl-Trefilov pushed a commit that referenced this pull request Nov 18, 2026
Vasyl-Trefilov added a commit that referenced this pull request Nov 18, 2026
docs: calibrated A100/A30/L40S/H100 runs (Q2_K_XL, Q8_0, BF16) and DeepSeek-V4.1-Flash
Vasyl-Trefilov added a commit that referenced this pull request Nov 20, 2026
docs: calibrated A100/A30/L40S/H100 runs (Q2_K_XL, Q8_0, BF16) and DeepSeek-V4.1-Flash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants