Skip to content

dasLLAMA: the audio towers on the CUDA home, q8 + f16 on every GPU home - #4473

Merged
borisbat merged 8 commits into
masterfrom
bbatkin/asr-cuda
Nov 7, 2026
Merged

borisbat merged 8 commits into
masterfrom
bbatkin/asr-cuda

Conversation

@borisbat

@borisbat borisbat commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

Behavior change: every audio tower family serves on the CUDA home under DASLLAMA_GPU=1 DASLLAMA_CUDA=1, and every GPU home's un-pinned audio lane is q8 (an exact ask: f16 on a GPU home, f32 on the CPU). An un-pinned Metal load of canary, parakeet or gemma4a now maps the q8 image.

Why. Under the CUDA ask every audio family fell to the CPU chain; the Vulkan driver held each chain in its own body, so a CUDA twin would have copied every one.

What changes.

  • The tower chains are bodies generic over a rail record; both discrete drivers instantiate them with their own kernel stamps.
  • The CUDA tower driver seats every audio family, its chains replayed from captured graphs.
  • One lane policy on every GPU home: q8 un-pinned, f16 on a pin or DASLLAMA_AUDIO_LANE=16.
  • Seven master bugs are their own commits ahead of the feature (listed in the fold); the fleet tool gains times.

Observable behavior.

  • jfk encode, CUDA / Vulkan, q8, ms: whisper turbo 63.7 / 64.6, parakeet v2 63.9 / 75.4, canary 89.4 / 107.8 (the rest in PERF_LEDGER.md).
  • GigaAM's transducer decode on CUDA: 204 -> 87 ms over ru_long's spans.
  • Master's model-free suite on a Vulkan box goes green.

Where to look. The rail bodies (dasllama_tower_chains*.das); the risky spots are the lane policy seam (audio_lane_serves_q8) and the CUDA router GEMV tiling (cud_router_enc_cols).

Validation, claims, ledger

