Skip to content

Add Oruk Fourier 2B transcription pipelines (local HF and hosted API) - #110

Open
Nathan-Roll1 wants to merge 1 commit into
argmaxinc:mainfrom
Nathan-Roll1:feat/add-oruk-fourier-2b
Open

Nathan-Roll1 wants to merge 1 commit into
argmaxinc:mainfrom
Nathan-Roll1:feat/add-oruk-fourier-2b

Conversation

@Nathan-Roll1

Copy link
Copy Markdown

Summary

Adds opt-in transcription support for Oruk Fourier 2B — an English-only Qwen3-ASR 1.7B fine-tune with tied output embeddings — alongside Argmax's existing Qwen3-ASR 1.7B support (#102, #109):

  • Local Hugging Face pipeline (oruk-fourier-2b): OrukFourierEngine + OrukFourierTranscriptionPipeline loads pinned oruk/oruk-fourier-2b@8c2a8871f1304aa2f634da4fb95e24438c4945b9 directly via huggingface_hub.snapshot_download (fetching strictly the 7 native root checkpoint files including config.json, skipping ~9 GB of auxiliary GGUF/ONNX/MLX subfolders) and native transformers >= 5.21.0 (Qwen3ASRForConditionalGeneration / AutoModelForMultimodalLM + AutoProcessor). Supports:
    • --use-keywords via Qwen3-ASR's native system-prompt context biasing (apply_transcription_request(..., prompt=...)), matching OpenBench's keyword-boosting evaluation contract (earnings22-keywords).
    • --force-language and sequential 30 s chunking (chunk_length_s=30.0) respecting Qwen3-ASR's max_source_positions=1500.
    • Configurable decode_mode: "published" (default, preserves generation_config.json 3-beam settings) or "greedy" (num_beams=1, do_sample=False).
    • Lazy transformers import with a clear ImportError if the environment has transformers < 5.21.0 — zero changes to pyproject.toml or uv.lock.
  • Hosted API pipeline (oruk-fourier-2b-api): OrukApi + OrukApiTranscriptionPipeline uses OpenBench's existing openai dependency against https://speech-api.oruk.ai/v1/audio/transcriptions (model="oruk-fourier-2b", $0.0080/min, requires ORUK_API_KEY, optional ORUK_BASE_URL), strictly adhering to the endpoint's schema (file, model, response_format="json", and optional English language).
  • Tests: 12 offline unit tests in tests/engine/test_oruk_engine.py covering helpers, strict API wire schema, missing ORUK_API_KEY, transformers < 5.21.0 guard, pinned 7-file HF download, 30 s chunking, system-prompt keyword forwarding, alias registration, and guaranteed temp-file cleanup.

BENCHMARKS.md is intentionally left untouched in this PR so official OpenBench earnings22-keywords numbers can be measured and submitted cleanly as a follow-up (matching the pattern in #109).

Reference Benchmarks (Hugging Face Open ASR Leaderboard)

oruk/oruk-fourier-2b@8c2a8871 is live on the official Hugging Face Open ASR Leaderboard (v1.16.3, huggingface/open_asr_leaderboard#298, independently reproduced by @ebezzam), improving over base Qwen/Qwen3-ASR-1.7B-hf on all 7 default public English splits:

Split oruk/oruk-fourier-2b (BF16) Qwen/Qwen3-ASR-1.7B-hf (BF16) Delta
7-Split Mean WER 4.95% 5.75% -0.80 pp (-13.9% rel.)
AMI-Cleaned 6.73% 8.31% -1.58 pp
VoxPopuli-AA-Cleaned 1.46% 2.85% -1.39 pp
SPGISpeech 1.87% 2.57% -0.70 pp
GigaSpeech-Cleaned 6.50% 7.22% -0.72 pp
URGENT2024 9.03% 9.93% -0.90 pp
Earnings22-Cleaned-AA-chunked 5.61% 5.84% -0.23 pp
Voice Arena Monsoon 3.42% 3.50% -0.08 pp

Methodology note: Open ASR Leaderboard BF16 rows compare oruk/oruk-fourier-2b's default 3-beam decoding (generation_config.json: num_beams=3, no_repeat_ngram_size=8) against greedy Qwen/Qwen3-ASR-1.7B-hf. Both decode_mode="published" and decode_mode="greedy" are supported in OrukFourierTranscriptionConfig.

Scope, License & Affiliation

  • Language: English-only.
  • License: Local open weights are licensed under CC BY-NC 4.0 (non-commercial); commercial usage is available via the hosted API ($0.0080/min).
  • Disclosure: I work on Fourier at Oruk.

Validation

  • uvx ruff check src/ tests/engine/test_oruk_engine.py: All checks passed
  • uvx ruff format --check --diff src/ tests/engine/test_oruk_engine.py: 106 files already formatted
  • uv run pytest tests/engine/test_oruk_engine.py -vv -p no:warnings: 12 passed
  • uv run pytest tests/ -k "not test_cpwer_real and not test_wder_real" -v -p no:warnings: 105 passed (the 4 deselected tests require private argmaxinc/test-fixtures HF credentials)
  • uv run openbench-cli summary --disable-datasets --disable-metrics --disable-compatibility: lists both oruk-fourier-2b (OrukFourierTranscriptionPipeline) and oruk-fourier-2b-api (OrukApiTranscriptionPipeline)
  • Live local MPS BF16 smoke test (transformers 5.24.1, Apple Silicon MPS, oruk/oruk-fourier-2b@8c2a8871): fetched 7/7 pinned native files, loaded 707/707 tensors, and transcribed an English WAV clip verbatim ("The quick brown fox jumps over the lazy dog.") both plain and with prompt="quick brown fox, lazy dog" (0.326 s warm).

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