Run this model with HF Jobs
Run nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base") model = AutoModelForCausalLM.from_pretrained("nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base:F16 # Run inference directly in the terminal: llama cli -hf nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base:F16 # Run inference directly in the terminal: llama cli -hf nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base:F16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base:F16
Use Docker
docker model run hf.co/nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base:F16
- SGLang
How to use nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base with Ollama:
ollama run hf.co/nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base:F16
- Unsloth Desktop
- Docker Model Runner
How to use nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base with Docker Model Runner:
docker model run hf.co/nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base:F16
- Lemonade
How to use nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base:F16
Run and chat with the model
lemonade run user.tinybrainbot-61m-a10m-v4.1-moe-base-F16
List all available models
lemonade list
- Atomic Chat
TinyBrainBot-61M-A10M-v4.1-MoE-Base
The first mixture-of-experts TinyBrainBot and the first model of the v4.1 series. Every layer holds 16 experts and each token is routed to 2 of them, so the model stores 60.6M parameters but runs only 10.0M per token (non-embedding; plus a 3.6M tied embedding).
It was trained on exactly the same 11B tokens, in the same order, with the same schedule and tokenizer as the v4 scaling study's dense models, so the comparison below isolates one change: dense feed-forward layers vs experts. At the compute of the dense 10M it scores higher on 10 of 13 benchmarks and averages 37.5 against the dense 10M's 36.5, and it beats every model here, including the dense 25M, on MMLU, PIQA, MathQA and ARC-Challenge.
| Benchmark (0-shot) | MoE 61M (10M active) | dense 10M | dense 25M | Pythia-70M | Pythia-31M |
|---|---|---|---|---|---|
| ARC-Easy | 42.2 | 40.2 | 42.7 | 36.0 | 33.7 |
| ARC-Easy (raw acc) | 45.1 | 42.8 | 47.3 | 38.2 | 37.2 |
| ARC-Challenge | 25.0 | 23.1 | 24.9 | 21.8 | 21.0 |
| ARC-Challenge (raw acc) | 20.4 | 18.9 | 21.0 | 17.6 | 16.6 |
| SciQ | 61.7 | 58.4 | 65.9 | 56.4 | 51.5 |
| SciQ (raw acc) | 69.4 | 68.8 | 73.7 | 64.0 | 60.0 |
| OpenBookQA | 28.6 | 28.2 | 31.2 | 25.4 | 26.8 |
| OpenBookQA (raw acc) | 16.8 | 15.4 | 17.2 | 12.6 | 13.0 |
| MMLU | 26.0 | 23.1 | 23.7 | 22.9 | 22.9 |
| HellaSwag | 36.5 | 35.1 | 37.2 | 33.8 | 33.6 |
| HellaSwag (raw acc) | 32.6 | 32.2 | 32.5 | 30.8 | 31.2 |
| PIQA | 60.8 | 57.3 | 60.2 | 59.2 | 56.6 |
| PIQA (raw acc) | 60.9 | 59.6 | 60.0 | 59.8 | 57.5 |
| WinoGrande | 51.4 | 51.5 | 52.6 | 52.9 | 49.3 |
| Social IQa | 36.4 | 36.1 | 37.2 | 35.4 | 35.1 |
| CommonsenseQA | 19.2 | 20.6 | 20.3 | 19.8 | 19.7 |
| LAMBADA (OpenAI) | 21.1 | 17.6 | 23.4 | 23.4 | 17.8 |
| BoolQ | 56.0 | 60.8 | 58.8 | 59.6 | 51.0 |
| MathQA | 23.1 | 21.9 | 21.9 | 20.4 | 19.5 |
| MathQA (raw acc) | 24.2 | 22.0 | 23.2 | 20.9 | 19.2 |
| Average (13) | 37.5 | 36.5 | 38.5 | 35.9 | 33.7 |
| LAMBADA perplexity (lower is better) | 151 | 311 | 125 | 129 | 270 |
EleutherAI lm-eval-harness v0.4.13, 0-shot, up to 2,000 examples per task. Each task's first row is
acc_norm where the task reports it (acc otherwise); the "(raw acc)" row under it is acc. The
average uses the first rows. Every model was run by us on the same harness and settings.
Quick start
It is a standard Mixtral model, so it needs no custom code:
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo)
ids = tok("Once upon a time, a little fox", return_tensors="pt").input_ids
out = model.generate(ids, max_new_tokens=80) # defaults from generation_config.json
print(tok.decode(out[0], skip_special_tokens=True))
GGUF (llama.cpp, LM Studio, Ollama): tinybrainbot-61m-a10m-v4.1-moe-base-F16.gguf (129 MB). It
tokenizes and generates identically to the transformers version.
llama-completion -m tinybrainbot-61m-a10m-v4.1-moe-base-F16.gguf -no-cnv -p "Once upon a time, a little fox" -n 80 --temp 0.7 --repeat-penalty 1.15
Default sampling: temperature 0.7, top_p 0.95, top_k 40, repetition_penalty 1.15.
Samples
Unedited, at the default settings.
Once upon a time, a little fox named Sammy had an idea. He wanted to create an amazing treehouse made of pebbles and stones so that it could be easily accessed by everyone.
Photosynthesis is the process by which plants absorb light energy and convert it into chemical energy.
The best way to learn a new language is to try it out. To learn a new language, you need to know the words and phrases that make up the language.
Model
| Architecture | Mixtral-style sparse MoE decoder: RoPE, RMSNorm, grouped-query attention, SwiGLU experts |
| Shape | hidden 256, 14 layers, 4 heads of 64, 2 KV heads; 16 experts of width 336 per layer, top-2 routing |
| Parameters | 60.62M non-embedding total, 10.04M active per token, + 3.58M tied embedding |
| Context | 1,024 tokens |
| Vocabulary | 14,000 (the v4 byte-level BPE: digits split, newlines kept, no unknown tokens) |
Attention is identical to the dense 10M; only the feed-forward layer changes. Its width (672) is split into experts of half that width, and each token uses two, so a token costs exactly what it costs in the dense model while the layer stores 8x the feed-forward parameters. Routing is Mixtral's (softmax over the experts, keep the top 2, renormalise their weights), trained with a 0.01 load-balancing loss, which keeps all 16 experts in use: in a typical training batch the least-used expert still gets about half of its fair share of tokens.
Training
11.0B tokens on 2x Tesla V100 16GB, about 25.5 hours, fp16, AdamW (0.9, 0.95), weight decay 0.1, peak LR 3e-3, 131k tokens per step, warmup-stable-decay - the v4 scaling study's exact data and schedule. The expert layers run on the sigma-MoE Triton kernel (Csordas et al.), which fuses token routing into the matrix multiply.
| Group | Share | Sources |
|---|---|---|
| Web | 37% | FineWeb-Edu 28, DCLM 9 |
| Reference | 13.5% | Wikipedia article leads 12, full Wikipedia 1.5 |
| Narrative | 11% | Project Gutenberg 8, BookCorpusOpen 3 |
| Code | 9% | The Stack (smol) 7.5, Python/JS 1.5 |
| Math | 9% | MegaMath-Web-Pro 6, FineMath-4+ 3 |
| Synthetic textbooks | 7.5% | Cosmopedia (Stanford, OpenStax, auto-math) |
| Q&A and facts | 7% | distilled Q&A, short facts, cause-and-effect explanations |
| Educational PDFs | 5.5% | FinePDFs-Edu |
| Reasoning | 0.5% | distilled short reasoning |
Then 500M tokens of the same mix plus 7.8% generated everyday-commonsense, procedural, worked arithmetic and short-fact writing (no benchmark data), and an 803M-token fact-dense anneal while the learning rate decays to zero.
Reproduce the benchmarks
lm_eval --model hf --model_args pretrained=nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base,dtype=float32 \
--tasks arc_easy,arc_challenge,sciq,openbookqa,mmlu,hellaswag,piqa,winogrande,social_iqa,commonsense_qa,lambada_openai,boolq,mathqa \
--num_fewshot 0 --limit 2000 --batch_size 8 --seed 1234
TinyBrainBot v4.1 (mixture of experts)
- TinyBrainBot-61M-A10M-v4.1-MoE-Base (this model)
Dense comparison models: TinyBrainBot-25M-v4-Base and the v4 scaling study (500K to 25M).
- Downloads last month
- 134
Datasets used to train nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base
wikimedia/wikipedia
mlfoundations/dclm-baseline-1.0
Collections including nkthebass/tinybrainbot-61m-a10m-v4.1-moe-base
Evaluation results
- acc_norm (0-shot) on ARC-Easytest set self-reported42.200
- acc_norm (0-shot) on ARC-Challengetest set self-reported25.000
- acc_norm (0-shot) on SciQtest set self-reported61.700
- acc_norm (0-shot) on OpenBookQAtest set self-reported28.600
- acc (0-shot) on MMLUtest set self-reported26.000
- acc_norm (0-shot) on HellaSwagvalidation set self-reported36.500
- acc_norm (0-shot) on PIQAvalidation set self-reported60.800
- acc (0-shot) on WinoGrandevalidation set self-reported51.400