Skip to content

Expose Drama3 decode performance controls and default to F16 KV - #1068

Merged
0xShug0 merged 1 commit into
mainfrom
perf/drama3-ar-components
Oct 24, 2026
Merged

0xShug0 merged 1 commit into
mainfrom
perf/drama3-ar-components

Conversation

@0xShug0

@0xShug0 0xShug0 commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Changes

  • Add fish_drama3.perf_mode=off|cuda_perf, defaulting to off. The CUDA preset enables cached-decode MoE routing/SwiGLU fusion and 256-row attention-prefix buckets. Explicit session options override the preset.
  • Expose fish_drama3.fused_moe, fish_drama3.kv_cache_alignment, and fish_drama3.kv_cache_type. MoE fusion remains off and alignment remains 1 by default.
  • Use F16 backbone full-attention KV storage by default. Explicit kv_cache_type=f32 restores F32 storage. Weight precision and GDN recurrent-state precision are unchanged.
  • Keep bucket graphs session-owned and reuse them across requests without discarding KV/history. Buckets limit attention to the valid prefix; they do not introduce sliding-window attention.
  • Update the spec, model documentation, model-local acceptance for existing GGUFs, and the existing backbone test. Device sampling, codec batching/overlap, and prefill-cache defaults are unchanged.
  • No GGML, shared-framework, server, UI, projection-packing, or fused-GDN changes.

Performance

RTX 5090, Debug build, eight threads, the same Q4_K_S-expert/Q8_0-tower GGUF and reference voice. The inputs match #1067: each session ran one warmup and three distinct 262-266-character clone requests, sequentially. Settings: seed 42, temperature 1, top-k 4097, top-p 0.9, context 4096, text chunk size 2000. All outputs stopped naturally.

Main default (a7f18608) versus this PR (0e50d365) with fish_drama3.perf_mode=cuda_perf. Warm RTF uses summed session.wall_ms divided by summed generated duration, excluding warmup; peak VRAM includes model load and warmup. Offload uses eight expert slots and pinned host weights; the codec stays on the GPU.

Backend / mode Main warm RTF PR warm RTF Main peak VRAM PR peak VRAM
Full CUDA 0.1656 0.1473 23,502 MiB 23,448 MiB
CUDA CPU-weight offload 0.4345 0.4199 6,684 MiB 6,638 MiB
Full Vulkan 0.2338 0.2215 22,893 MiB 22,819 MiB
Vulkan CPU-weight offload 0.5811 0.5836 6,002 MiB 5,971 MiB

RTF reductions are approximately 11.1%, 3.4%, and 5.3% for full CUDA, CUDA offload, and full Vulkan. Vulkan offload is effectively flat: 0.4% slower in this pair. Each configuration was measured once, so small differences are not claimed as repeatable wins or meaningful VRAM savings. Sampled durations differ except for Vulkan offload; these are matched-request, not matched-token measurements.

Validation And Limits

  • The existing model-local backbone allocation/prefill/continuation test and model_spec_system_test passed. The backbone test covers F16 KV, MoE fusion, attention buckets, and their combination, including changing prompt lengths and bucket transitions.
  • CUDA with F16 KV, alignment 1, and MoE fusion off produced all four WAVs byte-identical to the main control. Its quick comparison measured warm RTF 0.1687 to 0.1624 and peak VRAM 23,500 to 23,420 MiB. This is not a universal F16 waveform-parity guarantee.
  • Explicit fused_moe=false, kv_cache_type=f32, and kv_cache_alignment=1 override even cuda_perf; all four CUDA WAVs then matched the main control byte-for-byte.
  • All eight performance configurations completed. Paired request JSONs and non-performance configuration fields were verified identical. Vulkan offload WAVs were byte-identical; the other combined-preset pairs changed sampled audio. No ASR rerun was used for this performance comparison.
  • Full-model CPU/Metal/HIP execution and long-form bucket-memory scaling were not validated in this pass.

@0xShug0
0xShug0 merged commit 57872be into main Oct 24, 2026
7 checks passed
@0xShug0
0xShug0 deleted the perf/drama3-ar-components branch October 24, 2026 02:57
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.

1 participant