Skip to content

Add resident Vulkan Cohere GGUF transcription - #792

Merged
peteonrails merged 4 commits into
peteonrails:devfrom
jacob-vincent-mink:feat/cohere-gguf-vulkan
Nov 10, 2026
Merged

peteonrails merged 4 commits into
peteonrails:devfrom
jacob-vincent-mink:feat/cohere-gguf-vulkan

Conversation

@jacob-vincent-mink

@jacob-vincent-mink jacob-vincent-mink commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Run Cohere .gguf models through the official transcribe.cpp Rust binding in the Voxtype daemon. The model and session remain resident across recordings when on_demand_loading = false; no separate worker is needed.
  • Add explicit Vulkan selection and reject a software renderer when Vulkan is requested.
  • Split long Cohere audio near quiet boundaries for both ONNX and GGUF. cohere.max_chunk_secs defaults to 35 (range 5–35); cohere.boundary_search_secs defaults to 2.5 (range 0–5).
  • Add Cohere GGUF models to voxtype setup model, voxtype setup --download --model, and voxtype info models. The curated choices are Q4_K_M (1.56 GB) and Q8_0 (2.41 GB) from a pinned revision of handy-computer's official model repository. Setup checks size, GGUF header, and publisher SHA-256 before making a download visible. The other published quantizations can still be used by path.

Validation

  • Q4_K_M was downloaded and its 1,558,162,944 bytes matched SHA-256 0ea56826d8bd5d74b7143a4a04e022dc1bb75452cfae49d98b6acb0c1d16a1fb.
  • On this machine's Intel Arc B390 iGPU, transcribe.cpp selected Vulkan0 and transcribed an 11-second speech clip correctly. A hardware-gated test reused one loaded session twice; a 66-second repeated clip exercised two chunks and returned all six repetitions. These are integration checks, not long-form WER measurements.
  • With temporary XDG directories, voxtype info models --engine cohere --json --verify recognized the installed Q4_K_M file and reported verified: ok; voxtype setup --model ... --activate selected it in the temporary config.
  • cargo check --locked --features gpu-vulkan, cargo test --locked --features cohere-gguf --lib setup::, the GGUF validation test, cargo fmt, and git diff --check pass. Q8_0's official size and checksum are pinned, but its inference was not tested on this machine.
  • The installed Voxtype service and active config were not changed.

Review context

  • Cohere's model card describes processor-side splitting of long recordings. Ryan's omarchy-pkgs PR #617 uses quiet-boundary splitting and reports improved WER on nine excerpts against approximate captions; that is not a general WER benchmark.
  • This draft covers the resident GGUF inference and first-party model download roles of the separate helper proposed in omarchy-pkgs PR Handle auto-punctuating engines in spoken punctuation #617. It does not implement an end-to-end fallback policy. Omarchy PR #13098 also owns installation defaults and shell visuals, which remain Omarchy-specific.
  • Parakeet, Canary, and MOSS would need model-specific runtime work before they can be offered through this Cohere setup path.

@jacob-vincent-mink

Copy link
Copy Markdown
Collaborator Author

@peteonrails fyr - cohere gguf support, some other stuff coming to handle model install. tested on Intel PTL iGPU w Vulkan.

@peteonrails peteonrails added omarchy models Model registry, downloads, or ONNX engine model files important Needs Pete's attention soon labels Sep 24, 2026
@peteonrails peteonrails added this to the 1.2.0 milestone Sep 24, 2026
@peteonrails peteonrails self-assigned this Sep 24, 2026
@jacob-vincent-mink

jacob-vincent-mink commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator Author

ONNX → GGUF migration research (2026-09-24)

This tracks a possible future migration; it is not a request to expand this PR. The Cohere path in this draft demonstrates the desired in-process pattern: transcribe.cpp's Rust binding loads a GGUF into the Voxtype daemon and retains its model/session between recordings. Voxtype now catalogs and checksum-verifies curated Cohere Q4_K_M and Q8_0 downloads. The configurable quiet-boundary chunker applies to both Cohere runtimes; its long-form WER still needs measurement.

Runtime and model coverage

