LFG-3 is an audio-language model that fuses the best-in-class conversational intelligence of Gemma 4 31B with a Parakeet audio encoder through a trained projection layer. Speech goes in, text comes out.
The model is the third iteration in a personal learning journey to answer the question: "Can I stand on the shoulders of giants and use limited compute resources to build a standout model that can understand what and how you say things, not just speech to text?"
LFG-3 serves as an open exploration of just how adaptable the Gemma architecture can be for independent developers building multimodal applications.
Voice Bench Results
| Subset | Metric | Score |
|---|---|---|
| AlpacaEval | (1-5, GPT) | 4.73 |
| CommonEval | (1-5, GPT) | 4.40 |
| WildVoice | (1-5, GPT) | 4.45 |
| SD-QA | (% GPT majority) | 78.12 |
| MMSU | (% accuracy) | 85.52 |
| OpenBookQA | (% accuracy) | 94.73 |
| BBH | (% accuracy) | 92.20 |
| IFEval | (% strict-loose avg) | 88.54 |
| AdvBench | (% refusal rate) | 98.27 |
| Overall | 89.88 |
Usage
import soundfile as sf
from transformers import AutoModelForMultimodalLM, AutoProcessor
MODEL = "glenn2/LFG-3"
processor = AutoProcessor.from_pretrained(MODEL, trust_remote_code=True)
model = AutoModelForMultimodalLM.from_pretrained(
MODEL, trust_remote_code=True, dtype="bfloat16", device_map="cuda"
)
audio, sr = sf.read("question.wav") # 16 kHz mono
messages = [
{"role": "system", "content": [{"type": "text", "text": "You are a helpful voice assistant. The user is speaking to you, and your reply will be read aloud."}]},
{"role": "user", "content": [{"type": "audio", "audio": audio}]}, # Audio should be 16 kHz mono.
]
# Process input
inputs = processor.apply_chat_template(
messages,
tokenize=True,
return_dict=True,
return_tensors="pt",
add_generation_prompt=True,
enable_thinking=True
).to(model.device)
input_len = inputs["input_ids"].shape[-1]
# Generate output
outputs = model.generate(**inputs, max_new_tokens=4096)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
# Parse output
print(processor.parse_response(response)["content"])
Intended use
- Designed for English spoken questions/instructions → text answers.
- Inherits knowledge from the Gemma 4 31B IT model.
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
