TinyBrainBot-3M-DSi-Chat

A 2.9-million-parameter chat model that answers in one or two short sentences, packed into a single 3 MB int8 file. It is a for-fun research model: small enough to aim at a Nintendo DSi (16 MB of RAM), and tuned to say so.

You Model
hey whats up Hey there! Just chillin' and ready to chat.
what are you? I'm just a tiny language model running on a DSi.
i had a bad day Oh no, I'm sorry. That's rough.
i got a new puppy today! That is so cool! What kind of puppy is it?
his name is max Nice to meet you, Max.
do you like pizza I don't eat, but I'd probably pick pancakes. They seem fun.
tell me a joke Why did the math book look sad? It had too many problems.
ok bye See you later! Talk soon.

These are real greedy outputs. It also gets things wrong a lot, as any 3M model does: see Limits and the unedited chats in samples.md.

Parameters 2,942,928
Shape Llama-style decoder: 10 layers, width 144, 3 heads sharing 1 key/value head, SwiGLU 416
Tokenizer 4,096-token byte-level BPE, digits split one by one
Base model TinyBrainBot-3M-v2-Base, trained from scratch
Chat tune 94,049 short chats (179k exchanges, 9.0M tokens), then a short identity stage
Reply length every training turn is at most 2 sentences and 30 words

Files

File Size What it is
tinybrainbot-3m-dsi.bin 3.07 MB int8 weights, settings and tokenizer in one flat file, for a hand-written runtime
dsi_ref.py 8 KB reference reader for that file: tokenizer and inference in plain numpy
FORMAT.md the file layout and the model's math, written out for a port
model.safetensors + tokenizer files 11.8 MB the fp32 model for transformers
tinybrainbot-3m-dsi-chat-F16.gguf 6.0 MB for llama.cpp, LM Studio and Jan
samples.md unedited sample chats, greedy and sampled

Try it

With the flat file and numpy only:

python dsi_ref.py tinybrainbot-3m-dsi.bin

With transformers:

from transformers import AutoModelForCausalLM, AutoTokenizer

tok = AutoTokenizer.from_pretrained("nkthebass/tinybrainbot-3m-dsi-chat")
model = AutoModelForCausalLM.from_pretrained("nkthebass/tinybrainbot-3m-dsi-chat")

chat = [{"role": "user", "content": "hey whats up"}]
prompt = tok.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
ids = tok(prompt, return_tensors="pt", add_special_tokens=False)
out = model.generate(**ids, max_new_tokens=60, do_sample=False, repetition_penalty=1.15)
print(tok.decode(out[0][ids["input_ids"].shape[1]:], skip_special_tokens=True))

The prompt format is <|user|>, newline, the message, newline, <|end|>, newline, then <|assistant|> and a newline. Generation stops at <|end|>. Do not add a start-of-text token; the GGUF is set up not to.

About the DSi

The model is sized for the console, and the flat file is the part of a port that depends on the model. No DSi program is included here, and the numbers below are from a PC.

  • The fp32 weights are 11.8 MB, too much for a 16 MB machine. The int8 file is 3.07 MB.
  • One new token costs about 2.9 million multiply-adds, plus attention over the context.
  • The DSi has no floating-point unit, so a port would run in fixed-point math. dsi_ref.py uses floats for the activations to stay readable.
  • The model says it is running on a DSi wherever it runs. That line is trained in.

The int8 file, checked

Check Result
Held-out loss, fp32 weights 1.9131
Held-out loss, int8 weights 1.9144
Reference tokenizer vs the Hugging Face tokenizer identical on 22,004 of 22,004 texts
Greedy replies, numpy reference vs transformers with the same int8 weights identical on 14 of 14 prompts
Greedy replies, int8 vs fp32 identical on 11 of 14 prompts; the other 3 differ by a word or two

Each weight row is stored as int8 with its own scale. Norm weights stay fp32 (3 KB in total).

Training

Base. TinyBrainBot-3M-v2-Base is trained from scratch on general text, Q&A and arithmetic. It had never seen the chat tokens used here.

Stage 1, short dialogue. Every weight was trained for 6 passes over 94,049 chats, with the loss on the model's side of the chat only. Held-out loss went from 3.38 to 1.85. Each chat is the longest opening stretch of a longer conversation in which every turn, on both sides, is one line of at most 2 sentences and 30 words. In a quarter of the chats the user side is lower-cased with the end punctuation dropped, the way people type on a small keyboard.

Source Chats What it is
Wide everyday chat 29,340 written by DeepSeek V4 Flash from our topic lists
EmpatheticDialogues 16,196 human-written, one side listens and reacts; replies that claim a human life removed
Chat flow 10,462 our templates: reactions, sign-offs, follow-up questions
Chill chat 7,271 casual chats written by small local models (granite-4.0-1b, LFM3-1.7B, LFM2.5-1.2B)
Everyday multi-turn 6,501 written by DeepSeek V4 Flash
Small-talk pairs 5,664 an older synthetic set of ours; some replies talk as if the model had a daily life
Honest friend + life talk 6,921 written by a local Qwen3.5-9B: kind disagreement, plain replies to everyday worries
Identity (first version) 3,000 our templates; replaced by stage 2
Mid-chat questions, recall, basics 5,572 our templates
Chat arithmetic 2,000 generated in Python
SmolTalk2 everyday conversations 1,622 from HuggingFaceTB/smoltalk2

The counts add up to 94,549: 500 chats were held out to measure the loss.

Stage 2, identity. Two more passes at a quarter of the learning rate over 4,000 templated chats plus 20,000 of the stage-1 chats. In the templated chats, "what are you?", "who are you", "are you a robot?", "what are you running on?" and similar questions get "I'm just a tiny language model running on a DSi." Half of them ask it in the middle of an ordinary chat. Every earlier identity answer was removed from the 20,000, so nothing contradicts the new line.

On 18 identity questions, 7 of them phrased in ways the templates never use, the model gives the DSi line on 16. The two misses are "what is talking to me right now" and "yo what even is this". Four unrelated questions ("how are you", "what are you doing?", "what is a dog?", "what is your favorite color") do not trigger it.

Limits

  • It is wrong a lot. Facts, arithmetic and anything that needs reasoning are unreliable. what is 7 + 5? got "7 + 5 = 12. You have 12 toy." in one run and "7 + 5 is 9." in another.
  • It loses the thread. After a joke, "haha another one" got "Good night! Hope tomorrow is a good one."
  • It talks nonsense with confidence. "its raining outside" got "Try a new bike and a new car. You can use a fabric, a hood, and a carpet."
  • Short replies only. It was trained on nothing longer than two sentences per turn.
  • English only, and no safety tuning. It is a toy; do not rely on anything it says.
  • Not benchmarked. The base model's scores are on its own card; this tune was judged on chat samples only.

Licences

The model is released under Apache-2.0. Two of the chat sources carry their own terms: EmpatheticDialogues is CC BY-NC 4.0, and the chill-chat set was written partly by LFM models (LFM Open License). Check those before any commercial use.

Downloads last month
-
Safetensors
Model size
2.94M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for nkthebass/tinybrainbot-3m-dsi-chat

Quantized
(1)
this model

Datasets used to train nkthebass/tinybrainbot-3m-dsi-chat

Collection including nkthebass/tinybrainbot-3m-dsi-chat