GGUF is a tensor/metadata container, not a universal speech model ABI. A runtime needs the model architecture, frontend, tokenizer/decoder, and the right GGUF layout. audio.cpp says this explicitly. I checked the published model lists and current source trees of whisper.cpp, audio.cpp, and transcribe.cpp, plus the architecture registry vendored by Voxtype's pinned transcribe-cpp 0.2.3 crate.

Voxtype engine today GGUF migration path / gap
Whisper Already uses whisper.cpp in-process with its custom GGML .bin, not GGUF. transcribe.cpp publishes Whisper GGUFs. Preserve existing installs and compare translation, language detection, timestamps, WER, startup and throughput before moving Whisper to another runtime.
Parakeet Currently parakeet-rs/ONNX. transcribe.cpp has Parakeet GGUF ports, including TDT v3; compare Voxtype's streaming and timestamp behavior before replacing it.
Moonshine transcribe.cpp has GGUF ports. Its short-utterance/output limit needs explicit chunking/truncation handling; Moonshine Streaming is a separate family.
SenseVoice transcribe.cpp has a GGUF port. Compare language behavior, text normalization, and CJK results with Voxtype's ONNX path.
Cohere This draft already selects transcribe.cpp for .gguf files while retaining the ONNX choice. Q4_K_M was tested on Intel Vulkan with a resident session; Q8_0 is pinned in setup but has not been inference-tested here.
Paraformer No Paraformer loader in the three runtimes above. FunASR ships a Paraformer GGUF runner and CrispASR has a Paraformer port / GGUF for funasr/paraformer-zh. Voxtype offers both paraformer-zh and paraformer-en from sherpa-onnx exports; English checkpoint coverage and exact weight parity are unproven.
Dolphin No Dolphin loader in the three runtimes above. CrispASR's GGUF is Dolphin CN-Dialect small streaming, not Voxtype's dolphin-base CTC export. Its decode includes CTC prefix beam search and attention rescoring, so it is a model/behavior change, not a file swap.
Omnilingual No OmniASR loader in the three runtimes above. audio.cpp's omnivoice is TTS, unrelated. CrispASR has OmniASR CTC 300M v2 and a published GGUF. Voxtype's omnilingual-300m is a 2025 sherpa-onnx export; verify checkpoint/version, 1600+ language coverage, and accuracy before treating v2 as equivalent.
OpenVINO Whisper Keep it. Voxtype calls OpenVINO GenAI directly for Intel NPU/CPU/GPU. Removing ONNX Runtime does not require removing this path, and Vulkan on an iGPU is not a substitute for Intel NPU support.
Soniox / remote Whisper Cloud/network backends are outside this local model-format migration.

CrispASR is a whisper.cpp fork with Paraformer, Dolphin, and OmniASR implementations, a C ABI/Rust bindings, and Vulkan builds. It is the most concrete alternative if preserving all three families is the goal. Its published variants are not automatically the same checkpoints Voxtype ships today. FunASR's Paraformer runner is another focused option. Porting the missing families into transcribe.cpp is a third option. Other transcribe.cpp models (Canary, Qwen3-ASR, MOSS, etc.) could fill some user needs, but they should be evaluated as new model choices, not silent replacements for these engines.

What changes across Voxtype if ONNX Runtime is removed

  • Inference: Add a shared transcribe.cpp GGUF adapter instead of cloning cohere_gguf.rs for every family. Keep user-facing engine names, and let model metadata choose runtime/backend. Query architecture and capabilities at load: supported languages, translation, timestamp granularity, streaming, and input limits. The pinned Rust binding exposes model architecture/capabilities, run, and streaming; Voxtype currently exercises its Cohere batch path. Retain a resident model/session in the existing daemon. Keep whisper.cpp for legacy GGML files during any transition.
  • Configuration and setup: Decouple engine (model family) from runtime/format and GPU backend. Today cohere enables ONNX plus GGUF, and gpu-vulkan enables both whisper.cpp and transcribe.cpp Vulkan. Update feature gates, factory dispatch, model catalog, picker/TUI, checksums, model paths, activation, migration of existing installs, and error messages as each family moves. A .gguf extension or magic header can identify the container, but should not be used as proof of architecture compatibility.
  • Behavior: Compare short and long-form WER/CER, language coverage, punctuation/ITN, latency, memory, GPU selection, failure handling, timestamps, translation, and streaming against the current ONNX variants. Use each model's real input/output limits; Cohere's configurable 35-second quiet-boundary split is not a universal default for Parakeet, Whisper, or Moonshine. Do not claim parity from a short smoke clip.
  • Other ONNX users: Optional ECAPA-TDNN speaker embeddings (ml-diarization) and GTCRN speech enhancement also use ort; removing transcription ONNX engines alone does not remove the dependency. They need separate GGUF/native alternatives or an explicit decision to retain/drop those features. Voxtype's Silero VAD path already uses a whisper.cpp-style GGML model.
  • Build/release: Once no ONNX feature remains, remove ort, parakeet-rs, shared ONNX preprocessing/EP code, export/mirror plumbing, ONNX model manifests, and ONNX binary/provider packaging. This touches Cargo features, the binary chooser, Dockerfiles, Linux/macOS builds, AppImages, package scripts, release validation, and docs. Keep OpenVINO's direct runtime and Intel packages.

