Instructions to use rin2401/Qwen2.5-3B-Instruct-KAI-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rin2401/Qwen2.5-3B-Instruct-KAI-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rin2401/Qwen2.5-3B-Instruct-KAI-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("rin2401/Qwen2.5-3B-Instruct-KAI-GGUF", dtype="auto") - llama-cpp-python
How to use rin2401/Qwen2.5-3B-Instruct-KAI-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="rin2401/Qwen2.5-3B-Instruct-KAI-GGUF", filename="qwen2.5-3b-instruct-kai-q2_k.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use rin2401/Qwen2.5-3B-Instruct-KAI-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf rin2401/Qwen2.5-3B-Instruct-KAI-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf rin2401/Qwen2.5-3B-Instruct-KAI-GGUF:Q2_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf rin2401/Qwen2.5-3B-Instruct-KAI-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf rin2401/Qwen2.5-3B-Instruct-KAI-GGUF:Q2_K
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf rin2401/Qwen2.5-3B-Instruct-KAI-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf rin2401/Qwen2.5-3B-Instruct-KAI-GGUF:Q2_K
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf rin2401/Qwen2.5-3B-Instruct-KAI-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf rin2401/Qwen2.5-3B-Instruct-KAI-GGUF:Q2_K
Use Docker
docker model run hf.co/rin2401/Qwen2.5-3B-Instruct-KAI-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use rin2401/Qwen2.5-3B-Instruct-KAI-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rin2401/Qwen2.5-3B-Instruct-KAI-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rin2401/Qwen2.5-3B-Instruct-KAI-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/rin2401/Qwen2.5-3B-Instruct-KAI-GGUF:Q2_K
- SGLang
How to use rin2401/Qwen2.5-3B-Instruct-KAI-GGUF 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 "rin2401/Qwen2.5-3B-Instruct-KAI-GGUF" \ --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": "rin2401/Qwen2.5-3B-Instruct-KAI-GGUF", "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 "rin2401/Qwen2.5-3B-Instruct-KAI-GGUF" \ --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": "rin2401/Qwen2.5-3B-Instruct-KAI-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use rin2401/Qwen2.5-3B-Instruct-KAI-GGUF with Ollama:
ollama run hf.co/rin2401/Qwen2.5-3B-Instruct-KAI-GGUF:Q2_K
- Unsloth Studio
How to use rin2401/Qwen2.5-3B-Instruct-KAI-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for rin2401/Qwen2.5-3B-Instruct-KAI-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for rin2401/Qwen2.5-3B-Instruct-KAI-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for rin2401/Qwen2.5-3B-Instruct-KAI-GGUF to start chatting
- Docker Model Runner
How to use rin2401/Qwen2.5-3B-Instruct-KAI-GGUF with Docker Model Runner:
docker model run hf.co/rin2401/Qwen2.5-3B-Instruct-KAI-GGUF:Q2_K
- Lemonade
How to use rin2401/Qwen2.5-3B-Instruct-KAI-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull rin2401/Qwen2.5-3B-Instruct-KAI-GGUF:Q2_K
Run and chat with the model
lemonade run user.Qwen2.5-3B-Instruct-KAI-GGUF-Q2_K
List all available models
lemonade list
Qwen2.5-3B-Instruct-KAI
Instruction
Llama3.2-1B-Instruct-KAI, Llama3.2-3B-Instruct-KAI, Qwen2.5-0.5B-Instruct-KAI, Qwen2.5-1.5B-Instruct-KAI, and Qwen2.5-3B-Instruct-KAI are a collection of models fine-tuned on the open Qwen2.5* and Llama3.2* models. They are optimized for Vietnamese language understanding and generation tasks such as reading comprehension, information extraction, question answering and summarization.
Quickstart
This is a demonstration of loading a model and performing a question-answering or summarization task.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "kiki-ailab/Qwen2.5-3B-Instruct-KAI"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "Xin chào !"
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=512
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
Examples
Example 1:
prompt = """Dưới đây là một số tài liệu / văn bản:
<DOC id="doc-1">
Theo một nghiên cứu gần đây, biến đổi khí hậu đã làm gia tăng tần suất và cường độ của các hiện tượng thời tiết cực đoan, bao gồm bão, hạn hán và lũ lụt. Các khu vực ven biển Đông Nam Á có nguy cơ cao nhất do nước biển dâng và hiện tượng xâm nhập mặn.
</DOC>
<DOC id="doc-2">
Một báo cáo từ Ngân hàng Thế giới cho thấy rằng biến đổi khí hậu sẽ ảnh hưởng nghiêm trọng đến sản xuất nông nghiệp, đặc biệt là ở các nước đang phát triển, nơi nền kinh tế phụ thuộc lớn vào nông nghiệp. Cụ thể, năng suất cây trồng có thể giảm từ 10% đến 25% trong 30 năm tới.
</DOC>
<DOC id="doc-3">
Một sáng kiến quốc tế đã được khởi động nhằm giảm thiểu tác động của biến đổi khí hậu thông qua việc thúc đẩy sử dụng năng lượng tái tạo và giảm phát thải carbon. Các nước phát triển đã cam kết hỗ trợ tài chính cho các quốc gia dễ bị tổn thương nhất, nhưng việc triển khai vẫn gặp nhiều thách thức.
</DOC>
TASK: Hãy trả lời câu hỏi "Biến đổi khí hậu ảnh hưởng như thế nào đến nông nghiệp ở các nước đang phát triển?"
INSTRUCTION:
1. Câu trả lời không quá 50 từ.
2. Trích dẫn rõ ràng tài liệu nào chứa thông tin liên quan, theo format: [doc-k]"""
Example 2:
prompt = """Trả lời câu hỏi dựa vào nội dung đoạn văn sau:
====
Bão Milton bắt đầu đổ bộ vào Siesta Key, bang Florida, Mỹ, với sức gió 193 km/h, tương đương cấp 3 trong thang đo bão 5 cấp, vào khoảng 20h30 ngày 9/10 (7h30 sáng 10/10 giờ Hà Nội). Sau vài tiếng càn quét qua Florida, bão Milton hạ xuống cấp 2 và tiếp tục hạ xuống cấp 1 vào rạng sáng 10/10.
Đây là cơn bão thứ năm ở Mỹ và cơn bão thứ ba tấn công bang Florida trong năm nay. Trước khi bão Milton đổ bộ, Thống đốc Florida Ron DeSantis cho biết ít nhất 19 cơn lốc xoáy đã xuất hiện ở Florida và 116 cảnh báo lốc xoáy được ban bố khắp bang.
Mưa lớn xảy ra ở các khu vực, nhất là thành phố St. Petersburg khi hứng chịu "trận mưa nghìn năm có một", với lượng mưa trút xuống thành phố trong ba giờ tương đương ba tháng trong năm. Các thành phố McKay Creek, Clearwater Beach và Temple Terrace cũng ghi nhận lượng mưa lớn, lần lượt là 371 mm, 355 mm và 344 mm.
====
Yêu cầu câu trả lời hoặc là được trích ra từ đoạn văn, hoặc là 'NO ANSWER' nếu nội dung đoạn văn không liên quan đến câu hỏi.
Câu hỏi: Bão Milton mạnh như thế nào ? Diễn ra ở đâu ?
Câu trả lời:"""
Example 3:
prompt = """Cho văn bản dưới đây:
====
Bão Milton bắt đầu đổ bộ vào Siesta Key, bang Florida, Mỹ, với sức gió 193 km/h, tương đương cấp 3 trong thang đo bão 5 cấp, vào khoảng 20h30 ngày 9/10 (7h30 sáng 10/10 giờ Hà Nội). Sau vài tiếng càn quét qua Florida, bão Milton hạ xuống cấp 2 và tiếp tục hạ xuống cấp 1 vào rạng sáng 10/10.
Đây là cơn bão thứ năm ở Mỹ và cơn bão thứ ba tấn công bang Florida trong năm nay. Trước khi bão Milton đổ bộ, Thống đốc Florida Ron DeSantis cho biết ít nhất 19 cơn lốc xoáy đã xuất hiện ở Florida và 116 cảnh báo lốc xoáy được ban bố khắp bang.
Mưa lớn xảy ra ở các khu vực, nhất là thành phố St. Petersburg khi hứng chịu "trận mưa nghìn năm có một", với lượng mưa trút xuống thành phố trong ba giờ tương đương ba tháng trong năm. Các thành phố McKay Creek, Clearwater Beach và Temple Terrace cũng ghi nhận lượng mưa lớn, lần lượt là 371 mm, 355 mm và 344 mm.
====
TASK: Đặt tiêu đề và tóm tắt bài báo trên thành 1-2 câu."""
Benchmarks
VMLU
We evaluate our fine-tuned models on VMLU benchmarks provided by https://vmlu.ai
| Model | VMLU | ViSquad | ViDrop | ViDialog |
|---|---|---|---|---|
| Llama3.2-1B-Instruct | 37.6 | 70.1 | 29.6 | 33.9 |
| Llama3.2-3B-Instruct | 47.6 | 90.3 | 63.5 | 50.8 |
| Qwen2.5-0.5B-Instruct | 39.1 | 62.5 | 31.5 | 28.0 |
| Qwen2.5-1.5B-Instruct | 48.6 | 86.7 | 54.5 | 39.8 |
| Qwen2.5-3B-Instruct | 52.9 | 88.3 | 72.4 | 54.4 |
Our finetuned models |
||||
| Llama3.2-1B-Instruct-KAI | 50.5 (+12.9) | 88.4 (+18.3) | 71.1 (+41.5) | 50.9 (+17.0) |
| Llama3.2-3B-Instruct-KAI | 58.1 (+10.5) | 93.5 (+3.2) | 81.4 (+17.9) | 67.3 (+16.5) |
| Qwen2.5-0.5B-Instruct-KAI | 49.7 (+10.6) | 87.3 (+24.8) | 62.3 (+30.8) | 39.0 (+11.0) |
| Qwen2.5-1.5B-Instruct-KAI | 57.5 (+8.9) | 93.3 (+6.6) | 76.0 (+21.5) | 54.6 (+14.8) |
| Qwen2.5-3B-Instruct-KAI | 63.5 (+10.6) | 94.2 (+5.9) | 80.9 (+8.5) | 68.5 (+14.1) |
Evaluate on ArenaHard (CohereForAI)
We follow the evaluation method outlined in https://github.com/lmarena/arena-hard-auto to assess our fine-tuned models against others on the ArenaHard benchmark.
- Based model:
Qwen/Qwen2.5-7B-Instruct - Judge:
Qwen/Qwen2.5-72B-Instruct
| # | model | size (B) | win | tie | lose |
|---|---|---|---|---|---|
| 1 | deepseek-ai/DeepSeek-R1-Distill-Qwen-14B | 14 | 59,5 | 4,6 | 35,9 |
| 2 | CohereForAI/aya-expanse-8b | 8 | 55 | 4,6 | 40,4 |
| 3 | Qwen/Qwen2.5-14B-Instruct | 14 | 48,7 | 9,1 | 42,2 |
| 4 | kiki-ailab/Qwen2.5-3B-Instruct-KAI | 3 | 38,7 | 4,7 | 56,6 |
| 5 | meta-llama/Llama3.1-8B-Instruct | 8 | 38,6 | 4,9 | 56,5 |
| 6 | CohereForAI/c4ai-command-r7b-12-2024 | 7 | 35,1 | 3,3 | 61,6 |
| 7 | kiki-ailab/Llama3.2-3B-Instruct-KAI | 3 | 35 | 4,3 | 60,7 |
| 8 | arcee-ai/Arcee-VyLinh | 3 | 34,8 | 5,4 | 59,8 |
| 9 | kiki-ailab/Qwen2.5-1.5B-Instruct-KAI | 1,5 | 28,9 | 3,9 | 67,2 |
| 10 | deepseek-ai/DeepSeek-R1-Distill-Qwen-7B | 7 | 23,2 | 2,8 | 74 |
| 11 | meta-llama/Llama-3.2-3B-Instruct | 3 | 21,2 | 4,4 | 74,4 |
| 12 | Qwen/Qwen2.5-3B-Instruct | 3 | 18,6 | 5,8 | 75,6 |
| 13 | zaloai/Llama3.2-1B-Instruct-ZAI | 1 | 17,4 | 3,7 | 78,9 |
| 14 | Viet-Mistral/Vistral-7B-Chat | 7 | 17,2 | 3,2 | 79,6 |
| 15 | kiki-ailab/Qwen2.5-0.5B-Instruct-KAI | 0,5 | 10,9 | 2 | 87,1 |
| 16 | meta-llama/Llama-3.2-1B-Instruct | 1 | 6,5 | 1,6 | 91,9 |
| 17 | Qwen/Qwen2.5-1.5B-Instruct | 1 | 6,4 | 3 | 90,6 |
| 18 | deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B | 1,5 | 3 | 1,5 | 95,5 |
| 19 | vinai/PhoGPT-4B-Chat | 4 | 1,2 | 2,7 | 96,1 |
| 20 | Qwen/Qwen2.5-0.5B-Instruct | 0,5 | 1 | 1,7 | 97,3 |
Disclaimer
- Might still hallucinate on cultural-specific content.
- Primary focus on Vietnamese language understanding.
- May not perform optimally for specialized technical domains.
Feedback
We welcome any feedback on these public models. Please send your comments to contact@kilm.ai.
- Downloads last month
- 29
2-bit
4-bit
Model tree for rin2401/Qwen2.5-3B-Instruct-KAI-GGUF
Base model
Qwen/Qwen2.5-3B