CoolFace
Modelpublic

Tiiny/SmallThinker-4BA0.6B-Instruct-GGUF

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
36likes1.2kdownloads
Model Card

SmallThinker-4BA0.6B-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

<p align="center"> &nbsp&nbsp🤗 <a href="https://huggingface.co/PowerInfer">Hugging Face</a>&nbsp&nbsp | &nbsp&nbsp🤖 <a href="https://modelscope.cn/organization/PowerInfer">ModelScope</a>&nbsp&nbsp | &nbsp&nbsp 📑 <a href="https://github.com/SJTU-IPADS/SmallThinker/blob/main/smallthinker-technical-report.pdf">Technical Report</a> &nbsp&nbsp </p>

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-diamondGSM8KMATH-500IFEVALLIVEBENCHHUMANEVALAverage
SmallThinker-4BA0.6B-Instruct66.1131.3180.02<u>60.60</u>69.6942.2082.3261.75
Qwen3-0.6B43.3126.7762.8545.658.4123.131.7141.67
Qwen3-1.7B<u>64.19</u><u>27.78</u><u>81.88</u>63.669.50<u>35.60</u>61.59<u>57.73</u>
Gemma3nE2b-it63.0420.282.3458.673.227.90<u>64.63</u>55.70
Llama-3.2-3B-Instruct64.1524.2475.5140<u>71.16</u>15.3055.4949.41
Llama-3.2-1B-Instruct45.6622.731.6714.448.0613.5037.2026.17

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 8gen4rk3588 (16G)rk3576Raspberry PI 5RDK X5rk3566
SmallThinker 4B+sparse ffn +sparse lm_head2.24108.1778.9939.7615.1028.777.236.33
SmallThinker 4B+sparse ffn +sparse lm_head+limited memorylimit 1G29.9920.9115.042.600.750.670.74
Qwen3 0.6B0.6148.5694.9145.9315.2927.4413.329.76
Qwen3 1.7B1.362.2441.0020.296.0911.086.354.15
Qwen3 1.7B+limited memorylimit 1G2.661.091.000.47--0.11
Gemma3n E2B1G, theoretically36.8827.0612.503.806.663.462.45

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

<div align="center">

**Architecture**Mixture-of-Experts (MoE)
Total Parameters4B
Activated Parameters0.6B
Number of Layers32
Attention Hidden Dimension1536
MoE Hidden Dimension (per Expert)768
Number of Attention Heads12
Number of Experts32
Selected Experts per Token4
Vocabulary Size151,936
Context Length32K
Attention MechanismGQA
Activation FunctionReGLU

</div>

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.

python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

path = "PowerInfer/SmallThinker-4BA0.6B-Instruct"
device = "cuda"

tokenizer = AutoTokenizer.from_pretrained(path, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(path, torch_dtype=torch.bfloat16, device_map=device, trust_remote_code=True)

messages = [
    {"role": "user", "content": "Give me a short introduction to large language model."},
]
model_inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True).to(device)

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

output_token_ids = [
    model_outputs[i][len(model_inputs[i]):] for i in range(len(model_inputs))
]

responses = tokenizer.batch_decode(output_token_ids, skip_special_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:

python
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.