Conversation
NairoDorian
added a commit
to NairoDorian/transcribe.cpp
that referenced
this pull request
Sep 15, 2026
Port upstream PR handy-computer#162 which reduces memory usage across all model families by bounding intermediate tensors and trimming padded rows in-graph. Conformer infrastructure: - Add inplace_pre_encode and pre_encode_dw_time_chunk to ConvPolicy - Inplace conv bias + relu, chunked depthwise convs for bounded activation memory - Apply to canary_qwen and cohere encoders GigaAM: - Query-tiled attention for long sequences (T > 2048), tiling only the query axis to bound the O(T^2) score matrix Granite-NAR: - Replace host-side BPE-CTC pool+decode with graph-based bounded projection (512 windows per chunk), avoiding a full-utterance [vocab, T_enc] tensor Moonshine Streaming: - F16 sliding-window masks (no F32->F16 cast at graph build) - Per-layer mask deduplication (tiny: 6 layers share 2 unique masks) - Hard 81.92s input limit from 4096-row adapter position table - Input limit check in run()/run_batch/stream_feed - KV cache respects n_ctx cap Qwen3 ASR: - Removed encoder key-pad mask (build_cu_seqlens_mask, mask_in) - Bounded chunked subsample (32-chunk batches) replaces inline conv - KV cache init uses qwen3_context_ceiling instead of hardcoded 2048 Transcribe.cpp: - Update max_kv_bytes comment for sessions that default to F32 KV Tests: - Rename moonshine batch_truncation -> input_limit (tests adapter position table gate, not output truncation) - GigaAM smoke: 45s -> 90s (crosses query-tiling threshold) - Update qwen3_asr truncation test comment Docs: - Document moonshine_streaming 81.92s adapter-position limit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOTE THIS MAY BREAK MODELS, NOT SUITABLE FOR MERGING YET
Some notes from my 4750U machine
Granite Speech 4.1 2B NAR — Unrestricted run caused system OOM; isolated run exhausted 8 GiB RAM + 2 GiB swap and was killed. Clear usability failure.
Moonshine Streaming Tiny — ~6.3 GiB RSS for a 48 MiB model before aborting; explicit streaming still aborted at ~677 MiB. Extreme amplification plus a likely indexing/streaming bug.
Qwen3-ASR 0.6B — ~7.6 GiB RSS, then hit its generation/context cap. Very high for an ~811 MiB model; likely duration-dependent growth.
GigaAM v3 RNNT — ~4.0 GiB RSS for a ~261 MiB model. Roughly 15× model size and strong growth with duration.
Multitalker Parakeet — One-shot: 4.45 GiB; explicit streaming: 1.26 GiB. Large mode-dependent difference; perhaps avoid or bound the one-shot path.
Canary-Qwen 2.5B — CPU remained at ≥8 GiB; Vulkan ~8.17 GiB after this PR. Still unsuitable for many 6–8 GiB GPUs.
Cohere Transcribe — ~7.5 GiB CPU, 4.34 GiB Vulkan. High absolute requirement, although its 2.25 GiB weights explain part of it.
Granite 4.0 1B Speech — ~5.6 GiB RSS, with an isolated cgroup peak around 8 GiB. High total working set relative to its 2.4 GiB weights.
SenseVoice Small — ~1.2 GiB for a ~139 MiB model.
MOSS Transcribe-Diarize — ~2.7 GiB and extremely slow on the five-minute recording.
Granite TurboCTC — ~1.2–1.4 GiB depending on quantization.
Moonshine Tiny — ~697 MiB before hitting its generation cap.
CJ Notes
Introduced slop limit on moonshine streaming