Udgam-384M
A 384M-parameter English model for tool calling inside apps, on the device itself. Trained from scratch, it turns requests into function calls, documents into JSON and tasks into shell commands for review, and recognises when to ask or decline.
Try it now · in your browser · free, no login
Ask a pretend phone to do something. See the call it makes.
Udgam-384M runs entirely inside this tab: the 410 MB model downloads once and is kept by your browser, and your requests never leave your device. Here it plays the assistant on a pretend phone with three tools. It decides whether to call one, with which details, or to ask or decline instead. Nothing is really set, sent or looked up: the page shows the call and answers with a pretend result.
Works best on a laptop or a recent phone with a good connection.
The model’s decision appears here.
The pretend phone’s tools
- set_alarm
- Set an alarm at a local time. Takes time (HH:MM 24h), label (optional).
- send_message
- Send a text message to a contact. Takes contact, text.
- get_weather
- Current weather for a city. Takes city.
The model also sees your device’s date and time, so “tomorrow” and “at 8pm” can resolve. It is right about one call in three on tools it has never seen, so a real app checks every call against its own allowlist and asks before anything that sends, pays, deletes or shares. The same loop in code: examples/ollama_tool_call.py
Prefer not to download? Try Udgam-384M on Hugging Face Spaces
The result
Good at deciding whether to act. Behind on exact calls.
Among the tiny open models we compared, Udgam-384M most often declines when no tool fits, asks for missing details, returns schema-valid JSON and chooses the right shell behaviour. It is also the fastest generator in the group on an Apple-silicon GPU. It is behind Granite 4.0 350M and Qwen3-0.6B on exact tool calls (BFCL v3) and instruction following (IFEval).
Four jobs inside an app
- 01
App actions
Turn a request into a call to one of the app’s functions, with the right arguments. Relative dates resolve from the date-time in the system message.
- 02
Document → JSON
Fill a JSON schema you supply from a receipt, email, form or OCR text.
- 03
Natural language → shell
Propose one command, with a flag for whether it needs confirmation, for a person to review before it runs.
- 04
Relevance
Decline when no offered tool fits, ask when a required detail is missing, and refuse requests that should not be carried out.
The model only proposes. Your app owns the list of tools, checks every call and confirms anything that sends, pays, deletes, shares or runs. It is not a knowledgeable general assistant: at 384M parameters it is fluent but often factually wrong.
“Wake me up at 6:45 tomorrow, label it gym.”
The tool call it returned
- Tool
- set_alarm
- time
- 06:45
- label
- Gym
Your app checks the call, sets the alarm and sends the result back. The model takes no action by itself. Recorded with Ollama · Q8_0 · thinking off.
Sizes and formats
- Parameters
- 384.4M · 20 layers · hidden size 1,024
- Architecture
- Decoder-only transformer, Gemma 4 compatible (Gemma4ForCausalLM)
- Initialization
- Random weights; trained from scratch
- Training
- Roughly 8B tokens of licensed public and synthetic text, then supervised fine-tuning for chat and tool use
- Context
- 4,096 tokens (2,048 for the base model)
- Language
- English
- Licence
- Apache-2.0 (weights and tokenizer)
The release
- Udgam-384M-Chat
Chat and tool use (safetensors, transformers)
Context · 4,096 tokens
- Udgam-384M-Chat-GGUF
Q8_0 410 MB (default) · Q6_K · Q4_K_M 238 MB (phones) · Q4_0 · f16
Context · 4,096 tokens
- Udgam-384M-Chat-MLX
MLX fp16, plus a 4-bit build (216 MB), for Apple silicon
Context · 4,096 tokens
- Udgam-384M-Base-4K
Base model after a short 4,096-token stage
Context · 4,096 tokens
- Udgam-384M-Base
Pretrained base model; continues text
Context · 2,048 tokens
How to run it
Use the Q8_0 GGUF by default and Q4_K_M on phones. For tool use: temperature 0.1, top-p 0.9, top-k 40, repeat penalty 1.1. Put the current date-time and device in the system message so relative dates resolve.
In LM Studio, set the context length to 4,096. For the MLX builds, set Max Concurrent Predictions to 1. Agent workspaces that add a long hidden prompt can exceed the 4,096-token context.
# Ollama: Modelfile + Q8_0 GGUF from Hugging Face
ollama create udgam -f Modelfile
ollama run udgam "What can you do?"
# llama.cpp: OpenAI-compatible API
llama-server -m Udgam-384M-Chat-Q8_0.gguf \
-c 4096 --jinja
# MLX on Apple silicon
pip install mlx-lm
mlx_lm.generate --prompt "Hello" \
--model udgamlabs/Udgam-384M-Chat-MLX-4bitFrom an AI agent
Udgam-384M also runs as a tool on our MCP server. An agent sends a request and its app’s own tools, up to eight, and gets back the call the model would make, as JSON; nothing is run. It is a quick way to see how the model routes requests for your app before you put it on a device.
# Claude Code
claude mcp add --transport http udgamlabs https://mcp.udgamlabs.com/mcp
# Codex
codex mcp add udgamlabs --url https://mcp.udgamlabs.com/mcp
# Cursor: .cursor/mcp.json
{ "mcpServers": { "udgamlabs": { "url": "https://mcp.udgamlabs.com/mcp" } } }The tool is udgam_384m_tool_call; the same server has every model that runs as a tool (all tools, and setup for Claude, VS Code and other apps). The model runs on a shared free CPU on Hugging Face, so the first call after a quiet spell waits while it starts.
How it compares
| Metric | Udgam-384M | Granite 4.0 350M | Granite 4.0 H 350M | SmolLM2 360M | Qwen3-0.6B |
|---|---|---|---|---|---|
| Held-out relevance: right decision | 75 | 18.3 | 20 | 46.7 | 66.7 |
| Held-out document → JSON: schema-valid | 56 | 32 | 38 | 0 | 24 |
| Held-out shell: right behaviour | 85.9 | 59.4 | 67.2 | 39.1 | 67.2 |
| Held-out app actions: exact call (unseen tools) | 31.4 | 45.7 | 45.7 | 1.4 | 44.3 |
| BFCL v3 simple | 60 | 90.7 | 88 | 4.7 | 80 |
| IFEval prompt-level strict | 26.1 | 47 | 53.4 | 31.4 | 58 |
| Generation speed, Q4_K_M, Apple M6 GPU (tokens/s) | 444 | 411 | 262 | 358 | 282 |
Best in each row in bold. Percentages unless marked. Same harness, prompts and scorer for every model: greedy decoding, Q8_0, thinking off, each model with its own chat template. The held-out sets are Udgam’s own and follow this model’s prompt conventions, so they favour it. BFCL v3 and IFEval are neutral public benchmarks. On BFCL irrelevance, Qwen3-0.6B (88%) and SmolLM2 (75%) beat Udgam (68%).
Where it does well
Deciding whether to act: on our held-out relevance set it makes the right call / no-call decision 75% of the time, against 18–20% for both Granite 4.0 350M models, which call a tool almost every time. It produces schema-valid JSON for unseen schemas more often (56% against 24–38%) and chooses the right shell behaviour most often (86% against 59–67%).
Where it is behind
Exact tool calls and instruction following. Both Granite 4.0 350M models score 88–91% on BFCL v3 simple against 60%, and 47–53% on IFEval against 26%. Qwen3-0.6B, with about twice the parameters, is also ahead on both. Shell commands are rarely correct when actually run, for every model compared (0–8%).
Safety
On XSTest, the model declines 54% of clearly harmful prompts and over-refuses 15% of safe prompts that only sound alarming. That is below what we would want for an open chatbot, so we release it as not safety-hardened. The base models received no safety training.
- Keep an allowlist of tools, validate arguments and confirm consequential actions.
- Always show shell commands and require confirmation. Never auto-execute.
- Put a moderation layer in front of open chat that people use.
Limitations
- About one call in three is exactly right on tools it has never seen. It sometimes picks the wrong tool or guesses a value instead of asking.
- Shell syntax is usually valid, but on unfamiliar tasks only a small fraction of commands give the right output, and destructive requests are not reliably refused.
- Fluent but often factually wrong. Not for medical, legal or financial advice, or unsupervised open-ended chat.
- English only, with a 4,096-token context. Works best with the prompt conventions in the model card.
Weights, documentation and the report
- Udgam-384M-Chat
Weights, model card
- Udgam-384M-Chat-GGUF
Ollama, llama.cpp, LM Studio
- Udgam-384M on Hugging Face Spaces
Try it without downloading
- Udgam-384M-Chat-MLX
Apple silicon (fp16)
- Udgam-384M-Chat-MLX-4bit
Apple silicon (4-bit)
- Udgam-384M-Base
Pretrained base model
- Udgam-384M-Base-4K
Base model, 4,096-token context
- Technical report
Architecture, evaluation, safety
- GitHub repository
Docs, runnable examples, checksums
- Visual walkthrough
Recorded examples in plain language
Weights and tokenizer are released under Apache-2.0. The chat template is the official Gemma 4 template (Apache-2.0). Training code and data are not part of this release.