Suggested order: (1) metadata/capability-driven catalog plus shared resident adapter; (2) Parakeet, Moonshine, SenseVoice migrations with side-by-side benchmarks; (3) choose transcribe.cpp ports vs an in-process CrispASR path vs retaining ONNX for Paraformer/Dolphin/Omnilingual, validating exact variants and licenses; (4) handle ECAPA/GTCRN; (5) remove ONNX build and distribution surfaces only after coverage is accounted for. This keeps the draft PR focused while making the migration decision reviewable.

iainlane pushed a commit to iainlane/voxtype that referenced this pull request Sep 27, 2026
Ryan's Omarchy loopback proved Cohere GGUF on Vulkan works well
enough that it belongs in voxtype natively rather than staying an
Omarchy-side workaround, and Jacob's peteonrails#792 is already landing it for
1.2.0. That changes the shape of the rest of the roadmap: ONNX
Runtime's build/packaging burden (5 of 8 release binaries, the
AVX-512 leakage checks, the MIGraphX EP question, Cohere's CUDA
decoder gap) all trace back to ONNX specifically, and peteonrails#792 shows the
ggml alternative resolves several of them outright rather than
needing separate fixes. Records the decision to remove ONNX Runtime
at 2.0 once the remaining engines get an explicit port-or-retire call.
peteonrails added a commit that referenced this pull request Oct 16, 2026
The runtime has been R2-only since #459, with no HuggingFace fallback, but
the GGUF entry #792 added built its own huggingface.co/resolve/<rev> URL and
bypassed that. Both quantizations are now mirrored under the cohere prefix,
so point the downloader at them.

Q8_0 needed mirroring first; Q4_K_M was already there. Both verified against
the sha256s pinned here before upload, so no hashes change.

The R2 directory is spelled out per entry rather than derived from the file
name: the mirrored layout lowercases and swaps .gguf for -gguf, and a
derivation that subtle is worth being able to grep for.

Kept COHERE_GGUF_REPO and COHERE_GGUF_REVISION as provenance - the runtime
never reads them now, but whoever re-mirrors needs the source and the
revision the hashes came from.

Also fixes a clippy lint in cohere_chunking's test that only appears when
linting with --features cohere-gguf, which CI does not do.
crmne added a commit to crmne/voxtype that referenced this pull request Oct 21, 2026
Brings in transcribe.cpp (Cohere GGUF, peteonrails#792) and the 1.2.0 cleanup
pipeline, so the Parakeet GGUF branch can sit on top.

Conflicts:
- notification.rs: kept the D-Bus delivery of peteonrails#881 and added 1.2.0's
  body_markup probe.
- output: the cleanup diff now runs through the titled notification
  of peteonrails#880, so the clipboard-fallback label keeps the edit count.
- evdev: peteonrails#884 opens devices in start(); it now passes the watched keys.
- setup: peteonrails#880's pure build_output_chain gains 1.2.0's compositor and
  /dev/uinput checks.
- parakeet.rs: kept peteonrails#891's pause-cut windows, which also cover timed
  transcription; rc's max_window_secs/window_overlap_secs are unused here.
- ci.yml: requires both clippy-features and macos-check.
@peteonrails
peteonrails merged commit a224354 into peteonrails:dev Nov 10, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

important Needs Pete's attention soon models Model registry, downloads, or ONNX engine model files omarchy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants