Downloads · 30 days
128
19% of all-time downloads
FluidInference/cohere-transcribe-03-2026-coreml
cohere-transcribe-03-2026-coreml is a automatic speech recognition model from FluidInference. Use it when you need speech turned into text. It is set up for coreml. The card lists the license as apache-2.0.
CoreML conversion of Cohere Transcribe 03-2026 with an INT8-quantized encoder and an FP16 cache-external decoder. This is the hybrid pairing used by FluidAudio for on-device inference.
Downloads · 30 days
128
19% of all-time downloads
All-time downloads
683
Public
Repo size
16.3 GB
Likes
3
Public
Click a slice to open those files.
.bin5 GB · 100%
From the Hugging Face model README
CoreML conversion of Cohere Transcribe 03-2026 with an INT8-quantized encoder and an FP16 cache-external decoder. This is the hybrid pairing used by FluidAudio for on-device inference.
For the pure FP16 variant see
FluidInference/cohere-transcribe-cache-external-coreml.
The encoder dominates compute (~65–70% of per-sample processing time at FP16). INT8 quantization of the encoder weights cuts encoder size ~4× (7.0 GB → 1.8 GB) and improves ANE utilisation with no measurable WER regression. The decoder is small (<300 MB) and sensitive to precision, so it stays FP16.
| Component | Precision | Size | Notes |
|---|---|---|---|
| Encoder | INT8 (per-channel weight) | 1.8 GB | Conformer, 24 blocks |
| Decoder | FP16 | 291 MB | Cache-external (Parakeet pattern), 8 layers |
| Tokenizer | — | 484 KB | SentencePiece (16,384 tokens) |
| Vocab | — | 332 KB | vocab.json id→piece map |
Same architecture as the FP16 cache-external variant:
The only change is the encoder weight precision — decoder I/O, masks, caches, and tokenizer are identical.
[1, 128, 3500] (35 s at 10 ms/frame)[1, 438, 1024] (FP16)input_id: [1, 1] — current tokenposition_id: [1, 1] — current positionencoder_hidden_states: [1, 438, 1024]cross_attention_mask: [1, 1, 1, 438]attention_mask: [1, 1, 1, seq_len] — grows each stepk_cache_0..7: [1, 8, 108, 128]v_cache_0..7: [1, 8, 108, 128]logits: [1, 16384]k_cache_0_out..7_out, v_cache_0_out..7_out: updated cachesTested with FluidAudio's fluidaudiocli cohere-mixed-benchmark on FLEURS (full splits,
INT8 encoder + FP16 cache-external decoder, ANE):
| Language | Samples | WER | CER | RTFx |
|---|---|---|---|---|
| en_us | 647 | 5.63% | 3.19% | 1.93× |
| fr_fr | 676 | 6.22% | 3.11% | 1.65× |
| (more languages pending) |
LibriSpeech test-clean (FP16 reference, for parity cross-check):
| Metric | Value |
|---|---|
| WER (FP16) | 11.95% |
| Perfect transcriptions | 2 / 10 |
| Main errors | Punctuation differences |
INT8-encoder WER on LibriSpeech is within FP16 noise (validated by comparing encoder hidden states against the FP16 reference on the same audio).
⚠️ Important: The EOS token is 3 (<|endoftext|>), not 151643!
# WRONG (vocabulary only has 16384 tokens)
EOS_TOKEN = 151643 # Out of range!
# CORRECT
EOS_TOKEN = 3 # From model.generation_config.eos_token_id
import CoreML
import Foundation
let encoderURL = modelDir.appendingPathComponent("cohere_encoder.mlmodelc")
let decoderURL = modelDir.appendingPathComponent("cohere_decoder_cache_external.mlmodelc")
let loaded = try CohereFixedPipeline.loadModels(
encoderURL: encoderURL,
decoderURL: decoderURL,
vocabDir: modelDir
)
let pipeline = try CohereFixedPipeline(models: loaded)
let result = try pipeline.transcribe(audio: samples, models: loaded)
print(result.text)
Full Swift implementation:
CohereFixedPipeline.swift — pipeline orchestration + vocab loadingCohereDecoderState.swift — KV cache managementCohereModelInference.swift — decoder executionSource: https://github.com/FluidInference/FluidAudio
Identical to the FP16 variant — swap cohere_encoder.mlpackage for the INT8 version:
encoder = ct.models.MLModel("cohere_encoder.mlpackage") # INT8
decoder = ct.models.MLModel("cohere_decoder_cache_external.mlpackage") # FP16
See the FP16 variant's README for the complete Python loop (unchanged here).
The cache-external pattern manages KV cache outside the CoreML model:
[1,1,1,1] → [1,1,1,2] → … → [1,1,1,108]14 languages: English, French, German, Spanish, Italian, Portuguese, Dutch, Polish, Greek, Arabic, Japanese, Chinese, Korean, Vietnamese.
cohere-transcribe-q8-cache-external-coreml/
├── cohere_encoder.mlmodelc # 1.8 GB — INT8 encoder (compiled)
├── cohere_encoder.mlpackage # 1.8 GB — INT8 encoder (source)
├── cohere_decoder_cache_external.mlmodelc # 291 MB — FP16 decoder (compiled)
├── cohere_decoder_cache_external.mlpackage # 291 MB — FP16 decoder (source)
├── tokenizer.model # SentencePiece tokenizer
├── vocab.json # id→piece map (16,384 entries)
├── example.py # Python usage example
├── requirements.txt # Python deps for example.py
├── wer_results_cache_external.json # Reference WER data
└── README.md # This file
The .mlmodelc variants are already compiled for fast runtime loading.
If you only need the source package, download just the .mlpackage directories:
huggingface-cli download FluidInference/cohere-transcribe-q8-cache-external-coreml \
--include "*.mlpackage/**" "tokenizer.model" "vocab.json"
To recompile .mlpackage → .mlmodelc:
xcrun coremlcompiler compile cohere_encoder.mlpackage output/
xcrun coremlcompiler compile cohere_decoder_cache_external.mlpackage output/
coremltools.optimize.coreml.linear_quantize_weights (applied via
tools/quantize_to_int8.py in the conversion pipeline)coreml-cli — no CPU fallback| Variant | Encoder | Decoder | Encoder size | Notes |
|---|---|---|---|---|
cohere-transcribe-cache-external-coreml | FP16 | FP16 | 7.0 GB | Reference |
cohere-transcribe-q8-cache-external-coreml (this) | INT8 | FP16 | 1.8 GB | Production hybrid |
@misc{cohere-transcribe-q8-cache-external-coreml,
title={Cohere Transcribe Q8 Cache-External CoreML},
author={FluidInference},
year={2026},
publisher={HuggingFace},
howpublished={\url{https://huggingface.co/FluidInference/cohere-transcribe-q8-cache-external-coreml}},
note={CoreML conversion with INT8 encoder + FP16 cache-external decoder (Parakeet pattern).}
}
CC-BY-NC-4.0 (matches original Cohere Transcribe model).