Instructions to use unicorn-team/Unicorn-R3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unicorn-team/Unicorn-R3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="unicorn-team/Unicorn-R3") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("unicorn-team/Unicorn-R3") model = AutoModelForCausalLM.from_pretrained("unicorn-team/Unicorn-R3", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use unicorn-team/Unicorn-R3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unicorn-team/Unicorn-R3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unicorn-team/Unicorn-R3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/unicorn-team/Unicorn-R3
- SGLang
How to use unicorn-team/Unicorn-R3 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 "unicorn-team/Unicorn-R3" \ --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": "unicorn-team/Unicorn-R3", "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 "unicorn-team/Unicorn-R3" \ --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": "unicorn-team/Unicorn-R3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use unicorn-team/Unicorn-R3 with Docker Model Runner:
docker model run hf.co/unicorn-team/Unicorn-R3
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
-
---
|
| 2 |
-
library_name: transformers
|
| 3 |
-
base_model:
|
| 4 |
-
- Qwen/Qwen3-8B
|
| 5 |
-
datasets:
|
| 6 |
-
- allenai/Dolci-Think-SFT-7B
|
| 7 |
-
---
|
| 8 |
|
| 9 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 10 |
should probably proofread and complete it, then remove this comment. -->
|
|
@@ -189,12 +189,14 @@ special_tokens:
|
|
| 189 |
## 3. Nộp bài
|
| 190 |
|
| 191 |
+ Mô hình tốt nhất của team training được là Qwen3-VL-8B với 74.87 điểm trên VMLU, nhưng 2 task Instruction Following và Function calling thì chất lượng không bằng Qwen3-8B (chỉ có 71.74 trên VMLU).
|
| 192 |
-
|
|
|
|
| 193 |
|
| 194 |
+ Trong quá trình inference test để hiểu hơn về mô hình, team nhận thấy Qwen3 hay mắc các lỗi về thêm các token tiếng Trung vào trong response dù đã prompt kĩ lưỡng
|
| 195 |
-
|
|
|
|
| 196 |
|
| 197 |
+ Finaly kết quả trước và sau training của Qwen3-8B:
|
| 198 |
|
| 199 |
* VMLU: 69.0 -> 71.74
|
| 200 |
-
* LLM Judge 12 task: 52 > 72 (Gemini-2.5-Flash: 84 / Gemini-2.5-Pro: 90)
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
base_model:
|
| 4 |
+
- Qwen/Qwen3-8B
|
| 5 |
+
datasets:
|
| 6 |
+
- allenai/Dolci-Think-SFT-7B
|
| 7 |
+
---
|
| 8 |
|
| 9 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 10 |
should probably proofread and complete it, then remove this comment. -->
|
|
|
|
| 189 |
## 3. Nộp bài
|
| 190 |
|
| 191 |
+ Mô hình tốt nhất của team training được là Qwen3-VL-8B với 74.87 điểm trên VMLU, nhưng 2 task Instruction Following và Function calling thì chất lượng không bằng Qwen3-8B (chỉ có 71.74 trên VMLU).
|
| 192 |
+
|
| 193 |
+
=> Sau khi tính AVG điểm thì Qwen3-8B đạt 74.03 và Qwen3-8B-VL đạt 73.43 nên team quyết định chọn Qwen3-8B làm final model
|
| 194 |
|
| 195 |
+ Trong quá trình inference test để hiểu hơn về mô hình, team nhận thấy Qwen3 hay mắc các lỗi về thêm các token tiếng Trung vào trong response dù đã prompt kĩ lưỡng
|
| 196 |
+
|
| 197 |
+
=> Thực hiện model pruning weight để khiến mô hình không sinh các token tiếng Trung
|
| 198 |
|
| 199 |
+ Finaly kết quả trước và sau training của Qwen3-8B:
|
| 200 |
|
| 201 |
* VMLU: 69.0 -> 71.74
|
| 202 |
+
* LLM Judge 12 task: 52 -> 72 (Gemini-2.5-Flash: 84 / Gemini-2.5-Pro: 90)
|