[PR #276] [CLOSED] DeepSeek-V4.1-Flash-1017: the 3.5-bit quant in the setup, strata-ds4 tensor parallel over 4 / 8 GPUs, its KV as packed FP4, expert cache swaps on threads, ./maya.sh --calibrate for --tp and the CPU threads #441

Closed
opened 2026-10-29 21:25:27 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mw00/project-maya/pull/276
Author: @needmorevram
Created: 10/19/2026
Status: ❌ Closed

Base: main ← Head: ds4-3.5bpw-tp-fp4kv


📝 Commits (6)

  • 36c7c09 strata-ds4: tensor parallel over 4 or 8 GPUs (uneven 128-block splits, a reduce-scatter all-reduce), the drafter's markov steps over the head group, leaner decode kernels
  • 65cbce1 strata-ds4 CLI: --ids @FILE, DS4_BENCH_REPEAT (warm passes), DS4_PROFILE (nsys capture of the decode alone)
  • 98fd0c5 DeepSeek-V4.1-Flash-1017 at 3.5 bits in the setup, strata-ds4's KV as packed FP4, expert cache swaps on threads
  • e4c92e4 strata-ds4: the hand-offs of a window's packed index-key rows (68 bytes) in 4-byte units - a misaligned address with tensor parallel 2, their last bytes left out
  • 9150574 ./maya.sh --calibrate for DeepSeek-V4.1-Flash-1017: --tp and the CPU threads measured on this PC (tools/calibrate_ds4.py), an engine start each
  • 59b36f6 strata-ds4: a group's heads on as many members as they split among evenly (--tp 6 and 7 start); the DeepSeek calibration leaves out a setting the engine does not run with

📊 Changes

18 files changed (+2657 additions, -401 deletions)

View changed files

📝 docs/SETUP.md (+12 -6)
📝 include/strata/kernels/exl3.hpp (+3 -0)
📝 maya.py (+182 -46)
📝 serve/gpu_map.py (+9 -4)
📝 serve/test_dashboard.py (+12 -0)
📝 serve/web/app.js (+6 -2)
📝 src/ds4/ds4_kernels.cu (+469 -52)
📝 src/ds4/ds4_kernels.cuh (+46 -10)
📝 src/ds4/ds4_main.cpp (+101 -10)
📝 src/ds4/ds4_model.cu (+617 -268)
📝 src/ds4/ds4_model.hpp (+8 -0)
📝 src/kernels/cuda/exl3.cu (+11 -0)
➕ tests/ds4_kv_fp4_parity.cu (+267 -0)
➕ tests/ds4_topk_order.cu (+59 -0)
➕ tools/calibrate_ds4.py (+276 -0)
➕ tools/ds4/download-3.5bpw.json (+239 -0)
➕ tools/test_calibrate_ds4.py (+190 -0)
📝 tools/test_setup_ds4.py (+150 -3)

📄 Description

Follow-up to #271, DeepSeek only: LibertAIDAI's 3.5-bit quant in the setup, strata-ds4's tensor parallel over 4 or 8 GPUs, the compressed KV and index keys stored as packed FP4, and expert cache swaps on threads of their own. Outside src/ds4 the only engine code is a new x3::mv_cols that only strata-ds4 calls; GLM's paths are unchanged.

The setup: DeepSeek-V4.1-Flash-1017 at 3.5 bits

  • LibertAIDAI's EXL3 quant at 3.5 bpw (258 GB) next to the 2.9-bit one: --model DeepSeek-V4.1-Flash-1017-3.5bpw, or the model menu's third row. tools/ds4/download-3.5bpw.json pins every file to revision 04a492fc with its size and sha256.
  • Each quant has its own folder (<models>/<quant name>) and its own memory figure for the PC check. 3.5 bits needs about 280 GB of VRAM and RAM together, and below that the check warns as it does for 2.9 bits.
  • The Engram tables are the same for every quant (ds4_link_engram): when they are missing in one quant's folder but whole in another's, they are hard-linked from it along with their sha256 record. That means no second 203 GB download and no second copy on the disk. If a hard link isn't possible (another drive), they are left to the download.
  • docs/SETUP.md covers both quants.

strata-ds4

  • Tensor parallel over 4 or 8 GPUs (36c7c091): FFN, shared-expert and head columns split in whole 128-blocks, as even as they go. Three members or more sum through a reduce-scatter + all-gather (FP16 by default, DS4_AR_F16=0 for F32). On 8 GPUs at 5 tokens that took 156 µs before, now 66 µs in F32 and about 35 µs in FP16. On a head group of two or more, the drafter's markov bias runs across the members, which gives the same drafts and cuts drafting from 4.1 to 2.6 ms a round. Leaner decode kernels: router GEMV for a window in one launch, head rows in runs (x3::mv_cols), and one sampler launch for a verify window's greedy picks. The commit's speed figures were measured together with a faster moe_win_group kernel, which is left out of this PR because GLM's window path uses it too.
  • Groups: runs of GPUs of one kind, or one group of all of them (--tp set to the GPU count, where its tightest member sets the experts' room). The heads go to as many members as they split among evenly (64 heads and 8 output groups: 9 → 8, 7 or 6 → 4, 5 → 4, 3 → 2), and the first members take only an FFN share. Before 59b36f63, heads went to all members or all but one, so --tp 6 and --tp 7 did not start.
  • Packed FP4 KV: the compressed KV (FP4, an E4M3 scale per 16) and the index keys (FP4, a power-of-two scale per 32) are stored as the packed rows they are (Finish::pdst), a quarter of BF16's bytes plus a little. index_score and sparse_attn read them back bit for bit the BF16 rows.
  • Deterministic top-k: values above the k-th, then the first of those equal to it, in position order. Atomics used to place them, so ties came out differently from run to run.
  • cuBLAS workspace pinned before any handle is created, so a long prompt's logits are the same from one start to the next.
  • Expert cache: swaps are prepared on threads of their own (DS4_CACHE_THREADS, 4) and switched between windows. The swap rule's margin, bonus, decay and in-flight limit are settings (DS4_CACHE_*).
  • Placement by the profile: each layer's most-routed experts per byte get the VRAM room first, with the drafter's blocks on the lead GPU. DS4_PLACE_UNIFORM keeps the even split.
  • hc_mix + hc_split run on a second stream beside the attention and the MoE.
  • CLI: --ppl FILE (one sequence per line, each scored in one forward), --ids @FILE, DS4_BENCH_REPEAT (warm passes) and DS4_PROFILE (an nsys capture of the decode alone).
  • Serving: STAT lines (the live expert tiers) every 8 tokens, and per-GPU VRAM lines before READY, for the Monitor.

The Monitor (strata-ds4 only)

  • strata-ds4's vision tower runs inside the engine's own process, and its VRAM line reports it as vision_own: the GPU map counts it as vision, not as "the rest".
  • For strata-ds4, the RAM tier reads "experts the CPU computes, in RAM", not experts pulled over PCIe.

./maya.sh --calibrate for DeepSeek (9150574f, 59b36f63)

Until now --calibrate skipped DeepSeek configs and went straight to loading the model. It now measures strata-ds4's --tp and its CPU threads on this PC (tools/calibrate_ds4.py). Each setting needs its own engine start, so each start gets a warm-up, the decode speed (the median of 2 prompt groups) and the read of a 16K-token prompt.

  • --tp: every value that groups this PC's GPUs differently. That is 2, 4, 8 and 16 up to the longest run of equal GPUs, then that run's length, then all GPUs together (on 9 GPUs: 2, 4, 8, 9). The config's own value is measured first as the baseline.
  • How a winner is picked: decode speed decides. A --tp whose long prompt reads below 60% of the baseline's is not taken. A winner must beat the baseline by more than 5%, and one that wins by less than 15% is started again beside the baseline before it is kept.
  • CPU threads: at the chosen --tp, it tries 3/4 and then 1/2 of the engine's default (44 here), going on only while a step helps by more than 5%. This is skipped when VRAM holds every expert.
  • A setting the engine does not run with (too little memory for it, say) is left out and named in the report's failed, and the rest are still measured. The config's own --tp must run, since it is the baseline.
  • The expert profile: every start reads a fresh copy of it and writes only that copy, so the tuning's answers neither reach the PC's profile nor carry one candidate's placement into the next.
  • Where the result goes: into maya-ds4.json and ~/.config/project-maya/calibration.json (keyed by the hardware), and a later setup applies it to flags the config does not already set. If the calibration fails, the config stays as it was. --speed-calibration still has nothing to compare for DeepSeek (no drafter choice).
  • strata-ds4's INFO line now reports cpu_threads. docs/SETUP.md describes it.

Measured on 9 GPUs (RTX 3090 + 8x RTX 5060 Ti, 2x Xeon Gold 6152, 183 GB RAM), 3.5 bits, 262,144-token context:

--tp decode tok/s 16K prompt read, tok/s load
4 (the config's) 52.8, then 55.4 on a second start 488 ~5 min
2 50.0 436 ~5 min
8 56.1 420 ~9.5 min
9 53.9 432 ~5 min

--tp 8 won by 6.3%, which is under 15%, so both started once more. --tp 4 came in at 55.4 (5% faster than its first start: starts of one setting vary that much, which is why a small win is confirmed) and --tp 8 at 56.7. Over both starts that is 54.1 against 56.1 tok/s, +3.8%, under the 5% bar. At --tp 4, 33 CPU threads gave 53.9 tok/s, no gain over 44, so it stopped there. Result: --tp 4 with the engine's 44 threads, 54.1 tok/s, which is what this PC's config already had. The whole run took about an hour: --tp 8 loads in about 9.5 minutes, the others in about 5.

(The machine went down once during --tp 9's first load. Nothing was in the journal or the kernel log, no OOM and no Xid. The rerun went through, with the GPUs drawing at most 910 W in all. The --tp 9 row and the steps after the sweep come from rerunning those starts with the tool's own functions.)

6 or 7 equal GPUs (e.g. 7x RTX 3090: candidates 2, 4, 7) now work too (59b36f63). On this PC --tp 7 makes one group of seven RTX 5060 Ti, with parts 0-2 holding no heads:

--tp 7 --tp 4
perplexity, 4 x 1,024 tokens of the repo's docs (one forward each) 7.504 7.514
decode tok/s 52.9 52.8-55.4
16K prompt read, tok/s 409 488

The greedy answer to "why is the sky blue" at --tp 7 is a correct explanation of Rayleigh scattering. The time estimates in docs/SETUP.md and in the calibration's own message now say about an hour.

Tests

  • strata-ds4 builds from this branch on CUDA 13.4 (sm_86 + sm_120) with no warnings in src/ds4.
  • tools.test_setup_ds4 (17 tests, with 5 new ones for the calibration's result in the config), the new tools.test_calibrate_ds4 (17 tests, with stand-in engines: the candidates, the choice, the confirmation, the threads, the profile copies, and settings whose engine does not start) and serve.test_dashboard (22 tests, with a new one for vision_own) pass. The GLM calibration's and the server's tests still pass.
  • New: tests/ds4_kv_fp4_parity.cu (packed FP4 rows against BF16: 0 of 768,000 / 1,536,000 values differ, and index_score / sparse_attn match bit for bit; and the hand-offs below, 42 cases) and tests/ds4_topk_order.cu (top-k against a host reference with heavy ties, a single value everywhere, and n up to 200K, the same output twice) both pass. They build with nvcc as their headers describe.
  • A fix found here (e4c92e49): with --tp 2, the 3.5-bit model stopped within 2-5 decoded tokens, and the server's first long prompt stopped with cudaStreamSynchronize: misaligned address / streaming layer 0 expert 1 failed. A GPU core dump put it in xfer_put_kernel: the hand-offs of a window's new rows to the layers in other groups copied in 16-byte units, and a packed index-key row is 68 bytes (where the addresses did line up, a row's last bytes were left out). Each segment now goes in the widest unit its ends and size allow; the KV's 288-byte rows keep 16-byte units. One group of every GPU hands no rows off, which is why the earlier --tp 9 runs never showed it.
  • End to end, DeepSeek-V4.1-Flash-1017 at 3.5 bits on all 9 GPUs with --tp 2 and a 262,144-token context, this branch's engine: an 8,000-token prompt in windows of 16, then 256 tokens (DSpark 4.2 tokens a round, 69 tok/s); and the same prompt in one chunked pass (339 tok/s), then 128 tokens that carry on the prompt's text. Before the fix, both runs stopped after 2-5 tokens.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mw00/project-maya/pull/276 **Author:** [@needmorevram](https://github.com/needmorevram) **Created:** 10/19/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `ds4-3.5bpw-tp-fp4kv` --- ### 📝 Commits (6) - [`36c7c09`](https://github.com/mw00/project-maya/commit/36c7c091a72d3466b3ffef0b73efc09ae4b3f760) strata-ds4: tensor parallel over 4 or 8 GPUs (uneven 128-block splits, a reduce-scatter all-reduce), the drafter's markov steps over the head group, leaner decode kernels - [`65cbce1`](https://github.com/mw00/project-maya/commit/65cbce13edb92a5e5a2a5c397b38b219a9fb3d6b) strata-ds4 CLI: --ids @FILE, DS4_BENCH_REPEAT (warm passes), DS4_PROFILE (nsys capture of the decode alone) - [`98fd0c5`](https://github.com/mw00/project-maya/commit/98fd0c5e44f3d2fdc1f3f520fb7b80f1b64759a2) DeepSeek-V4.1-Flash-1017 at 3.5 bits in the setup, strata-ds4's KV as packed FP4, expert cache swaps on threads - [`e4c92e4`](https://github.com/mw00/project-maya/commit/e4c92e499583c4fadad3f918f45908e08e8ac96e) strata-ds4: the hand-offs of a window's packed index-key rows (68 bytes) in 4-byte units - a misaligned address with tensor parallel 2, their last bytes left out - [`9150574`](https://github.com/mw00/project-maya/commit/9150574f0f78655d3bd725e0b056fe0647585319) ./maya.sh --calibrate for DeepSeek-V4.1-Flash-1017: --tp and the CPU threads measured on this PC (tools/calibrate_ds4.py), an engine start each - [`59b36f6`](https://github.com/mw00/project-maya/commit/59b36f63ee0dbdac87e34b61cd3fe6a7c9c7cf14) strata-ds4: a group's heads on as many members as they split among evenly (--tp 6 and 7 start); the DeepSeek calibration leaves out a setting the engine does not run with ### 📊 Changes **18 files changed** (+2657 additions, -401 deletions) <details> <summary>View changed files</summary> 📝 `docs/SETUP.md` (+12 -6) 📝 `include/strata/kernels/exl3.hpp` (+3 -0) 📝 `maya.py` (+182 -46) 📝 `serve/gpu_map.py` (+9 -4) 📝 `serve/test_dashboard.py` (+12 -0) 📝 `serve/web/app.js` (+6 -2) 📝 `src/ds4/ds4_kernels.cu` (+469 -52) 📝 `src/ds4/ds4_kernels.cuh` (+46 -10) 📝 `src/ds4/ds4_main.cpp` (+101 -10) 📝 `src/ds4/ds4_model.cu` (+617 -268) 📝 `src/ds4/ds4_model.hpp` (+8 -0) 📝 `src/kernels/cuda/exl3.cu` (+11 -0) ➕ `tests/ds4_kv_fp4_parity.cu` (+267 -0) ➕ `tests/ds4_topk_order.cu` (+59 -0) ➕ `tools/calibrate_ds4.py` (+276 -0) ➕ `tools/ds4/download-3.5bpw.json` (+239 -0) ➕ `tools/test_calibrate_ds4.py` (+190 -0) 📝 `tools/test_setup_ds4.py` (+150 -3) </details> ### 📄 Description Follow-up to #271, DeepSeek only: LibertAIDAI's 3.5-bit quant in the setup, strata-ds4's tensor parallel over 4 or 8 GPUs, the compressed KV and index keys stored as packed FP4, and expert cache swaps on threads of their own. Outside `src/ds4` the only engine code is a new `x3::mv_cols` that only strata-ds4 calls; GLM's paths are unchanged. ## The setup: DeepSeek-V4.1-Flash-1017 at 3.5 bits - [LibertAIDAI's EXL3 quant at 3.5 bpw](https://huggingface.co/LibertAIDAI/DeepSeek-V4.1-Flash-1017-EXL3-3.5bpw) (258 GB) next to the 2.9-bit one: `--model DeepSeek-V4.1-Flash-1017-3.5bpw`, or the model menu's third row. `tools/ds4/download-3.5bpw.json` pins every file to revision `04a492fc` with its size and sha256. - Each quant has its own folder (`<models>/<quant name>`) and its own memory figure for the PC check. 3.5 bits needs about 280 GB of VRAM and RAM together, and below that the check warns as it does for 2.9 bits. - **The Engram tables are the same for every quant** (`ds4_link_engram`): when they are missing in one quant's folder but whole in another's, they are hard-linked from it along with their sha256 record. That means no second 203 GB download and no second copy on the disk. If a hard link isn't possible (another drive), they are left to the download. - `docs/SETUP.md` covers both quants. ## strata-ds4 - **Tensor parallel over 4 or 8 GPUs** (36c7c091): FFN, shared-expert and head columns split in whole 128-blocks, as even as they go. Three members or more sum through a reduce-scatter + all-gather (FP16 by default, `DS4_AR_F16=0` for F32). On 8 GPUs at 5 tokens that took 156 µs before, now 66 µs in F32 and about 35 µs in FP16. On a head group of two or more, the drafter's markov bias runs across the members, which gives the same drafts and cuts drafting from 4.1 to 2.6 ms a round. Leaner decode kernels: router GEMV for a window in one launch, head rows in runs (`x3::mv_cols`), and one sampler launch for a verify window's greedy picks. The commit's speed figures were measured together with a faster `moe_win_group` kernel, which is left out of this PR because GLM's window path uses it too. - **Groups:** runs of GPUs of one kind, or one group of all of them (`--tp` set to the GPU count, where its tightest member sets the experts' room). The heads go to as many members as they split among evenly (64 heads and 8 output groups: 9 → 8, 7 or 6 → 4, 5 → 4, 3 → 2), and the first members take only an FFN share. Before 59b36f63, heads went to all members or all but one, so `--tp 6` and `--tp 7` did not start. - **Packed FP4 KV:** the compressed KV (FP4, an E4M3 scale per 16) and the index keys (FP4, a power-of-two scale per 32) are stored as the packed rows they are (`Finish::pdst`), a quarter of BF16's bytes plus a little. `index_score` and `sparse_attn` read them back bit for bit the BF16 rows. - **Deterministic top-k:** values above the k-th, then the first of those equal to it, in position order. Atomics used to place them, so ties came out differently from run to run. - **cuBLAS workspace pinned** before any handle is created, so a long prompt's logits are the same from one start to the next. - **Expert cache:** swaps are prepared on threads of their own (`DS4_CACHE_THREADS`, 4) and switched between windows. The swap rule's margin, bonus, decay and in-flight limit are settings (`DS4_CACHE_*`). - **Placement by the profile:** each layer's most-routed experts per byte get the VRAM room first, with the drafter's blocks on the lead GPU. `DS4_PLACE_UNIFORM` keeps the even split. - `hc_mix` + `hc_split` run on a second stream beside the attention and the MoE. - **CLI:** `--ppl FILE` (one sequence per line, each scored in one forward), `--ids @FILE`, `DS4_BENCH_REPEAT` (warm passes) and `DS4_PROFILE` (an nsys capture of the decode alone). - **Serving:** `STAT` lines (the live expert tiers) every 8 tokens, and per-GPU `VRAM` lines before `READY`, for the Monitor. ## The Monitor (strata-ds4 only) - strata-ds4's vision tower runs inside the engine's own process, and its `VRAM` line reports it as `vision_own`: the GPU map counts it as vision, not as "the rest". - For strata-ds4, the RAM tier reads "experts the CPU computes, in RAM", not experts pulled over PCIe. ## `./maya.sh --calibrate` for DeepSeek (9150574f, 59b36f63) Until now `--calibrate` skipped DeepSeek configs and went straight to loading the model. It now measures strata-ds4's `--tp` and its CPU threads on this PC (`tools/calibrate_ds4.py`). Each setting needs its own engine start, so each start gets a warm-up, the decode speed (the median of 2 prompt groups) and the read of a 16K-token prompt. - **`--tp`:** every value that groups this PC's GPUs differently. That is 2, 4, 8 and 16 up to the longest run of equal GPUs, then that run's length, then all GPUs together (on 9 GPUs: 2, 4, 8, 9). The config's own value is measured first as the baseline. - **How a winner is picked:** decode speed decides. A `--tp` whose long prompt reads below 60% of the baseline's is not taken. A winner must beat the baseline by more than 5%, and one that wins by less than 15% is started again beside the baseline before it is kept. - **CPU threads:** at the chosen `--tp`, it tries 3/4 and then 1/2 of the engine's default (44 here), going on only while a step helps by more than 5%. This is skipped when VRAM holds every expert. - **A setting the engine does not run with** (too little memory for it, say) is left out and named in the report's `failed`, and the rest are still measured. The config's own `--tp` must run, since it is the baseline. - **The expert profile:** every start reads a fresh copy of it and writes only that copy, so the tuning's answers neither reach the PC's profile nor carry one candidate's placement into the next. - **Where the result goes:** into `maya-ds4.json` and `~/.config/project-maya/calibration.json` (keyed by the hardware), and a later setup applies it to flags the config does not already set. If the calibration fails, the config stays as it was. `--speed-calibration` still has nothing to compare for DeepSeek (no drafter choice). - strata-ds4's `INFO` line now reports `cpu_threads`. `docs/SETUP.md` describes it. **Measured on 9 GPUs** (RTX 3090 + 8x RTX 5060 Ti, 2x Xeon Gold 6152, 183 GB RAM), 3.5 bits, 262,144-token context: | `--tp` | decode tok/s | 16K prompt read, tok/s | load | | --- | --- | --- | --- | | 4 (the config's) | 52.8, then 55.4 on a second start | 488 | ~5 min | | 2 | 50.0 | 436 | ~5 min | | 8 | 56.1 | 420 | ~9.5 min | | 9 | 53.9 | 432 | ~5 min | `--tp 8` won by 6.3%, which is under 15%, so both started once more. `--tp 4` came in at 55.4 (5% faster than its first start: starts of one setting vary that much, which is why a small win is confirmed) and `--tp 8` at 56.7. Over both starts that is 54.1 against 56.1 tok/s, +3.8%, under the 5% bar. At `--tp 4`, 33 CPU threads gave 53.9 tok/s, no gain over 44, so it stopped there. **Result: `--tp 4` with the engine's 44 threads, 54.1 tok/s**, which is what this PC's config already had. The whole run took about an hour: `--tp 8` loads in about 9.5 minutes, the others in about 5. (The machine went down once during `--tp 9`'s first load. Nothing was in the journal or the kernel log, no OOM and no Xid. The rerun went through, with the GPUs drawing at most 910 W in all. The `--tp 9` row and the steps after the sweep come from rerunning those starts with the tool's own functions.) **6 or 7 equal GPUs** (e.g. 7x RTX 3090: candidates 2, 4, 7) now work too (59b36f63). On this PC `--tp 7` makes one group of seven RTX 5060 Ti, with parts 0-2 holding no heads: | | `--tp 7` | `--tp 4` | | --- | --- | --- | | perplexity, 4 x 1,024 tokens of the repo's docs (one forward each) | 7.504 | 7.514 | | decode tok/s | 52.9 | 52.8-55.4 | | 16K prompt read, tok/s | 409 | 488 | The greedy answer to "why is the sky blue" at `--tp 7` is a correct explanation of Rayleigh scattering. The time estimates in `docs/SETUP.md` and in the calibration's own message now say about an hour. ## Tests - `strata-ds4` builds from this branch on CUDA 13.4 (sm_86 + sm_120) with no warnings in `src/ds4`. - `tools.test_setup_ds4` (17 tests, with 5 new ones for the calibration's result in the config), the new `tools.test_calibrate_ds4` (17 tests, with stand-in engines: the candidates, the choice, the confirmation, the threads, the profile copies, and settings whose engine does not start) and `serve.test_dashboard` (22 tests, with a new one for `vision_own`) pass. The GLM calibration's and the server's tests still pass. - **New:** `tests/ds4_kv_fp4_parity.cu` (packed FP4 rows against BF16: 0 of 768,000 / 1,536,000 values differ, and `index_score` / `sparse_attn` match bit for bit; and the hand-offs below, 42 cases) and `tests/ds4_topk_order.cu` (top-k against a host reference with heavy ties, a single value everywhere, and n up to 200K, the same output twice) both pass. They build with `nvcc` as their headers describe. - **A fix found here (e4c92e49):** with `--tp 2`, the 3.5-bit model stopped within 2-5 decoded tokens, and the server's first long prompt stopped with `cudaStreamSynchronize: misaligned address` / `streaming layer 0 expert 1 failed`. A GPU core dump put it in `xfer_put_kernel`: the hand-offs of a window's new rows to the layers in other groups copied in 16-byte units, and a packed index-key row is 68 bytes (where the addresses did line up, a row's last bytes were left out). Each segment now goes in the widest unit its ends and size allow; the KV's 288-byte rows keep 16-byte units. One group of every GPU hands no rows off, which is why the earlier `--tp 9` runs never showed it. - **End to end**, DeepSeek-V4.1-Flash-1017 at 3.5 bits on all 9 GPUs with `--tp 2` and a 262,144-token context, this branch's engine: an 8,000-token prompt in windows of 16, then 256 tokens (DSpark 4.2 tokens a round, 69 tok/s); and the same prompt in one chunked pass (339 tok/s), then 128 tokens that carry on the prompt's text. Before the fix, both runs stopped after 2-5 tokens. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:25:27 +07:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mw00/project-maya#441
No description provided.