Dhee-Pravega-Atom-IT: Research Preview (645M)
Research preview. This is an early instruction-tuned checkpoint of a model built entirely from scratch. We are releasing it to share the architecture, tokenizer and training recipe, and to give the community a fully open, Indic-first small model to study and build on. It is not intended for production use. See Limitations.
An instruction-tuned, tool-calling language model for Indian languages, built entirely from scratch.
Dhee-Pravega-Atom-IT is the instruction-tuned version of Dhee-Pravega-OG Atom, a 645M-parameter decoder-only model whose architecture, tokenizer, pretraining corpus and weights are all our own: no pretrained weights of any kind were used at any stage. It is trained to hold multi-turn conversations, decide when a request needs a tool, and emit structured JSON function calls, across 13 Indian languages plus English, Arabic, Spanish, French, German and Russian.
Highlights
- Built from scratch. The architecture, tokenizer, pretraining corpus and weights are all our own. No third-party model weights or upstream model terms are involved.
- Indic-first tokenizer. A custom 128,000-piece SentencePiece vocabulary trained for these languages: 0.270 tokens per character on our Indic text versus 0.372 for Gemma-4's tokenizer, with a per-language spread of 1.19× versus 2.8× (measured on our corpus). Fewer tokens per sentence means more usable context and lower latency, and every language pays roughly the same price.
- Small enough for the edge. 645M parameters; ~1.3 GB in bf16. On an Apple M1 CPU (no GPU) it decodes at ~25 tokens/s in 1.3 GB of RAM.
- Native tool-calling format. Roles and tool calls are first-class control tokens, not text conventions, so the model never has to disambiguate an English-looking role marker from the surrounding Indic text.
Architecture
DheeForCausalLM is a decoder-only transformer that combines three published, permissively licensed stabilisation and efficiency techniques that no single upstream project ships together:
| Component | Origin | What it does here |
|---|---|---|
| Reordered sublayer norms | OLMo-2 | The norm is applied to the output of each sublayer inside the residual (h = h + norm(attn(h)), h = h + norm(mlp(h))) rather than to its input. This controls activation-norm growth through depth. |
| Per-head QK-norm | Qwen3 | Each attention head's queries and keys are RMS-normalised independently over head_dim, rather than one norm shared across the whole projection. This bounds every head's attention logits individually; the max attention logit stayed at ~14 for the whole pretraining run. |
| Local:global attention interleave | Gemma-3 (5:1) | Built into the layer plumbing (layer_types, global_every, sliding_window) for efficient long-context inference. In this release every layer runs full attention; the interleave is a config switch, not a code change. |
The rest is a modern standard stack: grouped-query attention (10 query heads, 2 KV heads), SwiGLU MLP, RoPE (θ = 1,000,000), RMSNorm and tied input/output embeddings. The implementation is verified bit-identical to stock Olmo2ForCausalLM in the degenerate configuration (joint QK-norm, all-full attention), so every line not deliberately changed behaves exactly as upstream.
| Parameters | 645,617,408 (embeddings 163.8M, 25%) |
| Layers | 28 |
| Hidden size | 1,280 |
| Attention | 10 query / 2 KV heads (GQA), head dim 128, per-head QK-norm |
| MLP | SwiGLU, 3,456 |
| Vocabulary | 128,006 (128,000 SentencePiece + 6 control tokens) |
| Position encoding | RoPE, θ = 1e6 |
| Training sequence length | 8,192 |
| Embeddings | tied |
Control tokens
| Token | ID | Role |
|---|---|---|
<|sys|> | 128000 | tool schemas / system prompt |
<|user|> | 128001 | user turn |
<|assistant|> | 128002 | assistant turn |
<|tool_call|> | 128003 | start of a JSON list of function calls |
<|tool_result|> | 128004 | tool output fed back to the model |
<|end|> | 128005 | end of turn (= eos_token_id) |
Training
Stage 0: pretraining from random initialisation (dhee-pravega-og-atom)
- 30.006B tokens, 18 languages balanced at ~1.667B tokens each (Assamese, Bengali, Gujarati, Hindi, Kannada, Malayalam, Marathi, Odia, Punjabi, Sanskrit, Tamil, Telugu, English, Arabic, Spanish, French, German, Russian).
- Muon for the 2-D hidden matrices (481.7M params) and AdamW for embeddings and norms (163.9M); Warmup-Stable-Decay schedule at a peak LR of 6e-4; z-loss on output logits; 57,231 steps of 524,288 tokens.
- Continued pretraining, new in this release: a further 36,000 steps and 18.9B tokens over the same corpus as a fresh Warmup-Stable-Decay segment (peak LR 3e-4 decayed to 3e-5), to 93,231 steps and 48.9B tokens seen. Held-out perplexity improved in all 18 languages by 2.6%-5.6% (mean 13.58 -> 13.10). This instruction tuning starts from that checkpoint, not the earlier one.
Stage 1: instruction and tool-calling fine-tuning (this model)
- Data: 1.26M multi-turn conversations (559M tokens, 285M of them supervised assistant tokens):
- Glaive-style function-calling dialogues translated into 13 Indian languages (Assamese, Bengali, Gujarati, Hindi, Kannada, Malayalam, Marathi, Odia, Punjabi, Sanskrit, Sindhi, Tamil, Telugu).
- ToolACE (Apache-2.0; 16,134 distinct tool schemas), translated into 17 languages plus the English source. Indic translation used Sarvam-Translate, and European translation used MADLAD-400. The translator never saw JSON, and identifiers in prose were masked and restored.
- Rows damaged by translation (placeholder leakage) were removed.
- Objective: loss on assistant turns only, covering both prose replies and tool calls.
- Packing: whole conversations packed into 8,192-token blocks, never split.
- Optimiser: the same Muon + AdamW split as pretraining, with both learning rates at 1/6 of their pretraining peaks, 3% warmup, cosine decay to 1e-5, z-loss 1e-4.
- Schedule: 3 epochs, 12,843 steps of 131,072 tokens (1.683B tokens seen). Held-out loss bottomed at step 4,200 and rose through epochs 2 and 3, but the dev split is contaminated by construction -- every evaluation dialogue has trained siblings in other languages -- so the checkpoint was chosen on the tool-calling scores below, not on dev loss.
- Hardware: a single NVIDIA RTX Pro 6000 Blackwell (24 GB slice), ~31 hours.
- Held-out split by dialogue: every translation of an evaluation dialogue was withheld from training, so the scores below measure dialogues the model never saw in any language.
Evaluation
Each assistant turn of a held-out conversation is posed with everything before it, and the model generates freely (it is not forced into a tool call):
- Decision: the model calls a tool when the reference does, and replies in prose when it does not.
- Valid call: the call parses as the specified JSON list.
- Right tool: the function name matches the reference.
- Exact args: every argument matches after type normalisation, as a share of all tool-call turns.
- Args F1: per-argument F1 over calls with the right tool.
Indic function calling (13 languages)
Held-out dialogues from the Indic function-calling corpus. The corpus is built around a compact set of ~1,000 tool schemas, so many evaluation dialogues use tools of a kind the model saw during training: this suite measures in-domain tool use.
| Language | Decision | Valid call | Right tool | Exact args | Args F1 |
|---|---|---|---|---|---|
| Assamese | 0.97 | 0.93 | 0.93 | 0.90 | 0.97 |
| Bengali | 0.98 | 0.95 | 0.95 | 0.82 | 0.92 |
| Gujarati | 0.99 | 0.98 | 0.98 | 0.89 | 0.92 |
| Hindi | 0.97 | 0.95 | 0.95 | 0.90 | 0.96 |
| Kannada | 0.99 | 0.98 | 0.98 | 0.88 | 0.93 |
| Malayalam | 0.99 | 1.00 | 1.00 | 0.85 | 0.92 |
| Marathi | 0.98 | 0.98 | 0.98 | 0.92 | 0.95 |
| Odia | 0.98 | 0.95 | 0.95 | 0.90 | 0.97 |
| Punjabi | 0.97 | 0.97 | 0.97 | 0.89 | 0.98 |
| Sanskrit | 0.99 | 0.97 | 0.97 | 0.89 | 0.94 |
| Sindhi | 0.97 | 0.95 | 0.95 | 0.86 | 0.95 |
| Tamil | 0.99 | 0.97 | 0.97 | 0.94 | 0.95 |
| Telugu | 0.98 | 0.95 | 0.95 | 0.90 | 0.98 |
| Mean | 0.98 | 0.96 | 0.96 | 0.89 | 0.95 |
ToolACE multilingual (18 languages, broad tool coverage)
ToolACE draws on 16,134 distinct API schemas, so evaluation dialogues involve tools the model has rarely or never seen. This is the better guide to behaviour on new tools.
| Language | Decision | Valid call | Right tool | Exact args | Args F1 |
|---|---|---|---|---|---|
| English | 0.92 | 0.91 | 0.82 | 0.67 | 0.85 |
| Bengali | 0.98 | 0.88 | 0.71 | 0.41 | 0.76 |
| Spanish | 0.98 | 0.95 | 0.71 | 0.37 | 0.67 |
| Tamil | 0.93 | 0.88 | 0.70 | 0.40 | 0.67 |
| Malayalam | 0.96 | 1.00 | 0.69 | 0.40 | 0.69 |
| Telugu | 0.98 | 0.88 | 0.67 | 0.43 | 0.77 |
| Arabic | 0.98 | 0.86 | 0.66 | 0.32 | 0.66 |
| Marathi | 0.95 | 0.86 | 0.66 | 0.32 | 0.67 |
| German | 0.98 | 0.86 | 0.65 | 0.53 | 0.86 |
| Hindi | 0.94 | 0.91 | 0.65 | 0.35 | 0.68 |
| Punjabi | 0.98 | 0.86 | 0.64 | 0.26 | 0.64 |
| Assamese | 0.94 | 0.88 | 0.62 | 0.43 | 0.74 |
| Sanskrit | 0.94 | 0.83 | 0.62 | 0.33 | 0.59 |
| Gujarati | 0.98 | 0.89 | 0.61 | 0.43 | 0.83 |
| Odia | 0.91 | 0.80 | 0.60 | 0.36 | 0.70 |
| Kannada | 0.96 | 0.88 | 0.58 | 0.33 | 0.74 |
| French | 0.96 | 0.71 | 0.57 | 0.40 | 0.69 |
| Russian | 0.96 | 0.91 | 0.53 | 0.26 | 0.71 |
| Mean | 0.96 | 0.88 | 0.65 | 0.39 | 0.72 |
Each language has up to 40 sampled dialogues (2,840 assistant turns in total across both suites), so differences of under ~0.1 between individual languages are within sampling noise. Raw per-language numbers are in benchmark/tool_calling_eval.json.
Usage
Requires trust_remote_code=True (the architecture ships as modeling_dhee.py) and sentencepiece. dhee_chat.py renders conversations in the trained format and parses replies.
import torch, sentencepiece as spm
from huggingface_hub import snapshot_download
from transformers import AutoModelForCausalLM
path = snapshot_download("dheeyantra/dhee-pravega-atom-it-rp")
import sys; sys.path.insert(0, path)
from dhee_chat import build_prompt, parse_reply, load_specials
model = AutoModelForCausalLM.from_pretrained(path, trust_remote_code=True, dtype=torch.bfloat16).eval()
sp = spm.SentencePieceProcessor(model_file=f"{path}/tokenizer.model")
spec = load_specials(f"{path}/specials.json")
tools = [{"name": "get_weather",
"description": "Get the current weather for a city",
"parameters": {"type": "object",
"properties": {"city": {"type": "string", "description": "City name"}},
"required": ["city"]}}]
messages = [{"role": "user", "content": "What's the weather in Chennai right now?"}]
ids = build_prompt(sp, spec, messages, tools)
out = model.generate(torch.tensor([ids]), max_new_tokens=128, do_sample=False,
eos_token_id=spec["<|end|>"], pad_token_id=spec["<|end|>"])
reply = parse_reply(sp, spec, out[0, len(ids):].tolist())
print(reply) # {'content': '', 'tool_calls': [{'name': 'get_weather', 'arguments': {'city': 'Chennai'}}]}
# Run the tool, append the call and its result, and let the model answer from it:
messages += [{"role": "assistant", "tool_calls": reply["tool_calls"]},
{"role": "tool", "content": '{"temp_c": 31, "condition": "partly cloudy"}'}]
ids = build_prompt(sp, spec, messages, tools)
out = model.generate(torch.tensor([ids]), max_new_tokens=80, do_sample=False,
eos_token_id=spec["<|end|>"], pad_token_id=spec["<|end|>"])
print(parse_reply(sp, spec, out[0, len(ids):].tolist()))
# {'content': 'Chennai, Tamil Nadu, is now in a scorched weather.', 'tool_calls': None}
Tips
- Use greedy decoding for tool calls. For open-ended prose, sampling (temperature ~0.7) gives more natural text.
- Offer only the tools relevant to the request; fewer, well-described tools give the most reliable calls.
- The model is tuned for single-step tool use (choose a tool, fill its arguments, then answer from the result), which is the sweet spot at this size.
Limitations
This is a research preview of a small model trained from scratch, and it behaves like one.
- New tools and Indic entity names. Accuracy is highest on tools similar to those in training. With unfamiliar tools, or when an argument must be carried from Indic-script text into a Latin-script value (for example a city name written in Devanagari), the model can choose the wrong tool or produce an incorrect argument value. Validate tool calls before executing them.
- World knowledge. At 645M parameters and 30B pretraining tokens, factual knowledge is limited, and prose answers can be inaccurate. Ground answers in tool results rather than relying on the model's own recall.
- Whitespace. The tokenizer normalises whitespace, so line breaks in prompts and replies become spaces. Tool-call JSON is unaffected.
- Not safety-tuned. No preference or safety alignment has been applied.
Continued pretraining of the base model has landed and is the starting point for this release. A broader instruction-tuning mix is under way for the next one: the current corpus is 84% Indic, and English, Arabic and the European languages are each being raised to ~5% of the total.
Licence
Research use only. The model weights, configuration and tokenizer are released under the Dhee Research-Only Licence v1.0. Academic research, evaluation, benchmarking, red-teaming, teaching and personal experimentation are permitted. Commercial use is not. Commercial licences are available from Dheeyantra Research Labs on request (contact@dheeyantra.com).
The model was trained from random initialisation, so no third-party model terms apply. The source files modeling_dhee.py (derived from the Apache-2.0 OLMo-2 and Qwen3 implementations in transformers) and dhee_chat.py remain under Apache-2.0; see NOTICE.
If you redistribute the model or anything derived from it, include the LICENSE and NOTICE files.