Blazingly fast whisper transcriptions with Inference Endpoints
Hugging Face Inference Endpoints now offers a Whisper deployment built on vLLM that delivers up to roughly 8x higher real-time factor (RTFx) than the Transformers implementation, with comparable word error rate. It targets NVIDIA Ada Lovelace GPUs (L4, L40s) and gets its speedup from torch.compile JIT kernels, CUDA graphs that batch GPU kernel launches, and a float8 KV cache that halves cache memory versus bfloat16. Whisper Large V3, V3-Turbo and Distil-Whisper V3.5 were benchmarked for WER on 8 Open ASR Leaderboard datasets and for RTFx on 45+ minute rev16 audio using a single L4. Deployment is one click, and the endpoint is called through an OpenAI-style /audio/transcriptions HTTP API; a FastRTC demo shows real-time transcription.
Related posts
- Powerful ASR + diarization + speculative decoding with Hugging Face Inference Endpoints
Hugging Face mediumAdeptA custom inference handler on Hugging Face Inference Endpoints serves Whisper ASR, Pyannote speaker diarization and speculative decoding behind a single API endpoint. The handler is split into model settings, inference config and diarization utilities, with models chosen via Pydantic environment variables. Creating the endpoint through the API is needed to pass the HF token that diarization requires. A k6 benchmark on an A10 GPU shows distil-large-v3 as assistant model cutting latency on 8s audio from ~784ms to ~327ms but slowing 60s audio (3.48s to 4.15s). Speculative decoding requires batch size 1, so batching wins for long, chunked inputs.
- Deploying Speech-to-Speech on Hugging Face
Hugging Face mediumAdeptHugging Face's Speech-to-Speech pipeline (VAD, speech-to-text, LLM, text-to-speech) can be deployed to Inference Endpoints by forking the huggingface-inference-toolkit into a custom Docker image. Code and data ship as git submodules and requirements are installed at build time, which cuts endpoint startup time. The endpoint runs on an AWS L4 GPU at about $0.80/hour and is configured through either the GUI or the huggingface_hub API, with container port 80 and an HF_TOKEN secret for gated models. A small Starlette WebSocket webservice keeps latency low, and a Python client records audio, streams it to the server and plays back the queued responses.
- Speculative Decoding for 2x Faster Whisper Inference
Hugging Face mediumAdeptSpeculative decoding speeds up Whisper transcription by about 2x while producing mathematically identical outputs. A fast assistant model drafts candidate tokens and the main model verifies them in a single forward pass. With Distil-Whisper (full encoder, 2 decoder layers) as assistant to Whisper large-v2, a 73-sample LibriSpeech benchmark dropped from 73s to 33s at the same 3.5% WER, with only about 8% extra VRAM from sharing the encoder. For multilingual use, a multilingual checkpoint such as Whisper tiny can serve as assistant, since the only hard constraint is an identical tokenizer. Note that large-v3's expanded vocabulary makes it incompatible with older checkpoints.
- Transcribe speech 100x faster and 100x cheaper with open models
Modal mediumAdept
Open-weights ASR models such as NVIDIA's parakeet-tdt-0.6b-v2 and canary-1b-flash, deployed as a batch transcription service on Modal GPUs, transcribed about a week of ESB benchmark audio in roughly a minute for about $1. That works out to over 100x faster or up to 200x cheaper than a popular proprietary API, at matching or slightly lower WER. The gains come from measuring end-to-end throughput including cold starts and data transfer, shuffling files before dealing them into requests to balance load across workers, and sorting audio by duration within each GPU worker so batch lanes finish together. Parallel threaded downloads also help. Sweeping GPU type and worker count produces a Pareto frontier of cost-versus-speed configurations rather than a single optimum.
- Fine-Tune Wav2Vec2 for English ASR in Hugging Face with 🤗 Transformers
Hugging Face mediumAdeptWav2Vec2, pretrained with a contrastive masked objective on 50k+ hours of unlabeled speech, can be fine-tuned with CTC on small labeled datasets for end-to-end English ASR without a language model. The walkthrough fine-tunes the base checkpoint on the 5-hour Timit corpus using 🤗 Transformers and Datasets. It covers building a character-level CTC vocabulary (lowercasing, stripping punctuation, keeping apostrophes, mapping space to a word delimiter, and adding UNK and PAD/blank tokens), and configuring the feature extractor with a matching 16kHz sampling rate and normalization. It also explains why the base checkpoint works better without an attention mask, and evaluates with WER via jiwer while pushing checkpoints to the Hub.