Use AIUnderstand AIBuild with AI
Build with AI·Model deep dive·· 4 min read

Run MNN-Pocket-0.3B: A 300M Model Built for Phones and Tablets

MNN-Pocket-0.3B is a 300M-parameter bilingual chat model with a 173 MB INT4 build. Here is how to run it, what the card says it can do, and where it falls short.

The code in this post comes from the model's docs and hasn't been run in our CI yet. If something breaks, let us know.

MNN-Pocket-0.3B is a roughly 300M-parameter instruction-tuned chat model from the MNN team (the taobao-mnn organization), released under Apache-2.0. It is part of the MNN-Pocket family of compact language models “co-designed with the MNN inference stack for on-device deployment”. The notable part is the size: the INT4 (W4A16) quantization-aware-training build occupies 173 MB, and the card reports up to 466 tokens per second of decoding on an iPad Pro M5 using Metal.

The card says it is intended for on-device assistants, data extraction and lightweight agentic pipelines, and that it is not recommended for reasoning-heavy work such as advanced mathematics or long-horizon code generation.

Key specs

Parameters ~300M
Layers / hidden size 28 / 896
Attention 14 heads, GQA with 2 KV heads, head_dim 64
FFN intermediate 2560 (SiLU)
Context 40,960 positions; 32K supported in deployment
Vocabulary 65,536, with tied input/output embeddings
Languages Chinese, English
Precision bfloat16 native; INT4 W4A16 in the MNN build
License Apache-2.0

The family also includes a Base model, an SFT checkpoint, GGUF and MNN builds, and a non-autoregressive decision model (MNN-Pocket-0.3B-Dec) that answers each question in one forward pass. This post covers the general-purpose instruction-tuned model.

What the card reports

Scores are from the card’s own comparison against same-size and larger open models:

Benchmark MNN-Pocket-0.3B Qwen3-0.6B MiniCPM4-0.5B
Average (11 zh/en benchmarks) 50.00 44.28 46.81
IFEval 73.20 56.93 52.13
GSM8K 54.36 45.49 42.46
HumanEval 53.66 36.59 48.17
MATH500 35.40 45.20 23.00
C-Eval 38.86 44.06 67.98
CMMLU 40.11 44.50 66.04

The pattern is mixed. It leads on average, instruction following and the code and grade-school math benchmarks above, but trails Qwen3-0.6B on MATH500 and trails both of these models on the Chinese knowledge benchmarks C-Eval and CMMLU. The card describes the average as the best among models of about 300M parameters; the full protocol is in the linked tech report.

The INT4 build scores 49.59 on average against 50.00 for the full-precision model, which the card describes as quantization largely preserving quality.

On-device speed from the card (INT4 build, 512-token context):

Device Backend Prefill (tok/s) Decode (tok/s)
iPad Pro M5 Metal 8,721 466
iPad Pro M5 CPU 2,228 231
Snapdragon 8 Gen 5 OpenCL 3,403 138
Snapdragon 8 Gen 5 CPU 930 251

Run it with Transformers

This is the card’s own example. The prompt is the card’s “What is MNN?” message:

chat.py
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))

The sampling settings (temperature=0.8, top_p=0.8, top_k=20) come from the card. The model uses a ChatML-style format with a template shipped as chat_template.jinja, and the card says to prefer tokenizer.apply_chat_template() so the formatting stays correct.

To try a task the card lists as intended use, such as data extraction, you can change the messages list. The card does not show an extraction example or report an extraction benchmark, so treat the output as something to verify:

messages.py
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Pull the date and the amount out of this note: 'Rent of 950 is due on March 3.'"},
]

The system message matches the one in the card’s template example.

Run it on a device with MNN

The INT4 build is published separately as taobao-mnn/MNN-Pocket-0.3B-MNN. With those weights, the card builds the MNN runtime from source and runs it:

Terminal window
git clone --depth 1 https://github.com/alibaba/MNN.git
cd MNN
mkdir build && cd build
cmake .. -DMNN_LOW_MEMORY=true -DMNN_BUILD_LLM=true -DMNN_SUPPORT_TRANSFORMER_FUSE=true
make -j
./llm_demo /path/to/MNN-Pocket-0.3B-MNN/config.json prompt.txt

For other precisions, the card exports from the safetensors in the main repo with llmexport:

Terminal window
cd MNN/transformers/llm/export
python llmexport.py --path /path/to/MNN-Pocket-0.3B --export mnn --quant_bit 4 --quant_block 64

The card points to the MNN-LLM documentation for build flags, config.json options and llmexport parameters. For llama.cpp, it points to the separate MNN-Pocket-0.3B-GGUF repo.

Gotchas

  • Not for hard reasoning. The card says so directly, and its MATH500 score (35.40) is below Qwen3-0.6B’s (45.20).
  • Only two languages. The card lists Chinese and English.
  • Chinese knowledge benchmarks lag. C-Eval and CMMLU are well behind MiniCPM4-0.5B in the card’s table, so don’t assume the bilingual average means strong factual recall in Chinese.
  • Context is 32K in deployment, even though the card lists 40,960 positions.
  • The best speed numbers use the MNN build. The Transformers path is the card’s general option, and the speed table is for the INT4 MNN build on specific devices.
  • The card’s numbers are the team’s own. Run your own evaluation on your task before depending on it.

When to pick it

Pick it if you need a very small English and Chinese chat model that can ship inside a phone or tablet app, and your tasks are short: instruction following, light extraction, simple assistants. The 173 MB INT4 build and the reported speeds are the draw.

Skip it if you need strong math, long code generation or broad knowledge. A larger model is the better choice for those, and the card itself steers you away from them.

Related