Instructions to use N14QM/Vietnamese-4B-Chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use N14QM/Vietnamese-4B-Chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="N14QM/Vietnamese-4B-Chat")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("N14QM/Vietnamese-4B-Chat", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use N14QM/Vietnamese-4B-Chat with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf N14QM/Vietnamese-4B-Chat:Q4_K_M # Run inference directly in the terminal: llama cli -hf N14QM/Vietnamese-4B-Chat:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf N14QM/Vietnamese-4B-Chat:Q4_K_M # Run inference directly in the terminal: llama cli -hf N14QM/Vietnamese-4B-Chat:Q4_K_M
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 N14QM/Vietnamese-4B-Chat:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf N14QM/Vietnamese-4B-Chat:Q4_K_M
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 N14QM/Vietnamese-4B-Chat:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf N14QM/Vietnamese-4B-Chat:Q4_K_M
Use Docker
docker model run hf.co/N14QM/Vietnamese-4B-Chat:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use N14QM/Vietnamese-4B-Chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "N14QM/Vietnamese-4B-Chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "N14QM/Vietnamese-4B-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/N14QM/Vietnamese-4B-Chat:Q4_K_M
- SGLang
How to use N14QM/Vietnamese-4B-Chat 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 "N14QM/Vietnamese-4B-Chat" \ --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": "N14QM/Vietnamese-4B-Chat", "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 "N14QM/Vietnamese-4B-Chat" \ --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": "N14QM/Vietnamese-4B-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use N14QM/Vietnamese-4B-Chat with Ollama:
ollama run hf.co/N14QM/Vietnamese-4B-Chat:Q4_K_M
- Unsloth Desktop
- Pi
How to use N14QM/Vietnamese-4B-Chat with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf N14QM/Vietnamese-4B-Chat:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "N14QM/Vietnamese-4B-Chat:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use N14QM/Vietnamese-4B-Chat with Docker Model Runner:
docker model run hf.co/N14QM/Vietnamese-4B-Chat:Q4_K_M
- Lemonade
How to use N14QM/Vietnamese-4B-Chat with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull N14QM/Vietnamese-4B-Chat:Q4_K_M
Run and chat with the model
lemonade run user.Vietnamese-4B-Chat-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use N14QM/Vietnamese-4B-Chat with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf N14QM/Vietnamese-4B-Chat:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default N14QM/Vietnamese-4B-Chat:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use N14QM/Vietnamese-4B-Chat with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf N14QM/Vietnamese-4B-Chat:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "N14QM/Vietnamese-4B-Chat:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
📊 Tại sao tỷ lệ 0.2 / 0.3 / 0.5?
| Model | Vai trò | Lý do tỷ lệ |
|---|---|---|
| DeepSeek-V4-Pro (0.2) | Nền tảng reasoning | Giữ logic gốc, không pha loãng |
| KIMI-Distill (0.3) | Tăng cường suy luận | Boost chain-of-thought |
| Vietnamese-SFT (0.5) | Ngôn ngữ chính | Đảm bảo tiếng Việt tự nhiên |
Tỷ lệ này được chọn qua thử nghiệm — cân bằng giữa kiến thức (DeepSeek) và ngôn ngữ (Vietnamese).
📊 Kết quả Benchmark
V-Bench (VinUni) — Public Test v2026.03.28
Tổng số câu: 5,141/9,141 được chấm
| Domain | Số đúng | Tổng | Điểm |
|---|---|---|---|
| TỔNG | — | — | 32.49 / 100 |
| Philosophy | 154 | 263 | 58.56% |
| Computer Science | 109 | 188 | 57.98% |
| Dialect | 265 | 562 | 47.15% |
| Laws | 90 | 191 | 47.12% |
| Chemistry | 107 | 334 | 32.04% |
| Psychology | 247 | 798 | 30.95% |
| Medicine | 136 | 490 | 27.76% |
| Physics | 36 | 147 | 24.49% |
| Literature | 140 | 601 | 23.29% |
| Mathematics | 24 | 125 | 19.20% |
| Agentic | 0 | 1000 | 0.00% |
📈 So sánh với các model khác
| Model | Params | V-Bench | Ghi chú |
|---|---|---|---|
| Vietnamese-4B-Chat | 4B | 32.49 | Model này |
| DeepSeek-V4-Pro-Qwen3.5 | 4B | 29.14 | Base gốc |
| Hunyuan-4B | 4B | 17.24 | So sánh |
| Random baseline | — | 25.00 | Ngẫu nhiên |
| Qwen3-235B | 235B | ~55 | Model lớn |
| Gemini 2.5 Flash | ? | 58.8 | Closed API |
| V-LLM v1 (Vin) | ~30B | 68.00 | SOTA VI |
Kết luận: Mô hình vượt base gốc +3.35 điểm và vượt random +7.49 điểm.
🎯 Điểm mạnh / yếu
✅ Mạnh:
- Triết học, Computer Science (58%)
- Luật, Phương ngữ tiếng Việt (47%)
- Trò chuyện tiếng Việt tự nhiên
- Code với comment VI
- Tốc độ nhanh (~5 câu/s, không cần thinking)
❌ Yếu:
- Toán (19.20%) — dưới random, do tắt thinking
- Vật lý (24.49%) — kế thừa từ base
- Agentic (0%) — cần model 30B+
- Không hỗ trợ hình ảnh (text-only)
🚀 Cách sử dụng
1️⃣ Với llama.cpp (khuyến nghị)
# Cài đặt llama.cpp
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
cmake -B build
cmake --build build --config Release -j
# Chạy chat
./build/bin/llama-cli \
-m Vietnamese-4B-Chat-Q4_K_M.gguf \
-p "Chào bạn, hôm nay thế nào?" \
-n 256 \
-c 2048 \
--temp 0.7 \
--top-p 0.9
# Chế độ tương tác
./build/bin/llama-cli \
-m Vietnamese-4B-Chat-Q4_K_M.gguf \
-i --color
- Downloads last month
- 615
Hardware compatibility
Log In to add your hardware
2-bit
3-bit
4-bit
5-bit
Model tree for N14QM/Vietnamese-4B-Chat
Merge model
this model