Benchmark

- Overall: in BF16 it solves 1,555 of 1,812 cases (85.8 %), the untrained base 690.
- Tool calls and safety: tool calls rise from 309 to 708 of 800, safety-relevant actions from 226 to 454 of 498.
- Silence and false triggers: it stays silent in all 104 silence cases and all 50 real false triggers.
- General knowledge: retention multiple choice stays level (359 → 362 of 512).
The chart shows the quantized files as users run them. This is my own development benchmark, not an independent test.
Training
- Method: LoRA on the text attention (Q/V, rank 8, alpha 16), one epoch on my dataset v5.
- 22,101 rows, 2,763 steps, learning rate 2e-4, up to 6,144 tokens.
- Trained on a single RTX 4090, then merged into the base weights.
- Unchanged: vision and audio parts come unchanged from Gemma 4 E4B.
Getting started
from transformers import AutoTokenizer, Gemma4ForConditionalGeneration model_id = "Maxinger15/LunaraHome-Gemma4-E4B"tokenizer = AutoTokenizer.from_pretrained(model_id)model = Gemma4ForConditionalGeneration.from_pretrained(model_id, dtype="bfloat16", device_map="auto")
Pass Home Assistant's real system prompt, the exposed entities and the offered
tools through the chat template with thinking disabled. The training reference
is Home Assistant 2026.9.3. An empty reply means "not meant for me".
Limitations
- Safety: I have not reviewed 8 safety cases that got worse than the base model, such as disarming an alarm or turning off a lock instead of locking it.
- Don't let it control locks, alarms, gates or valves unattended.
- Keep confirmations in your integration.
- Benchmark: my numbers come from my own cases. They don't prove the model works for every household.
License
The Gemma base, tokenizer and template remain under Apache 2.0. My
own contributions are MIT. The training sources keep their
licenses; see THIRD_PARTY_NOTICES.md. LunaraHome is an independent hobby
project, not an official product of Google, Home Assistant or Music Assistant.