πŸ“‹ Model Description


license: apache-2.0 language:
  • en
pipeline_tag: text-generation base_model:
  • PowerInfer/SmallThinker-21BA3B-Instruct

SmallThinker-21BA3B-Instruct-GGUF

  • GGUF models with .gguf suffix can used with llama.cpp framework.
  • GGUF models with .powerinfer.gguf suffix are integrated with fused sparse FFN operators and sparse LM head operators. These models are only compatible to powerinfer framework.

Introduction


  πŸ€— Hugging Face   |   πŸ€– ModelScope   |    πŸ“‘ Technical Report   

SmallThinker is a family of on-device native Mixture-of-Experts (MoE) language models specially designed for local deployment,
co-developed by the IPADS and School of AI at Shanghai Jiao Tong University and Zenergize AI.
Designed from the ground up for resource-constrained environments,
SmallThinker brings powerful, private, and low-latency AI directly to your personal devices,
without relying on the cloud.

Performance

Note: The model is trained mainly on English.

ModelMMLUGPQA-diamondMATH-500IFEVALLIVEBENCHHUMANEVALAverage
SmallThinker-21BA3B-Instruct84.4355.0582.485.7760.389.6376.26
Gemma3-12b-it78.5234.8582.474.6844.582.9366.31
Qwen3-14B84.825084.685.2159.588.4175.42
Qwen3-30BA3B85.144.484.484.2958.890.2474.54
Qwen3-8B81.7938.8981.683.9249.585.970.26
Phi-4-14B84.5855.4580.263.2242.487.268.84
For the MMLU evaluation, we use a 0-shot CoT setting.

All models are evaluated in non-thinking mode.

Speed

ModelMemory(GiB)i9 149001+13 8ge4rk3588 (16G)Raspberry PI 5
SmallThinker 21B+sparse11.4730.1923.0310.846.61
SmallThinker 21B+sparse+limited memorylimit 8G20.3015.508.56-
Qwen3 30B A3B16.2033.5220.189.07-
Qwen3 30B A3B+limited memorylimit 8G10.110.186.32-
Gemma 3n E2B1G, theoretically36.8827.0612.506.66
Gemma 3n E4B2G, theoretically21.9316.587.374.01
Note: i9 14900, 1+13 8ge4 use 4 threads, others use the number of threads that can achieve the maximum speed. All models here have been quantized to q4_0. You can deploy SmallThinker with offloading support using PowerInfer

Model Card

ArchitectureMixture-of-Experts (MoE)
Total Parameters21B
Activated Parameters3B
Number of Layers52
Attention Hidden Dimension2560
MoE Hidden Dimension (per Expert)768
Number of Attention Heads28
Number of KV Heads4
Number of Experts64
Selected Experts per Token6
Vocabulary Size151,936
Context Length16K
Attention MechanismGQA
Activation FunctionReGLU

How to Run

Transformers

transformers==4.53.3 is required, we are actively working to support the latest version.
The following contains a code snippet illustrating how to use the model generate content based on given inputs.

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

path = "PowerInfer/SmallThinker-21BA3B-Instruct"
device = "cuda"

tokenizer = AutoTokenizer.frompretrained(path, trustremote_code=True)
model = AutoModelForCausalLM.frompretrained(path, torchdtype=torch.bfloat16, devicemap=device, trustremote_code=True)

messages = [
{"role": "user", "content": "Give me a short introduction to large language model."},
]
modelinputs = tokenizer.applychattemplate(messages, returntensors="pt", addgenerationprompt=True).to(device)

model_outputs = model.generate(
model_inputs,
do_sample=True,
maxnewtokens=1024
)

outputtokenids = [
modeloutputs[i][len(modelinputs[i]):] for i in range(len(model_inputs))
]

responses = tokenizer.batchdecode(outputtokenids, skipspecial_tokens=True)[0]
print(responses)

ModelScope

ModelScope adopts Python API similar to (though not entirely identical to) Transformers. For basic usage, simply modify the first line of the above code as follows:

from modelscope import AutoModelForCausalLM, AutoTokenizer

Statement

  • Due to the constraints of its model size and the limitations of its training data, its responses may contain factual inaccuracies, biases, or outdated information.
  • Users bear full responsibility for independently evaluating and verifying the accuracy and appropriateness of all generated content.
  • SmallThinker does not possess genuine comprehension or consciousness and cannot express personal opinions or value judgments.

πŸ“‚ GGUF File List

πŸ“ Filename πŸ“¦ Size ⚑ Download
SmallThinker-21B-A3B-Instruct-QAT.Q4_0.gguf
Recommended LFS Q4
11.39 GB Download
SmallThinker-21B-A3B-Instruct-QAT.Q4_K_M.gguf
LFS Q4
12.19 GB Download
SmallThinker-21B-A3B-Instruct-QAT.Q4_K_S.gguf
LFS Q4
11.48 GB Download
SmallThinker-21B-A3B-Instruct.F16.gguf
LFS FP16
40.08 GB Download
SmallThinker-21B-A3B-Instruct.IQ4_NL.gguf
LFS Q4
11.49 GB Download
SmallThinker-21B-A3B-Instruct.IQ4_XS.gguf
LFS Q4
10.9 GB Download
SmallThinker-21B-A3B-Instruct.IQ4_XS.imatrix.gguf
LFS Q4
10.79 GB Download
SmallThinker-21B-A3B-Instruct.Q3_K.gguf
LFS Q3
9.7 GB Download
SmallThinker-21B-A3B-Instruct.Q3_K.imatrix.gguf
LFS Q3
9.7 GB Download
SmallThinker-21B-A3B-Instruct.Q3_K_S.gguf
LFS Q3
8.78 GB Download
SmallThinker-21B-A3B-Instruct.Q3_K_S.imatrix.gguf
LFS Q3
8.78 GB Download
SmallThinker-21B-A3B-Instruct.Q4_0.gguf
LFS Q4
11.39 GB Download
SmallThinker-21B-A3B-Instruct.Q4_0.imatrix.gguf
LFS Q4
11.44 GB Download
SmallThinker-21B-A3B-Instruct.Q4_0.powerinfer.gguf
LFS Q4
11.31 GB Download
SmallThinker-21B-A3B-Instruct.Q4_1.gguf
LFS Q4
12.62 GB Download
SmallThinker-21B-A3B-Instruct.Q4_1.imatrix.gguf
LFS Q4
12.62 GB Download
SmallThinker-21B-A3B-Instruct.Q4_K.gguf
LFS Q4
12.19 GB Download
SmallThinker-21B-A3B-Instruct.Q4_K.imatrix.gguf
LFS Q4
12.19 GB Download
SmallThinker-21B-A3B-Instruct.Q4_K_S.gguf
LFS Q4
11.48 GB Download
SmallThinker-21B-A3B-Instruct.Q4_K_S.imatrix.gguf
LFS Q4
11.48 GB Download
SmallThinker-21B-A3B-Instruct.Q5_K.gguf
LFS Q5
14.26 GB Download
SmallThinker-21B-A3B-Instruct.Q5_K.imatrix.gguf
LFS Q5
14.26 GB Download
SmallThinker-21B-A3B-Instruct.Q6_K.gguf
LFS Q6
16.46 GB Download
SmallThinker-21B-A3B-Instruct.Q6_K.imatrix.gguf
LFS Q6
16.46 GB Download
SmallThinker-21B-A3B-Instruct.Q8_0.gguf
LFS Q8
21.31 GB Download
SmallThinker-21B-A3B-Instruct.Q8_0.imatrix.gguf
LFS Q8
21.31 GB Download