oBunny-1.2-Instruct
oBunny-1.2-Instruct is the chat and tool-use version of oBunny-1.1: a 1.02B-parameter mixture-of-experts model that uses 106M parameters per token, pretrained from scratch on 100B tokens (mostly web text, code and math) on a single RTX 5080. It is built to be a small local assistant: it chats, writes code and files, works in a folder of files (read, write, edit, run Python and tests) and searches the web, calling tools one at a time.
What it can do, in our own tests (greedy decoding; held-out tasks from the same task generators as its training data, so they measure these tasks, not general agent ability):
- Coding in a sandbox: solves 30% of a hard 300-task set, almost all of it on the simpler task types (rename a function everywhere 70%, fix a chain of dependent bugs 56%, implement a function 50%); fixing code until the tests pass, two separate bugs and changes across several files are at 0-4% (details).
- Web search over an offline copy of Simple English Wikipedia: 44% of a 280-task set; it says so when the answer is not there (85%), but finds and reports a looked-up fact correctly only 20-30% of the time.
- Chat: knows its name and maker; answers plain requests without tools 60% of the time and makes a requested file 30% of the time (details).
It is small: it makes mistakes, it sometimes states things that are not in what it read, and it fails most multi-step tasks. It has no safety tuning. See limitations.
How it was made
Starting from the oBunny-1.1 base, supervised fine-tuning in three steps, all on the same GPU:
- SFT (216M tokens): coding-sandbox and web-search episodes written by a teacher model (Bonsai 2.5 27B) working on the same kind of tasks, teacher answers to plain chat requests (no tools) and "make me a file" requests, reading drills (find the exact fact in a page), public chat / math / code / tool-calling sets, identity conversations, conversations about what the model can and cannot do in each mode, and 10M tokens of pretraining text against forgetting.
- DAgger (2 rounds): the model itself tried ~6,300 training tasks; wherever it failed, the teacher took over from the model's own situation (its files, its earlier tool calls) and finished the task. The model learned from the teacher's turns only (5,212 kept corrections). DAgger slightly improved coding (mostly the dependent-bug tasks) and cut looping: coding episodes that repeat an identical tool call fell from 77 to 55 of 300. Search and chat scores did not change meaningfully (results).
An RL stage (GRPO, groups of 16) was tried three times and did not beat this model on held-out tests, so it is not part of this release.
Results
All numbers are our own runs with the evaluation code in code/, greedy decoding. The agent tests are
held-out tasks (problems, prompts and questions not used in training) made by the same generators and the same
offline Wikipedia as the training episodes: they show how well it learned these tasks, not general agent ability.
"After SFT" is the same model before the two DAgger rounds (not released), for comparison.
Agent tests
| Test | Tasks | After SFT | oBunny-1.2-Instruct |
|---|---|---|---|
| Coding sandbox (agent_eval3, hard set): solved | 300 | 27.0% | 30.0% |
| - rename a function everywhere | 50 | 64% | 70% |
| - fix a chain of two dependent bugs | 50 | 40% | 56% |
| - implement a function to pass tests | 50 | 54% | 50% |
| - fix code until the tests pass | 50 | 2% | 4% |
| - two separate bugs | 50 | 2% | 0% |
| - a change across several files | 50 | 0% | 0% |
| Web search (search_eval): solved | 280 | 44.6% | 44.3% |
| - look up a fact | 40 | 28% | 20% |
| - look it up and save it to a file | 40 | 30% | 30% |
| - write a research note to a file | 40 | 72% | 85% |
| - say "not found" when the web does not have it | 40 | 95% | 85% |
| - a file task that needs no search (count, list, append, calculate) | 40 | 78% | 85% |
| - two questions in one request | 40 | 10% | 3% |
| - answer the questions listed in a file | 40 | 0% | 3% |
| Make a file on request (r2_eval): wrote a suitable file | 40 | 38% | 30% |
| Plain chat request (r2_eval): answered with no tool call | 40 | 62% | 60% |
| - and the reply was 1-400 words | 40 | 38% | 33% |
The coding sandbox gives the model read_file, write_file, edit_file and run (ls, cat, grep, python,
pytest); a task counts only if the hidden check passes and the model ended with an answer. The search test uses
search_web and open_page; a task counts only if the final answer contains the right fact. The two chat rows are a
separate set of ordinary requests (writing, advice, code questions, ...) under the files + web system prompt: the
first counts replies without any tool call (the rest searched or used files when they did not need to), the second
also requires a reply of 1-400 words; neither judges the reply's quality. (The "needs no search" search-test row is
different: those tasks are about files in the user's folder.)
Noise: one score on 40-50 tasks has a standard error of up to ~8 points, so with 40-50 tasks per row, differences under ~15-20 points between the two columns can be noise; for the 300-task coding total and the 280-task search total, under ~5-7 points. Sampling 8 answers at temperature 0.7, at least one is right for 68-73% of the lookup tasks (vs 27-30% for a single sample), so the ability to read the page is often there but unreliable.
Benchmarks
| Benchmark | oBunny-1.1 (base) | After SFT | oBunny-1.2-Instruct |
|---|---|---|---|
| HumanEval pass@1 (greedy, completion prompt) | 24.4% (40/164) | 23.8% (39/164) | 23.8% (39/164) |
| GSM8K, first 300 test problems, 0-shot chat, last number in the reply | - | 17.0% | 18.3% |
| Says its name is oBunny (10 questions, with and without a system prompt) | - | 17/20 | 18/20 |
| Names Leporidae-AI as its maker | - | 14/20 | 15/20 |
| Claims to be another model or company | - | 0/20 | 0/20 |
HumanEval is unchanged by the fine-tuning (one problem). Contamination: text of 90 of the 164 HumanEval problems appears in the base model's pretraining data, but the leaked problems did not improve more than the others during pretraining (details). For reference, the base model scored 5.8% on GSM8K with the standard 8-shot prompt, a different setup that is not comparable to the 0-shot chat numbers.
Usage
With transformers (5.x; the architecture is custom, so trust_remote_code=True is needed). The tokenizer has a
chat template:
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "Leporidae-AI/oBunny-1.2-Instruct"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True)
messages = [{"role": "user", "content": "Write a Python function that checks if a word is a palindrome."}]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt", return_dict=True)
out = model.generate(**inputs, max_new_tokens=300, do_sample=False) # stops at <|end|>
print(tok.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Greedy decoding is what the tests above use; for chat, do_sample=True, temperature=0.7 also works. The weights take
~2.0 GB in bf16 (all 80 experts per layer are loaded, 4 are used per token). CUDA GPU or CPU. It is not available for
llama.cpp / Ollama / GGUF (custom architecture).
Tools
The model was trained with these two system prompts (tool lists included); use one of them, with tools of your own that behave the same way:
Files + web (the main one):
You are a helpful assistant on the user's computer. You can read and write the files in the user's folder and search the web. Use the tools when they help, one call at a time. When the task is done, reply without a tool call.
Tools:
read_file(path): Read a file and return its text.
write_file(path, content): Create a file, or replace all of its text.
edit_file(path, old, new): Replace the text old with new in a file. old must appear exactly once.
run(command): Run a command: ls, cat FILE, wc -l FILE, grep WORD [FILE], python FILE, or pytest.
search_web(query): Search the web. Returns the top 5 results, each with a title, URL and a short snippet.
open_page(url, page?): Open a web page (a URL from the search results) and return its text, about 300 words at a time.
page (integer): which part of a long page (1 = start)
Coding sandbox:
You are working in a folder of files. Use the tools to do the task, one call at a time. When the task is done, give a short answer without a tool call.
Tools:
read_file(path): Read a file and return its text.
write_file(path, content): Create a file, or replace all of its text.
edit_file(path, old, new): Replace the text old with new in a file. old must appear exactly once.
run(command): Run a command: ls, cat FILE, wc -l FILE, grep WORD [FILE], python FILE, or pytest.
A turn usually starts with a short thought between <|think|> and <|/think|>, and a turn that calls a tool ends
with <|call|> and the call: the tool name on the first line, then one <name>value</name> per argument (values are
raw text, so code needs no escaping). Run the call, add its result as a {"role": "tool", "content": ...} message,
and generate again. To read a turn, decode with skip_special_tokens=False:
import re
text = tok.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=False).replace("<|end|>", "")
thinking = "".join(re.findall(r"<\|think\|>(.*?)<\|/think\|>", text, re.S)).strip()
text = re.sub(r"<\|think\|>.*?<\|/think\|>", "", text, flags=re.S)
reply, *calls = text.split("<|call|>")
calls = [(c.strip().partition("\n")[0],
dict(re.findall(r"<([A-Za-z_][\w\-]*)>(.*?)</\1>", c.strip().partition("\n")[2], re.S))) for c in calls]
print(reply.strip(), calls) # e.g. I'll search for it. [('search_web', {'query': 'Eiffel Tower finished year'})]
When you pass that turn back in messages, use {"role": "assistant", "content": reply, "thinking": thinking, "tool_calls": [{"function": {"name": name, "arguments": args}}]} (arguments as a dict). apply_chat_template(..., tools=[...]) lists OpenAI-style tool specs in the system message in the same
compact format.
Chat format
| Marker | Id | Marker | Id | |
|---|---|---|---|---|
<|user|> | 178 | <|tool|> | 181 | |
<|assistant|> | 179 | <|system|> | 182 | |
<|end|> | 180 | <|call|> | 183 | |
<|think|> | 184 | <|/think|> | 185 |
<|bos|> [<|system|> text <|end|>] <|user|> text <|end|> <|assistant|> [<|think|> thought <|/think|>] [text] [<|call|> call]... <|end|> [<|tool|> result <|end|>]... <|assistant|> reply <|end|>. Same ids as oBunny-1.0/1.1. In
the training tokenizer (mix32768.json) these ids are bytes that text never produces. The transformers tokenizer
also turns the marker strings (e.g. <|end|>) into these tokens when they appear in text, so remove the marker
strings from untrusted input (user messages, web pages, file contents) before building the prompt.
Model details
The same architecture as oBunny-1.1: 24 layers, width 512, 80 experts per layer with 4 active per token, 1.022B parameters, 106.0M active per token; context 4,096 tokens (the 6 long-range layers see 4,096 tokens back, the 18 others 512).
Training
- Pretraining and retune: as oBunny-1.1.
- SFT: 216M tokens (loss on the assistant turns only), 1 epoch, starting from oBunny-1.1; 3.2 hours. Teacher episodes x2: coding 13,281, web search 15,980, chat / make-a-file 2,816; reading drills 12,000 (x2); public sets 100M tokens; identity 4,000; capability 3,000; pretraining replay 10M tokens.
- DAgger: 2 rounds of incremental fine-tuning (48M and 43M tokens, mostly replay of the SFT mix, plus the kept corrections x2 / x3) at half the SFT learning rate; 27 and 22 minutes.
All of it on one RTX 5080 (16 GB): about 4 GPU hours of fine-tuning; the teacher generated its data on the same GPU.
Training data
Everything in oBunny-1.1's training data, plus:
| Data | Source | License |
|---|---|---|
| Coding-sandbox, web-search, chat and make-a-file episodes; DAgger corrections | written by Bonsai 2.5 27B (Prism ML; Ternary-Bonsai-2.5-27B, built from Qwen3.8-27B) running locally on our task environments | Apache 2.0 (Bonsai and Qwen3.8) |
| Web pages the search episodes read | offline Simple English Wikipedia (tool results: shown to the model, not trained on) | CC BY-SA 4.0 |
| Chat, rewriting, constraints, function calling | HuggingFaceTB/smoltalk | Apache 2.0 |
| Math solutions | nvidia/OpenMathInstruct-2 (Llama-3.1-405B outputs) | CC BY 4.0 |
| Python instruction -> solution | nvidia/OpenCodeInstruct | CC BY 4.0 |
| Multi-turn tool calling | nvidia/Nemotron-Agentic-v1 | CC BY 4.0 |
| Code with execution feedback | m-a-p/Code-Feedback | Apache 2.0 |
| Agent trajectories with Python actions | xingyaoww/code-act | as stated on its card |
| Reading drills, identity and capability conversations, sandbox tasks | generated by our own scripts | ours |
Created using Bonsai by Prism ML.
Files
model.safetensors+config.json: the weights and the model config.tokenizer.json,tokenizer_config.json(with the chat template),special_tokens_map.json,generation_config.json,configuration_obunny.py,modeling_obunny.py,obunny_arch.py,obunny_kvdecode.py:transformerssupport.model.pt: the same weights as a PyTorch checkpoint (a pickle: only load pickles you trust).mix32768.json: the tokenizer as trained.code/: the model, the chat format, the task environments and the evaluation code;log.jsonl: the last fine-tuning run's log.MANIFEST.json: size and md5 of every file.
License
CC BY-NC 4.0 (non-commercial), because the largest pretraining source of the base model (ClimbMix) is CC BY-NC 4.0. If you use, share or adapt the model, the license asks you to credit it: "oBunny-1.2-Instruct by Leporidae-AI", with a link to this page.
Built with Llama: part of the instruction data (nvidia/OpenMathInstruct-2 and the Smol-Magpie-Ultra part of HuggingFaceTB/smoltalk) was generated by Llama-3.1-405B-Instruct. Llama 3.1 is licensed under the Llama 3.1 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.
Intended use and limitations
Intended for research, education, hobby projects and non-commercial local assistants, and as a small, fast model to study and fine-tune.
- Small model, real mistakes: it gets facts wrong, and in search tasks it sometimes gives an answer that is not in the page it read (about 1 in 7 search episodes). Check what matters.
- Multi-step tasks mostly fail: two bugs at once, changes across several files, two questions in one request.
- No safety tuning: it was not trained to refuse harmful requests, and its occasional refusals are inconsistent. It can produce biased, toxic or insecure output. Do not let it run code or change files you care about without review: it was trained in a sandbox.
- Not for sensitive uses: not suitable for medical, legal or mental-health advice, or as a companion for vulnerable users or minors.
- Math: weak (GSM8K ~18%); it was not tuned to reason step by step.
- Mostly English and code (mostly Python).
- Context: the last 4,096 tokens; long tool results fill it quickly.
Citation
@misc{obunny2026instruct,
title = {oBunny-1.2-Instruct: a 1B mixture-of-experts assistant trained from scratch on one consumer GPU},
author = {Leporidae-AI},
year = {2026},
url = {https://huggingface.co/Leporidae-AI/oBunny-1.2-Instruct}
}