Model reference · open weights
MNN-Pocket-0.3B is an open-weight language model from taobao-mnn. MNN-Pocket-0.3B (BF16) weighs 723 MB; the smallest configuration that runs it is RTX 3060 12 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the taobao-mnn/MNN-Pocket-0.3B model card, 2026-11-07
What it is
| Released by | taobao-mnn |
|---|---|
| Released | 2026-09-23 |
| Parameters | 362M |
| VRAM | 723 MB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory | |
|---|---|---|---|---|
| 8K each | 32K each | |||
| RTX 3060 12 GB | 88 | 22 | all 40K | 11.6 GB |
| RTX 4060 Ti 16 GB | 120 | 30 | all 40K | 15.4 GB |
| RTX 3090 24 GB | 188 | 47 | all 40K | 23.4 GB |
| RTX 4090 24 GB | 188 | 47 | all 40K | 23.4 GB |
| RTX 5090 32 GB | 253 | 63 | all 40K | 31.0 GB |
| L40S 48 GB | 363 | 90 | all 40K | 44.0 GB |
| A100 80 GB | 655 | 163 | all 40K | 78.2 GB |
| H100 80 GB | 629 | 157 | all 40K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 762 | 190 | all 40K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 878 | 219 | all 40K | 107 GB |
| H200 141 GB | 1000+ | 284 | all 40K | 138 GB |
| B200 180 GB | 1000+ | 365 | all 40K | 176 GB |
| Requests at once | 8K tokens each | 32K tokens each |
|---|---|---|
| 1 | 1.4 GB | 1.7 GB |
| 5 | 1.8 GB | 3.6 GB |
| 8 | 2.2 GB | 5.0 GB |
| 16 | 3.1 GB | 8.8 GB |
| 32 | 5.0 GB | 16.3 GB |
| 64 | 8.8 GB | 31.3 GB |
One card, with vLLM's small-card settings.
From the model card
English |
MNN-Pocket is a family of compact language models co-designed with the MNN inference stack for on-device deployment. MNN-Pocket-0.3B is the general-purpose, instruction-tuned member of the family.
Your browser does not support the video tag.
| Model | Parameters | Description |
|---|---|---|
| MNN-Pocket-0.3B-Base | 300M | Pre-trained base model for fine-tuning |
| MNN-Pocket-0.3B-SFT | 300M | Supervised fine-tuning (SFT) checkpoint, intermediate stage for research and ablation |
| MNN-Pocket-0.3B | 300M | General-purpose instruction-tuned model |
| MNN-Pocket-0.3B-GGUF | 300M | GGUF for llama.cpp: F16 / Q8_0 from the BF16 checkpoint, Q4_1 from the QAT checkpoint |
| MNN-Pocket-0.3B-MNN | 300M | INT4 (W4A16) QAT MNN build for on-device deployment |
| MNN-Pocket-0.3B-Dec | 300M | Non-autoregressive decision model: LoRA adapter + pointer head, answers every question in one forward pass |
Architecture:
MNN-Pocket-0.3B is intended for on-device assistants, data extraction, and lightweight agentic pipelines. Like other sub-billion-parameter models, it is not recommended for reasoning-heavy workloads such as advanced mathematics or long-horizon code generation.
MNN-Pocket uses a ChatML-style conversation format. The exact template (including the im_start / im_end control tokens) ships in this repo as chat_template.jinja; prefer tokenizer.apply_chat_template() so formatting stays correct automatically. Schematic:
[IM_START]system
You are a helpful assistant.[IM_END]
[IM_START]user
Hello![IM_END]
[IM_START]assistant
from transformers import AutoTokenizer
tok = AutoTokenizer.from_pretrained("taobao-mnn/MNN-Pocket-0.3B")
text = tok.apply_chat_template(
[{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}],
add_generation_prompt=True, tokenize=False)
MNN-Pocket is optimized for the MNN runtime but also runs in Transformers and llama.cpp.
On-device with MNN: the INT4 (W4A16, block 64) QAT build is published as MNN-Pocket-0.3B-MNN.
For other precisions, export from the safetensors in this repo with llmexport:
# Download the MNN source
git clone https://github.com/alibaba/MNN.git
# Export to MNN (INT4, block 64)
cd MNN/transformers/llm/export
python llmexport.py --path /path/to/MNN-Pocket-0.3B --export mnn --quant_bit 4 --quant_block 64
Build flags, config.json options and llmexport parameters are in the MNN-LLM doc.
With the MNN weights in hand — the published INT4 build or your own export — build the runtime and run it:
# Download the MNN source (only needed if you have not cloned it yet)
git clone https://github.com/alibaba/MNN.git
# Build
cd MNN
mkdir build && cd build
cmake .. -DMNN_LOW_MEMORY=true -DMNN_BUILD_LLM=true -DMNN_SUPPORT_TRANSFORMER_FUSE=true
make -j
# Run
./llm_demo /path/to/MNN-Pocket-0.3B-MNN/config.json prompt.txt
Transformers:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "taobao-mnn/MNN-Pocket-0.3B"
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", dtype="bfloat16")
tokenizer = AutoTokenizer.from_pretrained(model_id)
messages = [{"role": "user", "content": "What is MNN?"}]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True,
return_tensors="pt", tokenize=True, return_dict=True).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, do_sample=True,
temperature=0.8, top_p=0.8, top_k=20)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
llama.cpp: see MNN-Pocket-0.3B-GGUF.
Post-trained MNN-Pocket-0.3B vs. same-size and larger open models (higher is better). Full protocol in the tech report.
| Benchmark | MNN-Pocket-0.3B | -INT4 | Gemma-3-270M | ERNIE-4.5-0.3B | LFM2.5-350M | SmolLM2-360M | Hunyuan-0.5B | MiniCPM4-0.5B | Qwen3-0.6B |
|---|---|---|---|---|---|---|---|---|---|
| Average | 50.00 | 49.59 | 6.42 | 31.99 | 31.28 | 18.43 | 31.22 | 46.81 | 44.28 |
| C-Eval | 38.86 | 40.27 | 6.84 | 32.17 | 32.10 | 23.77 | 35.29 | 67.98 | 44.06 |
| CMMLU | 40.11 | 39.65 | 4.94 | 33.91 | 31.65 |
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.