Automatic Speech Recognition
Transformers
Safetensors
English
Swahili
whisper
8-bit precision
bitsandbytes
Instructions to use Jacaranda-Health/ASR-STT-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Jacaranda-Health/ASR-STT-8bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="Jacaranda-Health/ASR-STT-8bit")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("Jacaranda-Health/ASR-STT-8bit") model = AutoModelForSpeechSeq2Seq.from_pretrained("Jacaranda-Health/ASR-STT-8bit", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Delete README (1).md
Browse files1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980---license: apache-2.0base_model: Jacaranda-Health/ASR-STTtags:- speech-to-text- automatic-speech-recognition- quantized- 8bitlanguage:- enpipeline_tag: automatic-speech-recognition---
# ASR-STT 8BIT Quantized
This is a 8bit quantized version of [Jacaranda-Health/ASR-STT](https://huggingface.co/Jacaranda-Health/ASR-STT).
## Model Details- **Base Model**: Jacaranda-Health/ASR-STT- **Quantization**: 8bit- **Size Reduction**: 73.1% smaller than original- **Original Size**: 2913.89 MB- **Quantized Size**: 784.94 MB
## Usage
```pythonfrom transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, BitsAndBytesConfigimport torchimport librosa
# Load processorprocessor = AutoProcessor.from_pretrained("eolang/ASR-STT-8bit")
# Configure quantizationquantization_config = BitsAndBytesConfig( load_in_8bit=True llm_int8_threshold=6.0, llm_int8_has_fp16_weight=False )
# Load quantized modelmodel = AutoModelForSpeechSeq2Seq.from_pretrained( "eolang/ASR-STT-8bit", quantization_config=quantization_config, device_map="auto")
# Transcription functiondef transcribe(filepath): audio, sr = librosa.load(filepath, sr=16000) inputs = processor(audio, sampling_rate=sr, return_tensors="pt") # Convert to half precision for quantized models if torch.cuda.is_available(): inputs = {k: v.cuda().half() for k, v in inputs.items()} else: inputs = {k: v.half() for k, v in inputs.items()} with torch.no_grad(): generated_ids = model.generate(inputs["input_features"]) return processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
# Example usagetranscription = transcribe("path/to/audio.wav")print(transcription)```
## Performance- Faster inference due to reduced precision- Lower memory usage- Maintained transcription quality
## Requirements- transformers- torch- bitsandbytes- librosaREADME (1).mdDeleted-80