Views
No views yet
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)<think> trace).control_speaker(room='living_room', action='play', media='Truth In The World By Lucky Dube')<think> logic. If all lights are already off, gracefully outputs plain text: "All lights are already off" (zero tool calls).[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).[STATE:] to find the unlocked door, ignoring local room context.Total: N tool calls required. Emitting all N.) to emit parallel tool calls without truncation.intent_unclear(reason='unsupported_device').ACTION REQUIRED. or ACTION NOT REQUIRED. Text reply only. to reliably signal structural intent before opening a JSON block, eliminating JSON bleed.1════════════════════════════════════════════════════════════
2 CATEGORY ACCURACY SUMMARY (V14 HARDENED)
3════════════════════════════════════════════════════════════
4 Category Pass Total Acc
5────────────────────────────────────────────────────────────
6 current_track_queries 25 25 100.0% ████████████████████
7 fan_relative_adjustments 25 25 100.0% ████████████████████
8 contextual_log_followups 21 25 84.0% ████████████████
9 thermostat_min_max 13 25 52.0% ██████████
10 mixed_device_undo 25 25 100.0% ████████████████████
11 speaker_volume_controls 25 25 100.0% ████████████████████
12 compound_volume_plus_devices 25 25 100.0% ████████████████████
13 single_gadget_ignore_room 25 25 100.0% ████████████████████
14 compound_local_dedup 25 25 100.0% ████████████████████
15 bulk_action_strict_counting 25 25 100.0% ████████████████████
16 plurality_strict_log_reference 25 25 100.0% ████████████████████
17 living_room_door_supported 25 25 100.0% ████████████████████
18 thermostat_relative 25 25 100.0% ████████████████████
19 direct_command_ignore_log 25 25 100.0% ████████████████████
20 relative_state_clause_stress 25 25 100.0% ████████████████████
21 off_everything 25 25 100.0% ████████████████████
22 bulk_already_satisfied 25 25 100.0% ████████████████████
23 scope_isolation 25 25 100.0% ████████████████████
24 pronoun_correct_tool_type 25 25 100.0% ████████████████████
25 list_and_local 25 25 100.0% ████████████████████
26 compound_log_and_local 25 25 100.0% ████████████████████
27 compound_three_action 25 25 100.0% ████████████████████
28 gadget_explicit_room_rejection 25 25 100.0% ████████████████████
29 action_log_queries 25 25 100.0% ████████████████████
30 social_off_topic 25 25 100.0% ████████████████████
31 action_log_gadgets 25 25 100.0% ████████████████████
32 compound_multi_gadget_explicit 25 25 100.0% ████████████████████
33 self_contradictory 25 25 100.0% ████████████████████
34 log_plus_rel_clause 25 25 100.0% ████████████████████
35 bulk_state_counting_hallucination 25 25 100.0% ████████████████████
36 zero_state_bulk 25 25 100.0% ████████████████████
37 state_report_queries 25 25 100.0% ████████████████████
38 double_bulk_stress 25 25 100.0% ████████████████████
39 them_plurality 25 25 100.0% ████████████████████
40 partial_exec_ambiguous 25 25 100.0% ████████████████████
41 compound_media_devices 25 25 100.0% ████████████████████
42 door_incomplete_vs_unsupported 24 24 100.0% ████████████████████
43 room_priority_over_log 25 25 100.0% ████████████████████
44 compound_local 25 25 100.0% ████████████████████
45 typo_domain_hallucination 25 25 100.0% ████████████████████
46 bulk_undo_wrong_tool 25 25 100.0% ████████████████████
47 current_room_door_hallucination 25 25 100.0% ████████████████████
48 already_satisfied 25 25 100.0% ████████████████████
49 action_required 25 25 100.0% ████████████████████
50 user_room_lights 23 25 92.0% ██████████████████
51 user_room_doors 23 25 92.0% ██████████████████
52 bulk_state_aware 25 25 100.0% ████████████████████
53 action_log_lights 25 25 100.0% ████████████████████
54 action_log_doors 25 25 100.0% ████████████████████
55 action_log_scenes 25 25 100.0% ████████████████████
56 scenes 25 25 100.0% ████████████████████
57 thermostat 25 25 100.0% ████████████████████
58 rejections 25 25 100.0% ████████████████████
59 incomplete_no_room 21 25 84.0% ████████████████
60 missing_device 25 25 100.0% ████████████████████
61 mixed_compound 25 25 100.0% ████████████████████
62 status_queries 25 25 100.0% ████████████████████
63 tv_commands 25 25 100.0% ████████████████████
64 speaker_commands 25 25 100.0% ████████████████████
65 fan_commands 25 25 100.0% ████████████████████
66 massive_media 25 25 100.0% ████████████████████
67 relative_clause 25 25 100.0% ████████████████████
68 disambiguate_back 25 25 100.0% ████████████████████
69 rule3_inference 25 25 100.0% ████████████████████
70 cur_room_unsupported 24 25 96.0% ███████████████████
71────────────────────────────────────────────────────────────
72 OVERALL 1599 1624 98.5%
73════════════════════════════════════════════════════════════1toggle_lights(room: str, state: 'on'|'off')
2# room: living_room | bedroom | kitchen | bathroom | office | hallway
3
4lock_door(door: str, state: 'lock'|'unlock')
5# door: front | back | garage | side | bedroom | bathroom | office | kitchen | living_room
6
7set_thermostat(temperature: int, mode: 'heat'|'cool'|'auto')
8# temperature range: 60–80°F
9
10set_scene(scene: 'movie_night'|'bedtime'|'morning'|'away'|'party')
11
12control_tv(room: str, state: 'on'|'off')
13# room: living_room | bedroom | office
14
15control_fan(room: str, state: 'on'|'off', speed: 'low'|'medium'|'high' = optional)
16# room: living_room | bedroom | kitchen | office
17
18control_speaker(room: str, action: 'play'|'pause'|'stop'|'next'|'previous'|'volume', media: str = optional, volume: int = optional)
19# room: living_room | bedroom | kitchen | office | hallway. volume: 0-100 (Required when action='volume')
20
21
22intent_unclear(reason: 'off_topic'|'incomplete'|'unsupported_device'|'unsupported_feature')[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 | Values | Notes |
|---|---|---|
lights | room:on|off | Only include connected rooms |
doors | door:locked|unlocked | Only include connected doors |
thermostat | <temp>F/<mode> | e.g. 72F/heat |
scene | scene name or none | Active scene or none |
tv | {room:on|off, ...} | Dictionary of connected TVs |
speaker | {room:playing|paused|stopped, ...} | Dictionary of connected speakers |
fan | {room:on|off(speed), ...} | Dictionary of connected fans |
current_user_room | room name or empty | Drives pronoun ("this room") resolution |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model_id = "OrdenWills/LFM2.5-350M-home-assistant-sft"
5
6tokenizer = AutoTokenizer.from_pretrained(model_id)
7model = AutoModelForCausalLM.from_pretrained(
8 model_id,
9 torch_dtype=torch.float16,
10 device_map="auto",
11)
12
13SYSTEM_PROMPT = """You are a smart home assistant AI. Use tools to control the home.
14
15Output function calls as JSON.
16
17TOOLS:
18 toggle_lights(room, state='on'|'off')
19 lock_door(door, state='lock'|'unlock')
20 set_thermostat(temperature=<int>, mode='heat'|'cool'|'auto')
21 set_scene(scene='movie_night'|'bedtime'|'morning'|'away'|'party')
22 control_tv(room, state='on'|'off')
23 control_fan(room, state='on'|'off'[, speed='low'|'medium'|'high'])
24 control_speaker(room, action='play'|'pause'|'stop'|'next'|'previous'|'volume'[, media='<str>', volume=<int 0-100>])
25 intent_unclear(reason='off_topic'|'incomplete'|'unsupported_device'|'unsupported_feature')
26
27CONNECTED ROOMS (lights): living_room, bedroom, kitchen, bathroom, office, hallway
28CONNECTED DOORS: front, back, garage
29CONNECTED TVs: living_room, bedroom
30CONNECTED SPEAKERS: living_room
31CONNECTED FANS: bedroom
32
33STATE RULES:
34 [STATE:] shows all current device states.
35 State already matches request → plain text reply, NO tool call.
36 Only rooms listed under CONNECTED TVs/SPEAKERS/FANS have those devices.
37 Requesting a device in an unlisted room → intent_unclear(unsupported_device).
38
39TV / SPEAKER / FAN RESOLUTION when user says 'the TV'/'the fan'/'the speaker':
40 1. Exactly one connected → use that room automatically.
41 2. Multiple connected + current_user_room has device → use current_user_room.
42 3. Multiple connected + exactly ONE is in the eligible state for the action
43 (e.g. only one TV is on and user says 'turn off the TV') → infer that room.
44 4. Multiple connected + ambiguous (rule 2 & 3 don't apply) → intent_unclear(incomplete).
45
46LIGHT / DOOR RESOLUTION:
47 current_user_room set + connected → use current_user_room.
48 current_user_room set + NOT connected → intent_unclear(unsupported_device).
49 current_user_room empty → intent_unclear(incomplete).
50
51 [RECENT ACTIONS:] → transaction log, newest entry first. Format:
52 (X mins ago) [call1, call2, ...] -> summary.
53 Each [...] bracket is ONE command the user previously issued.
54 For 'undo'/'reverse'/'back': invert ONLY the most recent transaction
55 (the FIRST [...] block). Older transactions are always ignored.
56 For pronouns ('it'/'them'): refer to the device(s) in the first [...] block.
57 Do NOT use recent actions to infer which room 'the/this light' or 'the/this door'
58 refers to when current_user_room is explicitly set — current_user_room wins.
59 For 'all lights' / 'all doors': check STATE for each device — act only
60 on those whose state contradicts the request (issue individual tool calls).
61 SYNONYMS: 'open'='unlock'; 'close'/'shut'='lock'; 'skip'='next';
62 'back'='previous' (for speaker track navigation), but can also mean 'undo' for
63 reverting device states based on [RECENT ACTIONS].
64 'continue'/'resume'/'on the music'='play'; 'play <song/artist>' = action='play' + media='<str>'.
65 Relative state clauses ('the light that is on', 'the door that is locked')
66 override current_user_room — check STATE and act on the matching device."""
67
68state = "[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]"
69
70messages = [
71 {"role": "system", "content": SYSTEM_PROMPT},
72 {"role": "user", "content": f"{state}\nTurn off the TV."},
73]
74
75input_ids = tokenizer.apply_chat_template(
76 messages, tokenize=True, add_generation_prompt=True, return_tensors="pt"
77).to(model.device)
78
79with torch.no_grad():
80 output = model.generate(
81 input_ids,
82 max_new_tokens=256,
83 temperature=0.1, # low temp for deterministic tool calls
84 do_sample=True,
85 pad_token_id=tokenizer.eos_token_id,
86 )
87
88response = tokenizer.decode(
89 output[0][input_ids.shape[-1]:], skip_special_tokens=True
90)
91print(response)
92# 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.1# Pull the recommended q4_k_m quantization
2ollama run hf.co/OrdenWills/LFM2.5-350M-home-assistant-sft:Q4_K_M
3
4# Or use the higher precision q8_0 version
5ollama run hf.co/OrdenWills/LFM2.5-350M-home-assistant-sft:Q8_0| Parameter | Value |
|---|---|
| Base model | LiquidAI/LFM2.5-350M |
| Dataset Size | 160,000 examples |
| Categories | 59 granular instruction schemas |
| Think Traces | Extensive (Positive-only reasoning patterns) |
| Hardware | Kaggle T4 (16 GB) |
ACTION REQUIRED. or ACTION NOT REQUIRED. Text reply only. ensuring flawless tool call initiation boundaries.Total: N tool calls required. Emitting all N.) to prevent truncation on massive requests (e.g. locking 8 doors at once).intent_unclear(unsupported_device) now intelligently catches missing Doors, TVs, and Fans even when rooms are explicitly named.intent_unclear(reason='unsupported_feature'). This is by design — the connected lights only support on/off.media parameter maps to specific tracks from a bounded internal list of artists and songs. Out-of-domain conversational queries will likely trigger intent_unclear(reason='off_topic').[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.1@misc{lfm2-home-assistant-2026,
2 author = {OrdenWills},
3 title = {LFM2.5-350M Home Assistant: A Purpose-Trained Smart Home Automation Model},
4 year = {2026},
5 publisher = {HuggingFace},
6 url = {https://huggingface.co/OrdenWills/LFM2.5-350M-home-assistant-sft}
7}