Text Generation
Transformers
Safetensors
English
lfm2_moe
wiuai
from-scratch
small-language-model
mixture-of-experts
Mixture of Experts
hybrid-architecture
short-convolution
attention
sparse-computation
coding
code-generation
instruction-following
tool-calling
reasoning
conversational
chat
Instructions to use WithinUsAI/WIUAI.Flash.MoE.Coder.Instruct.53m.a9m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WithinUsAI/WIUAI.Flash.MoE.Coder.Instruct.53m.a9m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="WithinUsAI/WIUAI.Flash.MoE.Coder.Instruct.53m.a9m") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("WithinUsAI/WIUAI.Flash.MoE.Coder.Instruct.53m.a9m") model = AutoModelForCausalLM.from_pretrained("WithinUsAI/WIUAI.Flash.MoE.Coder.Instruct.53m.a9m", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use WithinUsAI/WIUAI.Flash.MoE.Coder.Instruct.53m.a9m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "WithinUsAI/WIUAI.Flash.MoE.Coder.Instruct.53m.a9m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WithinUsAI/WIUAI.Flash.MoE.Coder.Instruct.53m.a9m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/WithinUsAI/WIUAI.Flash.MoE.Coder.Instruct.53m.a9m
- SGLang
How to use WithinUsAI/WIUAI.Flash.MoE.Coder.Instruct.53m.a9m 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 "WithinUsAI/WIUAI.Flash.MoE.Coder.Instruct.53m.a9m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WithinUsAI/WIUAI.Flash.MoE.Coder.Instruct.53m.a9m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "WithinUsAI/WIUAI.Flash.MoE.Coder.Instruct.53m.a9m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WithinUsAI/WIUAI.Flash.MoE.Coder.Instruct.53m.a9m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use WithinUsAI/WIUAI.Flash.MoE.Coder.Instruct.53m.a9m with Docker Model Runner:
docker model run hf.co/WithinUsAI/WIUAI.Flash.MoE.Coder.Instruct.53m.a9m
File size: 6,047 Bytes
ecd3d2c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | ---
license: apache-2.0
language:
- en
library_name: transformers
pipeline_tag: text-generation
tags:
- WIUAI.Flash.MoE.Coder.instruct.53m
- small-language-model
- from-scratch
- mixture-of-experts
- moe
- lfm2_moe
- hybrid
- tool-calling
- reasoning
- conversational
- gguf
datasets:
- HuggingFaceFW/fineweb-edu
- mlfoundations/dclm-baseline-1.0
- wikimedia/wikipedia
- HuggingFaceTB/cosmopedia
- HuggingFaceTB/smollm-corpus
- HuggingFaceTB/finemath
- OctoThinker/MegaMath-Web-Pro-Max
- HuggingFaceFW/finepdfs-edu
- bigcode/the-stack-smol
- manu/project_gutenberg
- lucadiliello/bookcorpusopen
- roneneldan/TinyStories
- ArrowLabs/DCLM-Ultra-1.1
- AxiomicLabs/FactBase-DCLM
- sentence-transformers/gooaq
- sentence-transformers/eli5
- HuggingFaceFW/finephrase
- microsoft/orca-math-word-problems-200k
- HuggingFaceTB/smol-smoltalk
- HuggingFaceTB/smoltalk
- allenai/tulu-3-sft-personas-instruction-following
- allenai/WildChat-4.8M
- teknium/OpenHermes-2.5
- NousResearch/hermes-function-calling-v1
model-index:
- name: WIUAI.Flash.MoE.Coder.instruct.53m
results:
- task:
type: text-generation
dataset:
type: allenai/ai2_arc
name: ARC-Easy
config: ARC-Easy
split: test
metrics:
- type: acc_norm
value: 49.71
name: acc_norm (0-shot)
- task:
type: text-generation
dataset:
type: allenai/ai2_arc
name: ARC-Challenge
config: ARC-Challenge
split: test
metrics:
- type: acc_norm
value: 30.29
name: acc_norm (0-shot)
- task:
type: text-generation
dataset:
type: Rowan/hellaswag
name: HellaSwag
split: validation
metrics:
- type: acc_norm
value: 30.10
name: acc_norm (0-shot)
- task:
type: text-generation
dataset:
type: ybisk/piqa
name: PIQA
split: validation
metrics:
- type: acc_norm
value: 64.04
name: acc_norm (0-shot)
- task:
type: text-generation
dataset:
type: allenai/openbookqa
name: OpenBookQA
config: main
split: test
metrics:
- type: acc_norm
value: 32.40
name: acc_norm (0-shot)
- task:
type: text-generation
dataset:
type: allenai/sciq
name: SciQ
split: test
metrics:
- type: acc_norm
value: 63.90
name: acc_norm (0-shot)
- task:
type: text-generation
dataset:
type: allenai/winogrande
name: WinoGrande
config: winogrande_xl
split: validation
metrics:
- type: acc
value: 49.41
name: acc (0-shot)
- task:
type: text-generation
dataset:
type: google/boolq
name: BoolQ
split: validation
metrics:
- type: acc
value: 58.72
name: acc (0-shot)
- task:
type: text-generation
dataset:
type: EleutherAI/lambada_openai
name: LAMBADA (OpenAI)
split: test
metrics:
- type: acc
value: 22.88
name: acc (0-shot)
- task:
type: text-generation
dataset:
type: cais/mmlu
name: MMLU
config: all
split: test
metrics:
- type: acc
value: 24.82
name: acc (0-shot)
- task:
type: text-generation
dataset:
type: tau/commonsense_qa
name: CommonsenseQA
split: validation
metrics:
- type: acc
value: 21.70
name: acc (0-shot)
- task:
type: text-generation
dataset:
type: allenai/social_i_qa
name: Social IQa
split: validation
metrics:
- type: acc
value: 37.67
name: acc (0-shot)
---
# WIUAI.Flash.MoE.Coder.instruct.53m
A tiny chat model with **thinking and tool calling**, trained from scratch. It's the first TinyBrainBot on a new
**hybrid architecture**: gated short-convolution blocks plus a few attention blocks, with a mixture of experts. 53.4M
parameters in total, **9.3M active per token**. The layout matches LiquidAI's LFM2-MoE, so it runs **natively** in
llama.cpp, LM Studio and Ollama, and in transformers >= 5 as `Lfm2MoeForCausalLM`: no custom code.
It's the small-scale test of the recipe and architecture planned for a larger WIUAI.Flash.MoE.Coder.instruct.53m. Expect a tiny model:
fluent and quick, often right on simple facts, unreliable on arithmetic and multi-step instructions.
| Benchmark (0-shot, full test sets) | **This model** | Base before fine-tuning | Change |
|---|--:|--:|--:|
| ARC-Easy (acc_norm) | 49.71 | 49.66 | +0.04 |
| *(raw acc)* | *55.47* | *55.81* | |
| ARC-Challenge (acc_norm) | 30.29 | 29.44 | +0.85 |
| *(raw acc)* | *26.96* | *26.71* | |
| HellaSwag (acc_norm) | 30.10 | 30.13 | -0.03 |
| *(raw acc)* | *28.18* | *28.23* | |
| PIQA (acc_norm) | 64.04 | 63.22 | +0.82 |
| *(raw acc)* | *63.66* | *63.76* | |
| OpenBookQA (acc_norm) | 32.40 | 32.80 | -0.40 |
| *(raw acc)* | *20.60* | *21.20* | |
| SciQ (acc_norm) | 63.90 | 63.70 | +0.20 |
| *(raw acc)* | *72.90* | *72.90* | |
| WinoGrande (acc) | 49.41 | 49.33 | +0.08 |
| BoolQ (acc) | 58.72 | 58.26 | +0.46 |
| LAMBADA (OpenAI) (acc) | 22.88 | 21.00 | +1.88 |
| MMLU (acc) | 24.82 | 23.42 | +1.40 |
| CommonsenseQA (acc) | 21.70 | 20.15 | +1.56 |
| Social IQa (acc) | 37.67 | 38.08 | -0.41 |
| ArithMark-3 (acc_norm) | 43.90 | 52.90 | -9.00 |
| *held-out arithmetic (our probe: skills ArithMark-3 doesn't test)* | *40.94* | *40.80* | *+0.14* |
|