Instructions to use tsilahi/looma-dictation-slm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tsilahi/looma-dictation-slm with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tsilahi/looma-dictation-slm")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("tsilahi/looma-dictation-slm") model = AutoModelForSeq2SeqLM.from_pretrained("tsilahi/looma-dictation-slm", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tsilahi/looma-dictation-slm with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tsilahi/looma-dictation-slm" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tsilahi/looma-dictation-slm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tsilahi/looma-dictation-slm
- SGLang
How to use tsilahi/looma-dictation-slm with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "tsilahi/looma-dictation-slm" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tsilahi/looma-dictation-slm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "tsilahi/looma-dictation-slm" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tsilahi/looma-dictation-slm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tsilahi/looma-dictation-slm with Docker Model Runner:
docker model run hf.co/tsilahi/looma-dictation-slm
YAML Metadata Warning:The pipeline tag "text2text-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
Looma Dictation SLM (looma-dictation-slm)
A fine-tuned, lightweight Speech Normalization & Disfluency Removal SLM (Small Language Model) built specifically for real-time speech-to-text post-processing and private smart dictation.
Unlike standard conversational instruction-tuned LLMs that mistakenly answer questions when users dictate thoughts (e.g. answering "What is our budget?" with conversational text), Looma Dictation SLM strictly operates as a non-dialogue text restructuring engine. It removes filler words ("um", "uh", "basically"), fixes grammar, restores capitalization, and inserts proper punctuation while faithfully preserving speaker intent.
Model Details
- Model Name: Looma Dictation SLM (
looma-dictation-slm) - Developed by: Twashin ilahi / Looma Team
- Shared by:
tsilahi - Model Type: Sequence-to-Sequence (Seq2Seq) Encoder-Decoder
- Base Model:
google/flan-t5-small(~60M parameters) - Language(s): English (
en) - License: Apache 2.0
- Target Deployment: WebAssembly / ONNX (In-Browser with Transformers.js), Desktop, and Mobile devices (100% offline, $0 cloud cost)
Intended Uses
Direct Use
- Voice Dictation Normalization: Transforming raw, messy automatic speech recognition (ASR) transcripts into clean, punctuated, professional sentences.
- Speech Disfluency Stripping: Removing verbal pause fillers ("um", "uh", "er", "like", "you know", "basically") and stuttered word repetitions ("the the", "we we").
- Zero-Reply Punctuation & Capitalization: Structuring dictated questions ("how can we solve this" $\rightarrow$ "How can we solve this?") without triggering conversational chatbot replies.
Out-of-Scope Use
- Conversational chat or QA assistant (the model is explicitly tuned to never generate conversational answers).
- Long-form creative writing or open-ended text synthesis.
- Non-English audio transcript correction without further multi-lingual fine-tuning.
How to Get Started with the Model
Using Hugging Face transformers in Python
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model_id = "tsilahi/looma-dictation-slm"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
raw_spoken_text = "um what is our total budget for the upcoming fiscal quarter"
# Use the task prefix "fix grammar: "
inputs = tokenizer(f"fix grammar: {raw_spoken_text}", return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=40)
polished_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print("Input: ", raw_spoken_text)
print("Output:", polished_text)
# Output: What is our total budget for the upcoming fiscal quarter?
Examples of Speech Normalization
| Raw Spoken Input (ASR) | Looma Dictation SLM Output |
|---|---|
what is our total budget for the upcoming fiscal quarter |
What is our total budget for the upcoming fiscal quarter? |
um how can i reach customer support if the system goes down |
How can I reach customer support if the system goes down? |
uh uh basically we need to refactor the database schema |
We need to refactor the database schema. |
er i think like you know we should ship this feature by friday |
I think we should ship this feature by Friday. |
Training Details
Training Data
Trained on speech-to-dictation paired datasets containing conversational speech transcripts matched with cleaned, punctuated, and grammatically restructured targets. Training examples explicitly cover question formats to neutralize conversational RLHF dialogue weights.
Training Procedure
- Task Prefix:
fix grammar: - Optimizer: AdamW
- Epochs: 5
- Batch Size: 8
- Learning Rate: 3e-4 with linear decay
- Precision: FP32 on Apple Silicon Metal Performance Shaders (MPS)
- Final Training Loss:
0.0080(converged from0.3228)
Environmental Impact
- Hardware Type: Apple Silicon M-Series GPU (MPS acceleration)
- Hours Used: ~0.02 hours (72 seconds total training time)
- Carbon Emitted: Estimated < 0.001 kg CO2 eq. (negligible energy footprint)
Model Architecture & Objective
- Architecture: T5 (Text-to-Text Transfer Transformer) small
- Parameters: ~60 Million parameters (quantizable to ~35MB INT8)
- Objective: Seq2Seq cross-entropy loss over tokenized speech targets with teacher forcing.
Contact & Organization
- Developed for: Looma (Private In-Person Interview & Smart Dictation)
- Organization: Looma AI
- Maintainer:
tsilahi
- Downloads last month
- 319
Model tree for tsilahi/looma-dictation-slm
Base model
google/flan-t5-small