Skip to main content

hcawn-fc

A tiny function-calling model (5.7M parameters, byte-level, CPU only) for 7 phone actions: send_email, create_calendar_event, create_contact, show_map, open_wifi_settings, turn_on_flashlight, turn_off_flashlight.

It runs locally in well under a second, always returns valid JSON, and holds back calls it is not sure about. Try it in the browser first: https://cawnai.com

Scope: a narrow model for a known tool set, not a general function-calling model. It does not take arbitrary tool schemas.

Install

pip install hcawn-fc
hcawn-fc doctor
hcawn-fc "Add a calendar event Team Sync tomorrow at 2pm"

Python 3.9+, any OS. Until you download the weights, hcawn-fc calls the hosted API (free demo). The local CPU engine ships for Linux x86-64, see "Run it locally".

Run it locally

The local engine runs on your CPU with no network. The weights (6 MB int8, 3.9 MB int4, CC BY 4.0) are hosted on Hugging Face and downloaded once:

hcawn-fc download            # int8 (default); also: hcawn-fc download int4 | all
hcawn-fc doctor              # shows the engine, the weights and a self-test

They are saved to ~/.cache/hcawn_fc/ and checked against a SHA-256 sum. You can also pass your own file with --model-path / Local(model_path=...).

Use it from Python

from hcawn_fc import Local

m = Local()                                   # needs the engine (Linux x86-64) and `hcawn-fc download`
r = m.call("Email dana@example.com subject Lunch body Are we still on for noon?")

r.status        # "ok" | "held" | "none"
r.calls         # [Call(name="send_email", arguments={...})]
r.confidence    # 0.0 - 1.0
r.latency_ms

Statuses:

status meaning
ok the call is confident enough to act on (r.calls)
held the model proposed a call but is not sure; ask the user first (r.held_calls)
none none of the 7 actions fits the request

Relative dates ("tomorrow", "next Monday") are computed from now (default: local time). Pass m.call(q, now=datetime(...)) to override. Local(model="int4") uses the smaller file; Local(min_conf=0.95) makes the gate stricter. One Local instance handles one request at a time (calls are serialized); use one instance per process for parallelism.

Hosted API

from hcawn_fc import Client
Client().call("Turn on the flashlight")        # https://cawnai.com, free demo, rate limited. Works on any OS.

or hcawn-fc --api "Turn on the flashlight". Raises RateLimited / ServerBusy / ApiError. Need higher limits or an SLA? Contact us (below).

Command line

hcawn-fc "Show me Paris on the map"      one request
hcawn-fc chat                            interactive
hcawn-fc doctor                          what engine / weights / CPU variant is in use
  --api  --model int4  --json  --min-conf 0.95  --model-path file.bin

The engine ships in three builds (AVX2, SSE4.1, generic) and the fastest one your CPU supports is picked at start-up. Override with HCAWN_FC_ISA=avx2|sse41|generic.

How good is it

Strict exact match (tool names and every argument value) on the Mobile Actions eval set, 961 rows, about ±2 points of noise. These numbers are for model plus the deterministic layers around it (grammar-constrained decoding, grounding of values in the query, date/time rules, keyword triggers, confidence gate):

Exact
int8 90.9%
int8 on rephrased queries (905 rows, paraphrased by a different LLM) 83.2%
model + grammar only, no other layers 86.5%

Weaker on unusual phrasings ("tell him that ...", "... saying X"). The confidence gate is not a guarantee: it stops most, not all, wrong calls.

Data and licences

  • Code: Apache-2.0.
  • Trained on the Mobile Actions dataset (Google, CC BY 4.0) plus query-form augmentation and 16,000 paraphrases of the training queries written by an LLM (Gemini 2.5 Flash Lite) and filtered automatically. Evaluation paraphrases were written by GPT-4o-mini and were never used for training.
  • Model weights: CC BY 4.0 (Hugging Face: https://huggingface.co/cawnai/hcawn-fc7). See NOTICE.

Custom models

We build small CPU-only models like this one for your tools and your phrasing, and run them on-device or on your own servers. Contact: https://cawnai.com (contact form at the bottom).

Metadata

Release files for hcawn-fc 0.1.1

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-fc 0.1.1
File Interpreter ABI Platform Actions
hcawn_fc-0.1.1-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_fc-0.1.1-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
hcawn_fc-0.1.1-py3-none-any.whl Python 3 none any Details for hcawn_fc-0.1.1-py3-none-any.whl

Total release size: 255.4 kB

Release files / hcawn_fc-0.1.1-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL hcawn_fc-0.1.1-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 208.6 kB
Tags Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
3c292d094ddad2c727eb652653cb2e9614814dc243a24d2d3ec84ad4fc9709c6
BLAKE2b-256 checksum
How to use checksums
1afc5901c83cb6cf848efea700e8380cf42c8556314d237aae70c9538671b615
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.12

Release files / hcawn_fc-0.1.1-py3-none-any.whl

Download URL hcawn_fc-0.1.1-py3-none-any.whl
Size 46.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
25f229266dc749d335232a0c82356ac0b02a094d021944df96e15fb2f92b2d26
BLAKE2b-256 checksum
How to use checksums
f26eb7c7dbaf78a1f1c828018eb0b45430d86271f063876782de4bd5115d48b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.12

Security for hcawn-fc 0.1.1

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.

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