Add CohereAsrOpenVINOConfig for CohereLabs/cohere-transcribe-03-2026#1788
Draft
mlukasze wants to merge 2 commits into
Draft
Add CohereAsrOpenVINOConfig for CohereLabs/cohere-transcribe-03-2026#1788mlukasze wants to merge 2 commits into
mlukasze wants to merge 2 commits into
Conversation
## Summary Adds OpenVINO export support for the CohereAsr model architecture (cohere_asr). ## Architecture - **Encoder**: Conformer-based encoder with configurable layers and dimensions - **Decoder**: Transformer-based decoder with optional KV-caching support - **Tensor contract**: Follows Whisper-like pattern (input_features → encoder; encoder_outputs + decoder_input_ids + past_key_values → decoder logits) - **Feature extraction**: Mel-spectrogrambased audio preprocessing ## Changes 1. **optimum/exporters/openvino/model_configs.py**: - Register cohere_asr model type for automatic-speech-recognition tasks - Implement CohereAsrOpenVINOConfig extending WhisperOpenVINOConfig - Handle dynamic config field mapping (encoder, decoder config extraction) 2. **Documentation**: Add Cohere ASR to supported architectures list 3. **Tests**: - Add integration test (CohereAsrTest) comparing OpenVINO export to PyTorch reference - Add export CLI test coverage - Add tiny test model configuration (mlukasze/tiny-random-cohere-asr on HuggingFace Hub) ## Test Model Note The tiny test model is published to HuggingFace Hub (mlukasze/tiny-random-cohere-asr). Local tiny model can be provided via OPTIMUM_INTEL_COHERE_ASR_TEST_MODEL environment variable. ## Tested on - transformers>=4.57.0 (Cohere ASR support)
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
rkazants
reviewed
Jun 17, 2026
| gc.collect() | ||
|
|
||
|
|
||
| class CohereAsrTest(unittest.TestCase): |
Collaborator
There was a problem hiding this comment.
use existing test suite for ASR, no need to implement a new one. Having common test suite gives confidence to check optimum-intel API
rkazants
requested changes
Jun 17, 2026
rkazants
left a comment
Collaborator
There was a problem hiding this comment.
need to reimplement tests and provide proper PR description with python code snippets how to set-up, export and infer
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.
Summary
Add OpenVINO export support for the
cohere_asrmodel type, enabling inference ofCohereLabs/cohere-transcribe-03-2026and compatible models viaOVModelForSpeechSeq2Seq.Changes
CohereAsrOpenVINOConfigfor thecohere_asrmodel type under theautomatic-speech-recognitiontask; extendsWhisperOpenVINOConfigand handles nested encoder/decoder config extractioncohere_asrto the supported architectures listcohere_asrtoOVModelForSpeechSeq2SeqIntegrationTest.SUPPORTED_ARCHITECTURES(requires transformers ≥ 4.57.0)cohere_asrExport
pip install optimum[openvino] transformers>=4.57.0optimum-cli export openvino \ --model CohereLabs/cohere-transcribe-03-2026 \ --task automatic-speech-recognition \ --weight-format fp16 \ ./cohere-transcribe-openvinoInference
Tested on
CohereLabs/cohere-transcribe-03-2026: CPU WER 1.20% vs reference 1.25% on 50 LibriSpeech clean samples.