OrdenWills/LFM2.5-350M-home-assistant-sft
LFM2.5-350M Home Assistant (Preview Release)

A purpose-trained smart home automation model fine-tuned from LiquidAI/LFM2.5-350M. This model controls lights, doors, thermostats, TVs, fans, speakers, and home scenes through structured tool calls, with full awareness of current device states.
๐ Which file should I download? For the most stable experience right now, download one of the following GGUF files:
LFM2.5-350M-home-assistant-sft-exp.F16.ggufLFM2.5-350M-home-assistant-sft-exp.Q4_K_M.gguf(Recommended for most users, best balance of speed and size)LFM2.5-350M-home-assistant-sft-exp.Q8_0.gguf(Highest quality quantization)
๐ ๏ธ Get the Code (Implementation) Want to run this model in a real smart home environment? You can clone the fully integrated, modified, and open-sourced Home Assistant setup (adapted from the original Liquid cookbook) here: ๐ [GitHub: (https://github.com/OrdenWills/home-assistant) ]
What It Does
Given a natural language command and the current state of all connected devices, the model outputs the correct tool call โ or explains in plain text why no action is needed. It handles:
- Advanced Device Disambiguation โ If you say "Turn off the TV", the model will intelligently resolve which TV you mean by checking if only one TV is connected, checking if you are in a room with a TV, or inferring intent from the state (e.g., if only one TV is currently ON, it turns that one off via a
<think>trace). - Media & Music Playback โ "Play Truth In The World By Lucky Dube" โ
control_speaker(room='living_room', action='play', media='Truth In The World By Lucky Dube') - Already-Satisfied & Bulk State Awareness โ "Turn off what's on" โ reads STATE, emits one call per lit room using
<think>logic. If all lights are already off, gracefully outputs plain text: "All lights are already off" (zero tool calls). - Universal Scope Commands โ "Off everything" or "Close everywhere" โ dynamically checks lights, doors, TVs, speakers, and fans, emitting combined calls only for devices that need action.
- Pronoun Resolution & Log-based Undo โ "Undo that" or "Turn them off" +
[RECENT ACTIONS: toggle_lights(bedroom, on)]โtoggle_lights(room='bedroom', state='off'). Recognizes correct tool types for logged devices (e.g., locking doors vs toggling lights). - Relative State Clauses โ "Close the door that is open" โ directly filters
[STATE:]to find the unlocked door, ignoring local room context. - Multi-device Compound Commands โ "Lock the front door, turn off the living room light, and play music" โ uses a rigid reasoning format (
Total: N tool calls required. Emitting all N.) to emit parallel tool calls without truncation. - Topology-aware Rejection โ "Turn on the garage fan" when the garage is not in connected fans โ
intent_unclear(reason='unsupported_device'). - Rigid Syntactic Action Triggers โ Internal reasoning strictly concludes with
ACTION REQUIRED.orACTION NOT REQUIRED. Text reply only.to reliably signal structural intent before opening a JSON block, eliminating JSON bleed.
Evaluation Results (V14)
The model achieves an overall accuracy of 98.5% across 59 highly specific edge-case and logic-stress categories.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
CATEGORY ACCURACY SUMMARY (V14 HARDENED)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Category Pass Total Acc
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
current_track_queries 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
fan_relative_adjustments 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
contextual_log_followups 21 25 84.0% โโโโโโโโโโโโโโโโ
thermostat_min_max 13 25 52.0% โโโโโโโโโโ
mixed_device_undo 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
speaker_volume_controls 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
compound_volume_plus_devices 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
single_gadget_ignore_room 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
compound_local_dedup 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
bulk_action_strict_counting 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
plurality_strict_log_reference 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
living_room_door_supported 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
thermostat_relative 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
direct_command_ignore_log 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
relative_state_clause_stress 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
off_everything 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
bulk_already_satisfied 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
scope_isolation 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
pronoun_correct_tool_type 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
list_and_local 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
compound_log_and_local 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
compound_three_action 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
gadget_explicit_room_rejection 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
action_log_queries 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
social_off_topic 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
action_log_gadgets 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
compound_multi_gadget_explicit 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
self_contradictory 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
log_plus_rel_clause 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
bulk_state_counting_hallucination 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
zero_state_bulk 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
state_report_queries 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
double_bulk_stress 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
them_plurality 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
partial_exec_ambiguous 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
compound_media_devices 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
door_incomplete_vs_unsupported 24 24 100.0% โโโโโโโโโโโโโโโโโโโโ
room_priority_over_log 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
compound_local 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
typo_domain_hallucination 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
bulk_undo_wrong_tool 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
current_room_door_hallucination 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
already_satisfied 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
action_required 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
user_room_lights 23 25 92.0% โโโโโโโโโโโโโโโโโโ
user_room_doors 23 25 92.0% โโโโโโโโโโโโโโโโโโ
bulk_state_aware 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
action_log_lights 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
action_log_doors 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
action_log_scenes 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
scenes 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
thermostat 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
rejections 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
incomplete_no_room 21 25 84.0% โโโโโโโโโโโโโโโโ
missing_device 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
mixed_compound 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
status_queries 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
tv_commands 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
speaker_commands 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
fan_commands 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
massive_media 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
relative_clause 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
disambiguate_back 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
rule3_inference 25 25 100.0% โโโโโโโโโโโโโโโโโโโโ
cur_room_unsupported 24 25 96.0% โโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
OVERALL 1599 1624 98.5%
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโTool Schema
The model outputs calls from the following 10-tool schema. All tools use exact parameter names.
toggle_lights(room: str, state: 'on'|'off')
# room: living_room | bedroom | kitchen | bathroom | office | hallway
lock_door(door: str, state: 'lock'|'unlock')
# door: front | back | garage | side | bedroom | bathroom | office | kitchen | living_room
set_thermostat(temperature: int, mode: 'heat'|'cool'|'auto')
# temperature range: 60โ80ยฐF
set_scene(scene: 'movie_night'|'bedtime'|'morning'|'away'|'party')
control_tv(room: str, state: 'on'|'off')
# room: living_room | bedroom | office
control_fan(room: str, state: 'on'|'off', speed: 'low'|'medium'|'high' = optional)
# room: living_room | bedroom | kitchen | office
control_speaker(room: str, action: 'play'|'pause'|'stop'|'next'|'previous'|'volume', media: str = optional, volume: int = optional)
# room: living_room | bedroom | kitchen | office | hallway. volume: 0-100 (Required when action='volume')
intent_unclear(reason: 'off_topic'|'incomplete'|'unsupported_device'|'unsupported_feature')State Format
Every user message must be prefixed with a [STATE:] block.
[STATE: lights={bedroom:on, kitchen:off, living_room:on}, doors={back:locked, front:unlocked}, thermostat=70F/heat, scene=none, tv={bedroom:off, living_room:on}, speaker={kitchen:stopped}, fan={bedroom:on(low)},current_track_name=<name of song>, current_user_room=kitchen]Field breakdown:
Usage
Minimal inference example
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "OrdenWills/LFM2.5-350M-home-assistant-sft"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
device_map="auto",
)
SYSTEM_PROMPT = """You are a smart home assistant AI. Use tools to control the home.
Output function calls as JSON.
TOOLS:
toggle_lights(room, state='on'|'off')
lock_door(door, state='lock'|'unlock')
set_thermostat(temperature=<int>, mode='heat'|'cool'|'auto')
set_scene(scene='movie_night'|'bedtime'|'morning'|'away'|'party')
control_tv(room, state='on'|'off')
control_fan(room, state='on'|'off'[, speed='low'|'medium'|'high'])
control_speaker(room, action='play'|'pause'|'stop'|'next'|'previous'|'volume'[, media='<str>', volume=<int 0-100>])
intent_unclear(reason='off_topic'|'incomplete'|'unsupported_device'|'unsupported_feature')
CONNECTED ROOMS (lights): living_room, bedroom, kitchen, bathroom, office, hallway
CONNECTED DOORS: front, back, garage
CONNECTED TVs: living_room, bedroom
CONNECTED SPEAKERS: living_room
CONNECTED FANS: bedroom
STATE RULES:
[STATE:] shows all current device states.
State already matches request โ plain text reply, NO tool call.
Only rooms listed under CONNECTED TVs/SPEAKERS/FANS have those devices.
Requesting a device in an unlisted room โ intent_unclear(unsupported_device).
TV / SPEAKER / FAN RESOLUTION when user says 'the TV'/'the fan'/'the speaker':
1. Exactly one connected โ use that room automatically.
2. Multiple connected + current_user_room has device โ use current_user_room.
3. Multiple connected + exactly ONE is in the eligible state for the action
(e.g. only one TV is on and user says 'turn off the TV') โ infer that room.
4. Multiple connected + ambiguous (rule 2 & 3 don't apply) โ intent_unclear(incomplete).
LIGHT / DOOR RESOLUTION:
current_user_room set + connected โ use current_user_room.
current_user_room set + NOT connected โ intent_unclear(unsupported_device).
current_user_room empty โ intent_unclear(incomplete).
[RECENT ACTIONS:] โ transaction log, newest entry first. Format:
(X mins ago) [call1, call2, ...] -> summary.
Each [...] bracket is ONE command the user previously issued.
For 'undo'/'reverse'/'back': invert ONLY the most recent transaction
(the FIRST [...] block). Older transactions are always ignored.
For pronouns ('it'/'them'): refer to the device(s) in the first [...] block.
Do NOT use recent actions to infer which room 'the/this light' or 'the/this door'
refers to when current_user_room is explicitly set โ current_user_room wins.
For 'all lights' / 'all doors': check STATE for each device โ act only
on those whose state contradicts the request (issue individual tool calls).
SYNONYMS: 'open'='unlock'; 'close'/'shut'='lock'; 'skip'='next';
'back'='previous' (for speaker track navigation), but can also mean 'undo' for
reverting device states based on [RECENT ACTIONS].
'continue'/'resume'/'on the music'='play'; 'play <song/artist>' = action='play' + media='<str>'.
Relative state clauses ('the light that is on', 'the door that is locked')
override current_user_room โ check STATE and act on the matching device."""
state = "[STATE: lights={bathroom:off, bedroom:off, hallway:off, kitchen:off, living_room:off, office:off}, doors={back:locked, bathroom:locked, bedroom:locked, front:locked, garage:locked, kitchen:locked, living_room:locked, office:locked, side:locked}, thermostat=65F/cool, scene=bedtime, tv={living_room:off}, speaker={living_room:paused}, fan={bedroom:on(medium), kitchen:off(medium), living_room:on(medium), office:off(low)}, current_user_room=bedroom]"
messages = [
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": f"{state}\nTurn off the TV."},
]
input_ids = tokenizer.apply_chat_template(
messages, tokenize=True, add_generation_prompt=True, return_tensors="pt"
).to(model.device)
with torch.no_grad():
output = model.generate(
input_ids,
max_new_tokens=256,
temperature=0.1, # low temp for deterministic tool calls
do_sample=True,
pad_token_id=tokenizer.eos_token_id,
)
response = tokenizer.decode(
output[0][input_ids.shape[-1]:], skip_special_tokens=True
)
print(response)
# Expected behavior: The model will generate a <think> trace noting that only the living_room TV is currently ON, infer the user wants to turn off the living_room TV, conclude with ACTION REQUIRED, and emit the tool call.GGUF / Ollama
# Pull the recommended q4_k_m quantization
ollama run hf.co/OrdenWills/LFM2.5-350M-home-assistant-sft:Q4_K_M
# Or use the higher precision q8_0 version
ollama run hf.co/OrdenWills/LFM2.5-350M-home-assistant-sft:Q8_0Training Details
This release was fine-tuned directly on a highly augmented 160,000-example state-aware synthetic dataset ("V14").
Key Training Features (V14)
- Positive-Only Think Traces: Models reason entirely in the affirmative (learning what to do rather than what not to do), heavily reducing hallucination.
- Syntactic Triggers: Internal logic traces now rigorously conclude with
ACTION REQUIRED.orACTION NOT REQUIRED. Text reply only.ensuring flawless tool call initiation boundaries. - Compound Count Enforcement: The model is trained to actively enumerate and count sub-actions within its reasoning (
Total: N tool calls required. Emitting all N.) to prevent truncation on massive requests (e.g. locking 8 doors at once). - Extended Gadget Handling:
intent_unclear(unsupported_device)now intelligently catches missing Doors, TVs, and Fans even when rooms are explicitly named. - "Off Everything" & Bulk Isolation: The model gracefully handles mixed-domain global commands ("lock everywhere and shut everything off") by iterating through device arrays independently.
Known Limitations
- Temperature range is fixed at 60โ80ยฐF. Requests outside this range produce a plain-text explanation, not a tool call.
- No brightness or colour control. Dimming and colour-change requests correctly trigger
intent_unclear(reason='unsupported_feature'). This is by design โ the connected lights only support on/off. - Local music library only. The speaker control
mediaparameter maps to specific tracks from a bounded internal list of artists and songs. Out-of-domain conversational queries will likely triggerintent_unclear(reason='off_topic'). - English only. All training data is English. Performance in other languages is untested.
- State must be accurate. The model trusts
[STATE:]completely. If your app sends stale state, the model may incorrectly say a device is already in the requested state or infer the wrong device during disambiguation.
Citation
@misc{lfm2-home-assistant-2026,
author = {OrdenWills},
title = {LFM2.5-350M Home Assistant: A Purpose-Trained Smart Home Automation Model},
year = {2026},
publisher = {HuggingFace},
url = {https://huggingface.co/OrdenWills/LFM2.5-350M-home-assistant-sft}
}Acknowledgements
- LiquidAI for the incredible and highly capable LFM2.5-350M base model.