Validation

  • The seven fix commits, each standing alone on master plus the ones before it: the CUDA decoder's router GEMV ran untiled past eight columns (a wrong first token on short windows); the Metal fused dn step's threadgroup size on the M1; dasllama_tuned_fallbacks() emptied by a warm module cache; two kernel-cell walks over the MLX members no discrete home stamps; the tier contract files red in any batch whose mate arms the tier at init; the census roster naming the Bergamot stamps without their _spv keys; test_gpu_home on a build without the spelled home.
  • Fleet (three RTX PRO 4500 pods, Vulkan home), --changed --base 1f71df6116, 230 files in 3 shards: 223 green in their shards; the 7 reds attributed: gptoss and the MoE file hit the census bug fixed mid-run (green alone after: 11/0, 17/0); test_model_image fails its saves because the models volume is over quota (its cells are green on zen2 on both homes and on the M1); test_served_bench is a timing flake and test_vad saw one ERROR_INCOMPATIBLE_DRIVER in one process (both green alone and in a stocked batch on master and on the branch); the two below are master's.
  • CUDA pass on a pod, --only cuda,segments,regions,resident_moe,embeddings --exclude ctx128k,moe_host_pinned (the two excluded files cross the pod's 62 GB container cap; master dies the same): 44 files; the five reds are batch-state effects under the ask (gptoss 8/8, qwen2moe 4/4, segments 6/6 alone), the gemma-4-12B control (below) and llama-3b 32k under the ask (one slab pair bound on a 32 GB card, a one-off control one bar short: master fails it the same way, same numbers).
  • CUDA vision on the pod, --area vision --only gemma4uv,gemma4v,gemma3v,qwen3v,qwen25v: 5 files, 0 failed. CUDA audio on the pod, --area audio --only audio,whisper,gigaam,rnnt,vad,cuda_tower_g4a_chain: 8 files, 0 failed. Coverage census --suite coverage --arm coverage-vk on the pod: 4 passed, 2 skipped, 0 failed, f16_gemm_cm2_s_cls_spv never dispatched by the zoo as expected; the roster fix (the Bergamot keys) was red first there.
  • M1 Max, the whole list on the rebased tree, 0 failed: model-free 105 files, kernels 7, audio 19 and GigaAM 3, vision 13, TTS 19, translate 3, the image arms, decode arm1-basic, prefill base, matrix fam-qwen3. The exact f16 lane serves on its GPU (the toolchain probe compiles the half GEMM); the Metal refusal line is proven through the twin knob.
  • zen2 (RTX 5060 Ti, both homes): audio area 19 files 0 failed on each home, vision chat 0 failed on each, model-free whole on Vulkan 105 files green after the fixes, the CUDA model-free set 9 files 0 failed.
  • Known reds with their control: test_long_streams_gemma3_4b (128k, two streams) maxdiff 0.9907 against 0.896, identical on master on the same pod; test_gpu_resident_cuda_gemma4_12b's 300-token control lands inside its bar on this card (gap 1.46, master the same gap); test_gpu_resident_cuda_llama_1b_nv4 40-token window 1.182 against 1.099 (master's since the nv4 commits); test_nmt_loader_refusals (Windows fmap handle, master's); the 30B host-pinned MoE cells die at the fleet's 62 GB cap on both trees.
  • Each fix commit stands alone on master plus the fixes before it: the CUDA peel cell 2/2 on CUDA and the E2B short window 2/2 on Vulkan (zen2), the Metal prefill kernels and the tier files on the M1's master worktree, the model-free files on zen2.
  • Red first, every fix: the E2B Q4_K_M peel cell landed the 9- and 16-row tails 32 and 47 logits off before cud_router_enc_cols; the fallbacks table read empty on the M1 and in a two-compile reproduction here; the tier contract files red in master's own ten-file batch; negative controls on the five CUDA rsqrt cells, the lane-seat cell and the cache cell.
  • Preflight once (make-pr chain): lint green on every rail, tests-cpp and tests-aot green; the docs lane red on this box's locked watchdog.exe (das2rst by hand exits 0), tests-interp and tests-jit red only on the file time budgets (test_watchdog 75-81 s, jit_lib 84 s against 60 s; 15567/15580 and 15469/15483 passed, no assertion failed), review-md red only on REVIEW.das site's 160 findings over gitignored generated files.
  • Two external review rounds (codex) at the pre-fix tip and the final tip: no findings on the second.
  • Emitted-text evidence kept out of tree: the CUDA kernel texts regenerated with -no-module-cache, the Metal text diff against master, the mad / fma and tanh-GELU changes on Metal.

Claims - stated, not tested

  • The lasting device buffers the audio towers' CUDA seats add are derived from the allocation sites (PERF_LEDGER.md, the STATED entry), not measured.
  • The LLM window keeps its own cm2 column pick; the tower model was measured on pp1000 and not applied there.
  • The nsys readings in the ledger are external and carry no recipe past the entry's own text.
  • crd_router_rows's fold is covered by the MoE carriers on the pod only through the batch runs above; its lone cells pass.

Not done

  • Metal on the rail, the K-quant lanes for the families that do not use them, TTS on CUDA: not this arc.
  • The f16 GEMM on simdgroup halves for a Mac whose toolchain carries no tensor ops (followup_metal.md 71); the audio towers' q8 lane on Metal untimed against their f16 lane but GigaAM's (72).
  • The batched runner under the CUDA ask: a batch of MoE and regions files reds cells that pass alone, on master too; the fleet pods' 62 GB container cap kills the 30B host-pinned cells; a pod type with more memory (an RTX PRO 6000) or a child of their own for those files.
  • modules/ARCHITECTURE.md (ruled no for this change); the held board rows.

Copilot AI balanced review requested due to automatic review settings November 7, 2026 06:23
Copilot stopped reviewing on behalf of borisbat due to an error November 7, 2026 06:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

🔵 Needs a closer look

The change spans multiple GPU backends and lane/tower routing policies with runtime- and hardware-dependent correctness/performance impacts, so static diff review alone can’t provide sufficient confidence without targeted validation on real CI lanes and hardware.

No open issues 🎉

What changed in this PR

This pull request updates dasLLAMA’s GPU tower routing so all audio tower families can serve on the CUDA home under DASLLAMA_GPU=1 DASLLAMA_CUDA=1, while standardizing the GPU lane policy (q8 unpinned by default; f16 when pinned or forced via DASLLAMA_AUDIO_LANE=16). It also includes supporting refactors, test expansions, and documentation/review-rule updates to match the new behavior.

Changes:

  • Route audio tower families onto the CUDA home under the CUDA ask; refactor shared “rail/tower” bodies and seating infrastructure across backends.
  • Enforce/validate lane selection defaults across GPU homes (q8 default; f16 when pinned/forced) and bump/align related image/tag behavior.
  • Expand/update model-free, residency, tier, fleet-harness, and lane-policy tests; update review checklists and architecture/docs accordingly.

Assessment: This pull request is ready to be approved.

File Notes
skills/​perf_lint.md
skills/​daslang/​references/​everything.md Nit: visit is described as read-only but is overloaded for mutable and const adapters.
REVIEW.md
modules/​REVIEW.md
modules/​dasLLAMA/​tests/​test_run_suites.das
modules/​dasLLAMA/​tests/​test_qwen3v.das
modules/​dasLLAMA/​tests/​test_qwen25v.das
modules/​dasLLAMA/​tests/​test_pod_fleet.das
modules/​dasLLAMA/​tests/​test_gpu_tier.das
modules/​dasLLAMA/​tests/​test_gpu_resident_gemma4_e2b.das
modules/​dasLLAMA/​tests/​test_gpu_resident_cuda_gemma4.das
modules/​dasLLAMA/​tests/​test_gpu_home.das
modules/​dasLLAMA/​tests/​test_gemma3v.das
modules/​dasLLAMA/​tests/​test_f32_batch_tile_perms.das
modules/​dasLLAMA/​tests/​test_cuda_tower_g4a_chain.das
modules/​dasLLAMA/​tests/​test_cuda_tower_asr.das
modules/​dasLLAMA/​tests/​test_audio_embedder.das
modules/​dasLLAMA/​tests/​REVIEW_PINNED_GATES.md
modules/​dasLLAMA/​tests/​REVIEW_MEDIA_CELLS.md
modules/​dasLLAMA/​tests/​_tuned_fallbacks_root.das
modules/​dasLLAMA/​tests/​_tts_parity.das
modules/​dasLLAMA/​tests/​_rnnt_oracle.das
modules/​dasLLAMA/​tests/​_moe_resident.das
modules/​dasLLAMA/​tests/​_model_tier.das
modules/​dasLLAMA/​tests/​_gemma_resident.das
modules/​dasLLAMA/​tests/​_flavor_decline_root.das
modules/​dasLLAMA/​tests/​_ctc_oracle.das
modules/​dasLLAMA/​tests/​_compares.das
modules/​dasLLAMA/​tests/​_child_run.das
modules/​dasLLAMA/​tests/​_audio_lane_whisper_root.das
modules/​dasLLAMA/​tests/​_audio_lane_root.das
modules/​dasLLAMA/​REVIEW_VISION.md
modules/​dasLLAMA/​REVIEW_UPSTREAM.md Nit: wrap the quoted <role> placeholder in backticks to avoid markdown/HTML rendering loss.
modules/​dasLLAMA/​REVIEW_RACE_PICKS.md
modules/​dasLLAMA/​REVIEW_OVERRIDES.md
modules/​dasLLAMA/​REVIEW_MEMORY.md
modules/​dasLLAMA/​REVIEW_HOT_PATH.md
modules/​dasLLAMA/​REVIEW_GPU_VULKAN_TILES.md
modules/​dasLLAMA/​REVIEW_GPU_RESIDENT.md
modules/​dasLLAMA/​REVIEW_GPU_MODEL_SWAP.md
modules/​dasLLAMA/​REVIEW_GPU_KERNEL_BODY.md
modules/​dasLLAMA/​REVIEW_GATES.md
modules/​dasLLAMA/​REVIEW_FACADE.md
modules/​dasLLAMA/​REVIEW_DOCS.md
modules/​dasLLAMA/​REVIEW_AUDIO.md
modules/​dasLLAMA/​README.md
modules/​dasLLAMA/​HOW_TO_ADD_A_FORMAT.md
modules/​dasLLAMA/​harness/​vision_lane_probe.das
modules/​dasLLAMA/​harness/​README.md
modules/​dasLLAMA/​followup_metal.md
modules/​dasLLAMA/​dasllama/​dasllama_vulkan_dispatch.das
modules/​dasLLAMA/​dasllama/​dasllama_tune.das
modules/​dasLLAMA/​dasllama/​dasllama_transformer.das
modules/​dasLLAMA/​dasllama/​dasllama_tower_image.das
modules/​dasLLAMA/​dasllama/​dasllama_tower_flavor.das
modules/​dasLLAMA/​dasllama/​dasllama_qwen3v.das
modules/​dasLLAMA/​dasllama/​dasllama_qwen25v.das
modules/​dasLLAMA/​dasllama/​dasllama_metal_prefill.das
modules/​dasLLAMA/​dasllama/​dasllama_metal_kernels.das
modules/​dasLLAMA/​dasllama/​dasllama_metal_asr_dec.das
modules/​dasLLAMA/​dasllama/​dasllama_image.das
modules/​dasLLAMA/​dasllama/​dasllama_gpu_math.das
modules/​dasLLAMA/​dasllama/​dasllama_gemma4v.das
modules/​dasLLAMA/​dasllama/​dasllama_gemma3v.das
modules/​dasLLAMA/​dasllama/​dasllama_dispatch_scan.das
modules/​dasLLAMA/​dasllama/​dasllama_cuda_tower_audio.das Nit: comment mentions vulkan until CUDA seats land, but CUDA_AUDIO_HOMES maps all listed families to TowerDev.cuda; align comment or mapping.
modules/​dasLLAMA/​dasllama/​dasllama_cuda_mtp_gemma.das
modules/​dasLLAMA/​dasllama/​dasllama_cuda_dispatch.das
modules/​dasLLAMA/​benchmarks/​lcpp_bench.das
modules/​dasLLAMA/​ARCHITECTURE_MEDIA_TOWER.md
modules/​dasLLAMA/​ARCHITECTURE_MEDIA_ASR.md
modules/​dasLLAMA/​ARCHITECTURE_MEASUREMENT.md
modules/​dasLLAMA/​ARCHITECTURE_MEASUREMENT_RELEASE.md
modules/​dasLLAMA/​ARCHITECTURE_MEASUREMENT_AUDIO.md
modules/​dasLLAMA/​ARCHITECTURE_IMAGE.md
modules/​dasLLAMA/​ARCHITECTURE_IMAGE_LEDGER.md
modules/​dasLLAMA/​ARCHITECTURE_IMAGE_GPU_PLANES.md
modules/​dasLLAMA/​ARCHITECTURE_GPU_VULKAN_RESIDENCY.md
modules/​dasLLAMA/​ARCHITECTURE_GPU_VULKAN_NROW.md
modules/​dasLLAMA/​ARCHITECTURE_GPU_TOWER_FC.md
modules/​dasLLAMA/​ARCHITECTURE_GPU_SHARED_ATTN.md
modules/​dasLLAMA/​ARCHITECTURE_GPU_ASYMMETRIES.md
modules/​dasLLAMA/​ARCHITECTURE_ENGINE_FORMATS.md
modules/​dasLLAMA/​ARCHITECTURE_ENGINE_FORMATS_TERMS.md
modules/​dasLLAMA/​.das_module
modules/​dasCUDA/​REVIEW.md
modules/​dasCUDA/​cuda/​das_cuda_boost.das

Review effort: Balanced

borisbat and others added 8 commits November 6, 2026 23:20
The router GEMV kernel holds eight columns. The PLE gate and projection
rows of a short window launched it untiled with every row, so a tail past
eight rows read past the kernel's columns and the first token went wrong.
cud_router_enc_cols tiles every router launch, the CUDA twin of the Vulkan
home's router_enc_cols. The E2B Q4_K_M peel cell holds tails of 2, 9 and
16 rows to the same tail stepped a row at a time.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
metal_dn_step_fused dispatches threadgroups of ds*4 lanes, 512 at the
widest state. An entry that declares no size is capped below that on the
M1, so the pipeline refused the dispatch. The entry now declares
max_threads=512.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The cell read the home the environment spells and failed on a build that
does not carry it (a Metal build under DASLLAMA_GPU's discrete names). It
now skips by name, listing the homes the build has.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
test_vkd_gemv_ncol and the MoE resident fixture's tile census walked every
KqFmt member. The MLX members have no kernel on the discrete homes, so the
GEMV cell panicked in kq_tile_stamp on slot 21 and every resident MoE
census read a kernel name nothing seeded. Both walks now skip the members
kq_discrete_unstamped names.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
[dasllama_fallbacks] emitted its table from state the [tuned] macro
filled while a kernel's module compiled. A module the front-end cache
served ran no [tuned] apply, so a program whose own file changed got an
empty table: test_f32_batch_tile_perms read no reference permutation and
the tuner harness no shipped defaults. The table now reads each kernel's
fallback off its [tuned] annotation. The new cell compiles one root twice
over one cache record, the second copy a byte longer.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A batch-mate requiring the engine core brings the Vulkan home's entry,
which arms the GPU tier at [init] under the runner's DASLLAMA_GPU=1, and
no reset undoes an arm. test_gpu_tier's unset-seat contract and
test_gpu_serving_declines' no-decline control then red in any batch that
holds such a file, as master's own ten-file grouping does on a Vulkan box.
The runner now hands each a child of its own.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The never-dispatched roster named the five nmt_*_cls stamps without the
_spv suffix every class kernel's census key carries, so the Vulkan serving
census panicked on a key nothing seeded on any box with the zoo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Every audio family (whisper and the whisper-class chat towers, qwen3a,
gemma4a, canary, parakeet, GigaAM's three lanes with the RNNT and CTC
heads, the VAD) serves on the CUDA home through one chain body per
family, generic over a rail the Vulkan and CUDA seats both build; the
Vulkan bodies are deleted. Each GPU home now serves the same two lanes:
q8 as the default and f16 (halfword weights, f32 accumulate) as the
reference lane; the f32 device lanes are retired, f32 stays a CPU lane.
The Metal home gains q8 and f16 for canary, parakeet and gemma4a; the
gemma4a E4B projector tail serves at its two widths.

CUDA encodes land ahead of Vulkan on every family but the VAD (the LSTM
recurrence kernel), and the turbo f16 lane beats whisper.cpp f16 per
window on both homes; the levers are the tower-only cm2 column model,
graph capture of the tower chains, the shared-memory carveout left to
the driver for the no-smem tower classes, and side streams for q/k/v.
The LLM window keeps its own column pick.

Fixed on the way: the Vulkan rail did not reset the norms base between
chains (a FastConformer encode after a whisper one read stale offsets),
the split-k sum ran over the f16 lane's whole output, the whisper-class
exact stem declined on a q8-only layout field, a Vulkan K-quant GEMM
site bound past offset 0 was wrong on both homes (enforced at 0).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 7, 2026 07:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

🟡 Changes recommended

Changes are needed because there are still active review findings, notably that two “discrete” tower twin tests are Vulkan-gated and thus skip on CUDA-only builds leaving the CUDA tower path untested, along with a documentation line that inaccurately describes the overloaded visit bindings as read-only.

3 open issues

Review effort: Balanced

Comment thread modules/dasLLAMA/tests/test_qwen25v.das Resolved
Comment thread modules/dasLLAMA/tests/test_qwen3v.das Resolved
Comment thread skills/daslang/references/everything.md Resolved
@borisbat
borisbat merged commit 8ac18dd into master Nov 7, 2026
49 checks passed
@borisbat
borisbat deleted the bbatkin/asr-cuda branch November 7, 2026 08:24
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