Skip to main content

hcawn-ha

hcawn-ha

A 5.7M-parameter model that turns spoken Home Assistant commands into service calls. 6.0 MB (int8) or 4.1 MB (int4), runs on a CPU, no cloud, no account.

It ships with the pieces around the model: a resolver that maps what you said to your devices, a pipeline with a confidence gate and safety rules, and a simulated house you can talk to in the browser.

pip install hcawn-ha
hcawn-ha download int8        # weights from huggingface.co/datatab/hcawn-ha (SHA-256 verified)
hcawn-ha demo                 # opens the simulated house in your browser

The engine ships compiled for Linux x86-64. On other systems pip install gives you the resolver and pipeline only (pass your own generate function), and the model runs on the Hugging Face Space.

Use it in Python

from hcawn_ha import HAPipeline

registry = [
    {"entity_id": "light.kitchen_ceiling", "name": "Kitchen Ceiling Light", "area": "Kitchen", "aliases": [], "device_class": None},
    {"entity_id": "lock.front_door", "name": "Front Door", "area": "Hallway", "aliases": [], "device_class": "door"},
]
pipe = HAPipeline("int8", registry, gate=0.7)          # "int8", "int4" or a path to a .bin file

r = pipe.handle("turn off the kitchen light and lock the front door")
r["execute"]   # [{"domain": "light", "service": "turn_off", "data": {"entity_id": ["light.kitchen_ceiling"]}}]
r["confirm"]   # [{"domain": "lock", "service": "lock", ...}]   locks and garage doors wait for a "yes"
r["ask"]       # a question for the user when something was unclear, otherwise ""

execute is safe to run now, confirm needs a spoken or typed yes first, ask is shown to the user. Nothing runs when the model is unsure (confidence below gate), when the verb contradicts the tool, or when the device is ambiguous.

How it works

"turn off the kitchen light and lock the front door"
   → split into commands
   → model, per command, with confidence      {"name":"HassTurnOff","arguments":{"name":"kitchen light"}}
   → direction guard + validation
   → resolver (your registry: names, rooms, aliases)
   → Home Assistant service calls

The model never sees your device list. It copies the device phrase from the request and the resolver finds the entity, so your home can change without retraining. 13 tools: turn on / off / toggle, light brightness and colour, thermostat, humidifier, shopping list, vacuum, media pause / resume / next / previous.

Results

model alone end to end official HA intents tests acon96 V2 test
int8 (6.0 MB) 95.0 % 92.6 % 92.4 % right, 0.7 % wrong 89.7 % right, 1.8 % wrong
int4 (4.1 MB) 94.8 % 92.6 % 91.0 % right, 2.1 % wrong 89.1 % right, 1.4 % wrong

The acon96 numbers are the independent ones; part of the official-test result was tuned after looking at failures. Details on the model card.

Command line

Command
hcawn-ha download [int8|int4|all] fetch weights into ~/.cache/hcawn_ha/
hcawn-ha say "turn on the bedroom fan" one sentence against the demo house, prints the service calls
hcawn-ha chat interactive prompt with the model's raw output and confidence
hcawn-ha demo the simulated house in your browser (int8 / int4 switch, add your own devices)
hcawn-ha info engine variant and available weights

License

Code: Apache-2.0. Weights: see the model card. See NOTICE for the data the model was trained on.

Metadata

Release files for hcawn-ha 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for hcawn-ha 0.1.0
File Interpreter ABI Platform Actions
hcawn_ha-0.1.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details for hcawn_ha-0.1.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
hcawn_ha-0.1.0-py3-none-any.whl Python 3 none any Details for hcawn_ha-0.1.0-py3-none-any.whl

Total release size: 705.2 kB

Release files / hcawn_ha-0.1.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL hcawn_ha-0.1.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 433.5 kB
Tags Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
9c9b5be29098fa3bdabdd6f899f98508bea9cc48c826d0d64c313f3b09af83a1
BLAKE2b-256 checksum
How to use checksums
2c7eb7391cd8a90b6ee832b385d0c9e167a5adb4962a33461afc66715e358b4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.12

Release files / hcawn_ha-0.1.0-py3-none-any.whl

Download URL hcawn_ha-0.1.0-py3-none-any.whl
Size 271.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01eacb205d49bfb8b21d26c52d91402e32578bcdf3d77dfc1c0f6f0d9c34c354
BLAKE2b-256 checksum
How to use checksums
b2b4ca40ed687f78a7142f2f8ca4767219cf6c3a6db66a58698e28c38cc6314b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.12

Security for hcawn-ha 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page