Instructions to use labhamlet/speech-jepa-base-asr-10min with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use labhamlet/speech-jepa-base-asr-10min with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="labhamlet/speech-jepa-base-asr-10min", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCTC model = AutoModelForCTC.from_pretrained("labhamlet/speech-jepa-base-asr-10min", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Speech-JEPA Base, fine-tuned on 10 minutes of LibriSpeech
Speech-JEPA Base fine-tuned for character-level CTC speech recognition on the Libri-light 10 min split (1h/0, 48 utterances). The encoder was pretrained without labels on 16 kHz sampled speech audio (LibriSpeech, 960 h, 375k updates); see labhamlet/speech-jepa-base for a description of the model and its pretraining objective. When using the model make sure that your speech input is also sampled at 16 kHz.
Fine-tuned checkpoints
| Labelled data | Repository |
|---|---|
| Libri-light 10 min (this model) | labhamlet/speech-jepa-base-asr-10min |
| Libri-light 1 h | labhamlet/speech-jepa-base-asr-1h |
| Libri-light 10 h | labhamlet/speech-jepa-base-asr-10h |
| LibriSpeech train-clean-100 | labhamlet/speech-jepa-base-asr-100h |
| LibriSpeech 960 h | labhamlet/speech-jepa-base-asr-960h |
Usage
import torch
from datasets import load_dataset
from transformers import AutoModelForCTC, AutoProcessor
processor = AutoProcessor.from_pretrained("labhamlet/speech-jepa-base-asr-10min", trust_remote_code=True)
model = AutoModelForCTC.from_pretrained("labhamlet/speech-jepa-base-asr-10min", trust_remote_code=True).eval()
ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
inputs = processor(ds[0]["audio"]["array"], sampling_rate=16000, return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits # (1, frames, 29), one frame every 20 ms
print(processor.batch_decode(logits.argmax(dim=-1)))
For batched input pass padding=True to the processor. The returned attention_mask tells the model which samples are padding: an utterance is transcribed the same way in a padded batch as on its own, and padded frames are decoded as blank.
The output vocabulary is the 26 upper-case letters, the apostrophe, | as the word boundary and <pad> (index 0) as the CTC blank.
Fine-tuning
| Parameters | 89.7 M |
| Labelled data | Libri-light 10 min |
| Updates | 13,000 (Transformer frozen for the first 10,000; feature encoder always frozen) |
| Optimiser | Adam, betas (0.9, 0.98), peak learning rate 0.0001, tri-stage schedule (10% warm-up, 40% constant, 50% decay) |
| Batch | up to 480 s of audio, one GPU, bf16 mixed precision |
| Time masking | mask_time_prob=0.065, spans of 10 frames, at least 2 per utterance |
| Channel masking | mask_feature_prob=0.004, spans of 64 channels, at least 2 per utterance |
| Dropout | 0.1 before the CTC head; attention / activation / hidden 0.1 / 0.1 / 0.1; LayerDrop 0.05 |
| Model selection | lowest greedy WER on dev-other |
Files
model.safetensors,config.jsonβSpeechJEPAForCTCweights and configurationmodeling_speech_jepa.py,configuration_speech_jepa.pyβ model code (trust_remote_code=True)processor_config.json,preprocessor_config.json,vocab.json,tokenizer_config.jsonβWav2Vec2Processor(16 kHz, per-utterance normalisation, character CTC tokenizer)finetuning_config.jsonβ hyper-parameters of the fine-tuning run
License
BSD-3-Clause.
- Downloads last month
- 45