BachDaThan/Qwen3-30B-A3B-Vietnamese-Instruct-GGUF
🇻🇳 Qwen3-30B-A3B Vietnamese Instruct — GGUF Q4KM
<div align="center">
Vietnamese-optimized Qwen3 MoE model, LoRA merged and quantized to GGUF Q4KM.
  ![Format]() 
</div>
🌍 English Summary
A Vietnamese-optimized Qwen3-30B-A3B model merged with a Vietnamese instruction-tuning LoRA, then quantized to GGUF Q4KM format (~18.6 GB). This model is designed to run efficiently on consumer hardware: - NVIDIA RTX 3060 12GB or better with GPU offload - Apple Silicon M1/M2/M3/M4 with 24GB+ unified memory - CPU-only systems with 24GB+ RAM ### Key Features | Feature | Details | |---|---| | Architecture | Qwen3 Mixture-of-Experts, ~30.5B total parameters | | Active Parameters | ~3.3B parameters per token | | Primary Language | Vietnamese, also supports English and many other languages | | Thinking Mode | Supports<think>...</think>reasoning blocks | | Context Length | 32,768 tokens native, extendable with YaRN | | Quantization | GGUF Q4KM | | File Size | Approximately 18.6 GB | | License | Apache 2.0 | ### Hardware Requirements | Setup | Minimum / Recommended | |---|---| | CPU only | 24 GB RAM, 20 GB free disk | | GPU offload | RTX 3060 12GB+ or RTX 4060 Ti 16GB | | Apple Silicon | M1 Pro / M2 / M3 / M4 with 24GB+ unified memory | ### Quick Start with llama.cpp ``bash wget https://huggingface.co/BachDaThan/Qwen3-30B-A3B-Vietnamese-Instruct-GGUF/resolve/main/Qwen3-30B-A3B-Vietnamese-Instruct-Q4_K_M.gguf ./llama-cli -m Qwen3-30B-A3B-Vietnamese-Instruct-Q4_K_M.gguf -c 8192 -ngl 99 --chat-template chatml`### Quick Start with Ollama`bash cat > Modelfile << 'EOF' FROM ./Qwen3-30B-A3B-Vietnamese-Instruct-Q4_K_M.gguf TEMPLATE """{{ if .System }}<|im_start|>system {{ .System }}<|im_end|> {{ end }} <|im_start|>user {{ .Prompt }}<|im_end|> <|im_start|>assistant """ SYSTEM "Bạn là trợ lý AI thông minh và hữu ích, trả lời bằng tiếng Việt." PARAMETER temperature 0.6 PARAMETER top_p 0.95 PARAMETER top_k 20 PARAMETER repeat_penalty 1.1 PARAMETER num_ctx 8192 EOF ollama create qwen3-viet -f Modelfile ollama run qwen3-viet`` ### Recommended Sampling Parameters | Parameter | Value | |---|---| | temperature | 0.6 | | topp | 0.95 | | topk | 20 | | repeat_penalty | 1.1 | | context length | 8192 or higher if supported |
🇻🇳 Tiếng Việt — Tài liệu đầy đủ
Đây là phiên bản GGUF Q4_K_M của model Qwen3-30B-A3B đã được tối ưu cho tiếng Việt bằng LoRA. LoRA được merge vào base model, sau đó chuyển sang GGUF và quantize để chạy trên máy cá nhân.
Điểm nổi bật
🏗️ Thông số kiến trúc
📦 Chi tiết Quantization
So sánh các mức quantize
💻 Yêu cầu phần cứng
CPU only
GPU offload
Apple Silicon
🚀 Hướng dẫn sử dụng
1. llama.cpp
wget https://huggingface.co/BachDaThan/Qwen3-30B-A3B-Vietnamese-Instruct-GGUF/resolve/main/Qwen3-30B-A3B-Vietnamese-Instruct-Q4_K_M.gguf
./llama-cli -m Qwen3-30B-A3B-Vietnamese-Instruct-Q4_K_M.gguf -c 8192 -ngl 99 --chat-template chatmlChạy server API tương thích OpenAI:
./llama-server -m Qwen3-30B-A3B-Vietnamese-Instruct-Q4_K_M.gguf -c 8192 -ngl 99 --host 0.0.0.0 --port 80802. Ollama
cat > Modelfile << 'EOF'
FROM ./Qwen3-30B-A3B-Vietnamese-Instruct-Q4_K_M.gguf
TEMPLATE """{{ if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}
<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant
"""
SYSTEM "Bạn là trợ lý AI thông minh và hữu ích, trả lời bằng tiếng Việt."
PARAMETER temperature 0.6
PARAMETER top_p 0.95
PARAMETER top_k 20
PARAMETER repeat_penalty 1.1
PARAMETER num_ctx 8192
EOF
ollama create qwen3-viet -f Modelfile
ollama run qwen3-viet3. LM Studio
- Mở LM Studio.
- Import file
Qwen3-30B-A3B-Vietnamese-Instruct-Q4_K_M.gguf. - Load model.
- Cấu hình khuyến nghị:
- Temperature:
0.6 - Top P:
0.95 - Top K:
20 - Repeat penalty:
1.1 - Context:
8192 - GPU layers: tối đa nếu có GPU
4. Python với llama-cpp-python
from llama_cpp import Llama
llm = Llama(
model_path="./Qwen3-30B-A3B-Vietnamese-Instruct-Q4_K_M.gguf",
n_ctx=8192,
n_gpu_layers=-1,
verbose=False,
)
response = llm.create_chat_completion(
messages=[
{"role": "system", "content": "Bạn là trợ lý AI thông minh, trả lời bằng tiếng Việt."},
{"role": "user", "content": "Giải thích machine learning cho học sinh cấp 3."},
],
temperature=0.6,
top_p=0.95,
top_k=20,
repeat_penalty=1.1,
max_tokens=2048,
)
print(response["choices"][0]["message"]["content"])🧠 Thinking Mode
Qwen3 hỗ trợ hai chế độ:
Thinking Mode
Phù hợp cho toán học, lập trình, suy luận phức tạp. Model có thể tạo khối suy luận:
<think>
...
</think>Khuyến nghị:
temperature = 0.6
top_p = 0.95
top_k = 20Non-thinking Mode
Phù hợp cho chat nhanh, hội thoại thông thường.
Khuyến nghị:
temperature = 0.7
top_p = 0.8
top_k = 20🔧 Quy trình build
1. Tải base model Qwen3-30B-A3B BF16
2. Tải Vietnamese LoRA adapter
3. Merge LoRA vào base model trên CPU
4. Lưu merged model dạng safetensors
5. Convert HF sang GGUF F16 bằng llama.cpp
6. Quantize F16 sang Q4_K_M bằng llama-quantize
7. Upload GGUF và README lên Hugging Face
8. Dọn dẹp file tạmToàn bộ pipeline được thiết kế để chạy bằng CPU trong Hugging Face Space.
⚠️ Hạn chế
- Model được tối ưu cho tiếng Việt, có thể giảm hiệu năng ở ngôn ngữ khác.
- Quantization Q4KM có thể giảm chất lượng nhẹ so với BF16 gốc.
- Có thể xảy ra hallucination.
- Không nên dùng cho tư vấn y tế, pháp lý, tài chính quan trọng mà không có chuyên gia kiểm duyệt.
- Với ngữ cảnh rất dài, chất lượng có thể giảm nếu vượt quá độ dài huấn luyện hiệu dụng.
📖 Citation
@software{qwen3_vietnamese_gguf_2026,
title = {Qwen3-30B-A3B Vietnamese Instruct GGUF},
author = {BachDaThan},
year = {2026},
url = {https://huggingface.co/BachDaThan/Qwen3-30B-A3B-Vietnamese-Instruct-GGUF},
license = {Apache-2.0}
}🙏 Credits
<div align="center">
If this model is useful, please consider leaving a like on the Hugging Face repository.
Nếu model này hữu ích, hãy thả tim repo trên Hugging Face nhé!
</div>
