Instructions to use Tiiny/SmallThinker-3B-Preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tiiny/SmallThinker-3B-Preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Tiiny/SmallThinker-3B-Preview") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Tiiny/SmallThinker-3B-Preview") model = AutoModelForCausalLM.from_pretrained("Tiiny/SmallThinker-3B-Preview") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Tiiny/SmallThinker-3B-Preview with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Tiiny/SmallThinker-3B-Preview" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Tiiny/SmallThinker-3B-Preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Tiiny/SmallThinker-3B-Preview
- SGLang
How to use Tiiny/SmallThinker-3B-Preview 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 "Tiiny/SmallThinker-3B-Preview" \ --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": "Tiiny/SmallThinker-3B-Preview", "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 "Tiiny/SmallThinker-3B-Preview" \ --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": "Tiiny/SmallThinker-3B-Preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Tiiny/SmallThinker-3B-Preview with Docker Model Runner:
docker model run hf.co/Tiiny/SmallThinker-3B-Preview
add AIBOM
#12
by RiccardoDav - opened
PowerInfer_SmallThinker-3B-Preview.json
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bomFormat": "CycloneDX",
|
| 3 |
+
"specVersion": "1.6",
|
| 4 |
+
"serialNumber": "urn:uuid:0512d493-d5d9-4eee-9d08-d4ee269ab76b",
|
| 5 |
+
"version": 1,
|
| 6 |
+
"metadata": {
|
| 7 |
+
"timestamp": "2025-10-23T16:22:45.078679+00:00",
|
| 8 |
+
"component": {
|
| 9 |
+
"type": "machine-learning-model",
|
| 10 |
+
"bom-ref": "PowerInfer/SmallThinker-3B-Preview-68e7039d-e942-548b-99a3-b3257eaff779",
|
| 11 |
+
"licenses": [],
|
| 12 |
+
"externalReferences": [
|
| 13 |
+
{
|
| 14 |
+
"url": "https://huggingface.co/PowerInfer/SmallThinker-3B-Preview",
|
| 15 |
+
"type": "documentation"
|
| 16 |
+
}
|
| 17 |
+
],
|
| 18 |
+
"modelCard": {
|
| 19 |
+
"modelParameters": {
|
| 20 |
+
"datasets": [
|
| 21 |
+
{
|
| 22 |
+
"ref": "PowerInfer/QWQ-LONGCOT-500K-522eeed6-5124-53e2-8fac-506db34e4b52"
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
"ref": "PowerInfer/LONGCOT-Refine-500K-f17c3140-526e-54e5-8972-3ed05aa3548d"
|
| 26 |
+
}
|
| 27 |
+
],
|
| 28 |
+
"task": "text-generation",
|
| 29 |
+
"architectureFamily": "qwen2",
|
| 30 |
+
"modelArchitecture": "Qwen2ForCausalLM"
|
| 31 |
+
},
|
| 32 |
+
"properties": [
|
| 33 |
+
{
|
| 34 |
+
"name": "library_name",
|
| 35 |
+
"value": "transformers"
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"name": "base_model",
|
| 39 |
+
"value": "Qwen/Qwen2.5-3B-Instruct"
|
| 40 |
+
}
|
| 41 |
+
]
|
| 42 |
+
},
|
| 43 |
+
"name": "PowerInfer/SmallThinker-3B-Preview",
|
| 44 |
+
"authors": [
|
| 45 |
+
{
|
| 46 |
+
"name": "PowerInfer"
|
| 47 |
+
}
|
| 48 |
+
],
|
| 49 |
+
"description": "### model\nmodel_name_or_path: /home/syx/Qwen2.5-3B-Instruct\n",
|
| 50 |
+
"tags": [
|
| 51 |
+
"transformers",
|
| 52 |
+
"safetensors",
|
| 53 |
+
"qwen2",
|
| 54 |
+
"text-generation",
|
| 55 |
+
"conversational",
|
| 56 |
+
"en",
|
| 57 |
+
"dataset:PowerInfer/QWQ-LONGCOT-500K",
|
| 58 |
+
"dataset:PowerInfer/LONGCOT-Refine-500K",
|
| 59 |
+
"base_model:Qwen/Qwen2.5-3B-Instruct",
|
| 60 |
+
"base_model:finetune:Qwen/Qwen2.5-3B-Instruct",
|
| 61 |
+
"autotrain_compatible",
|
| 62 |
+
"text-generation-inference",
|
| 63 |
+
"endpoints_compatible",
|
| 64 |
+
"region:us"
|
| 65 |
+
]
|
| 66 |
+
}
|
| 67 |
+
},
|
| 68 |
+
"components": [
|
| 69 |
+
{
|
| 70 |
+
"type": "data",
|
| 71 |
+
"bom-ref": "PowerInfer/QWQ-LONGCOT-500K-522eeed6-5124-53e2-8fac-506db34e4b52",
|
| 72 |
+
"name": "PowerInfer/QWQ-LONGCOT-500K",
|
| 73 |
+
"data": [
|
| 74 |
+
{
|
| 75 |
+
"type": "dataset",
|
| 76 |
+
"bom-ref": "PowerInfer/QWQ-LONGCOT-500K-522eeed6-5124-53e2-8fac-506db34e4b52",
|
| 77 |
+
"name": "PowerInfer/QWQ-LONGCOT-500K",
|
| 78 |
+
"contents": {
|
| 79 |
+
"url": "https://huggingface.co/datasets/PowerInfer/QWQ-LONGCOT-500K",
|
| 80 |
+
"properties": [
|
| 81 |
+
{
|
| 82 |
+
"name": "language",
|
| 83 |
+
"value": "en"
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"name": "license",
|
| 87 |
+
"value": "apache-2.0"
|
| 88 |
+
}
|
| 89 |
+
]
|
| 90 |
+
},
|
| 91 |
+
"description": "This repository contains approximately 500,000 instances of responses generated using QwQ-32B-Preview language model. The dataset combines prompts from multiple high-quality sources to create diverse and comprehensive training data.\nThe dataset is available under the Apache 2.0 license.\nOver 75% of the responses exceed 8,000 tokens in length. The majority of prompts were carefully created using persona-based methods to create challenging instructions.\n\n\t\n\t\t\n\t\n\t\n\t\tBias, Risks, and Limitations\u2026 See the full description on the dataset page: https://huggingface.co/datasets/PowerInfer/QWQ-LONGCOT-500K.",
|
| 92 |
+
"governance": {
|
| 93 |
+
"owners": [
|
| 94 |
+
{
|
| 95 |
+
"organization": {
|
| 96 |
+
"name": "PowerInfer",
|
| 97 |
+
"url": "https://huggingface.co/PowerInfer"
|
| 98 |
+
}
|
| 99 |
+
}
|
| 100 |
+
]
|
| 101 |
+
}
|
| 102 |
+
}
|
| 103 |
+
]
|
| 104 |
+
},
|
| 105 |
+
{
|
| 106 |
+
"type": "data",
|
| 107 |
+
"bom-ref": "PowerInfer/LONGCOT-Refine-500K-f17c3140-526e-54e5-8972-3ed05aa3548d",
|
| 108 |
+
"name": "PowerInfer/LONGCOT-Refine-500K",
|
| 109 |
+
"data": [
|
| 110 |
+
{
|
| 111 |
+
"type": "dataset",
|
| 112 |
+
"bom-ref": "PowerInfer/LONGCOT-Refine-500K-f17c3140-526e-54e5-8972-3ed05aa3548d",
|
| 113 |
+
"name": "PowerInfer/LONGCOT-Refine-500K",
|
| 114 |
+
"contents": {
|
| 115 |
+
"url": "https://huggingface.co/datasets/PowerInfer/LONGCOT-Refine-500K",
|
| 116 |
+
"properties": [
|
| 117 |
+
{
|
| 118 |
+
"name": "language",
|
| 119 |
+
"value": "en"
|
| 120 |
+
},
|
| 121 |
+
{
|
| 122 |
+
"name": "license",
|
| 123 |
+
"value": "apache-2.0"
|
| 124 |
+
}
|
| 125 |
+
]
|
| 126 |
+
},
|
| 127 |
+
"description": "This repository contains approximately 500,000 instances of responses generated using Qwen2.5-72B-Instruct. The dataset combines prompts from multiple high-quality sources to create diverse and comprehensive training data.\nThe dataset is available under the Apache 2.0 license.\n\n\t\n\t\t\n\t\tBias, Risks, and Limitations\n\t\n\n\nThis dataset is mainly in English.\n\nThe dataset inherits the biases, errors, and omissions known to exist in data used for seed sources and models used for data generation.\n\nThis\u2026 See the full description on the dataset page: https://huggingface.co/datasets/PowerInfer/LONGCOT-Refine-500K.",
|
| 128 |
+
"governance": {
|
| 129 |
+
"owners": [
|
| 130 |
+
{
|
| 131 |
+
"organization": {
|
| 132 |
+
"name": "PowerInfer",
|
| 133 |
+
"url": "https://huggingface.co/PowerInfer"
|
| 134 |
+
}
|
| 135 |
+
}
|
| 136 |
+
]
|
| 137 |
+
}
|
| 138 |
+
}
|
| 139 |
+
]
|
| 140 |
+
}
|
| 141 |
+
]
|
| 142 |
+
}
|