# Udgam-384M

Canonical: https://udgamlabs.com/models/udgam-384m · Updated: 2026-10-10

Models · Public release · 10 October 2026

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.

[Read the release post](https://udgamlabs.com/blog/udgam-384m)

Try it in your browser: [https://udgamlabs.com/models/udgam-384m#try](https://udgamlabs.com/models/udgam-384m#try)

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).

[Try it in your browser](https://udgamlabs.com/models/udgam-384m#try)[Weights on Hugging Face](https://huggingface.co/udgamlabs/Udgam-384M-Chat) [Docs & examples on GitHub](https://github.com/udgamlabs/udgam-384m) [Technical report](https://udgamlabs.com/research/udgam-384m)

## Four jobs inside an app

1.  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.

2.  02

    Document → JSON

    Fill a JSON schema you supply from a receipt, email, form or OCR text.

3.  03

    Natural language → shell

    Propose one command, with a flag for whether it needs confirmation, for a person to review before it runs.

4.  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.

*A recorded example · App action*

> “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](https://huggingface.co/udgamlabs/Udgam-384M-Chat)

    Chat and tool use (safetensors, transformers)

    Context · 4,096 tokens

- [Udgam-384M-Chat-GGUF](https://huggingface.co/udgamlabs/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](https://huggingface.co/udgamlabs/Udgam-384M-Chat-MLX)

    MLX fp16, plus a 4-bit build (216 MB), for Apple silicon

    Context · 4,096 tokens

- [Udgam-384M-Base-4K](https://huggingface.co/udgamlabs/Udgam-384M-Base-4K)

    Base model after a short 4,096-token stage

    Context · 4,096 tokens

- [Udgam-384M-Base](https://huggingface.co/udgamlabs/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.

[Quickstart](https://github.com/udgamlabs/udgam-384m/blob/main/docs/QUICKSTART.md) [Tool calling guide](https://github.com/udgamlabs/udgam-384m/blob/main/docs/INTEGRATION.md)

```
# 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-4bit
```

### From 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](https://udgamlabs.com/mcp)). 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

Tiny open models · same harness

| 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%).

[Read every metric, the quantization results and the fairness notes](https://github.com/udgamlabs/udgam-384m/blob/main/docs/BENCHMARKS.md)

## 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](https://huggingface.co/udgamlabs/Udgam-384M-Chat)

    Weights, model card

- [Udgam-384M-Chat-GGUF](https://huggingface.co/udgamlabs/Udgam-384M-Chat-GGUF)

    Ollama, llama.cpp, LM Studio

- [Udgam-384M on Hugging Face Spaces](https://huggingface.co/spaces/udgamlabs/Udgam-384M)

    Try it without downloading

- [Udgam-384M-Chat-MLX](https://huggingface.co/udgamlabs/Udgam-384M-Chat-MLX)

    Apple silicon (fp16)

- [Udgam-384M-Chat-MLX-4bit](https://huggingface.co/udgamlabs/Udgam-384M-Chat-MLX-4bit)

    Apple silicon (4-bit)

- [Udgam-384M-Base](https://huggingface.co/udgamlabs/Udgam-384M-Base)

    Pretrained base model

- [Udgam-384M-Base-4K](https://huggingface.co/udgamlabs/Udgam-384M-Base-4K)

    Base model, 4,096-token context

- [Technical report](https://udgamlabs.com/research/udgam-384m)

    Architecture, evaluation, safety

- [GitHub repository](https://github.com/udgamlabs/udgam-384m)

    Docs, runnable examples, checksums

- [Visual walkthrough](https://udgamlabs.github.io/udgam-384m/)

    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.

---

## About Udgam Labs

Udgam Labs is an independent AI research lab. We work from first principles: before we build, we understand why things work, whether we are training a model, fine-tuning one or applying AI to a new problem. Today that means open models such as Gargi, a 384M-parameter language model that comes within 2 points of Qwen2.5-0.5B on three reasoning benchmarks with about 1,000× less training data. Next come products, custom models for businesses, and AI in the physical world. Udgam (उद्गम) is Sanskrit for origin.

Udgam Labs · AI research from first principles · https://udgamlabs.com
