Instructions to use peterbuitho/VietPoet-Qwen3.5-4B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use peterbuitho/VietPoet-Qwen3.5-4B-GGUF 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 peterbuitho/VietPoet-Qwen3.5-4B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf peterbuitho/VietPoet-Qwen3.5-4B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf peterbuitho/VietPoet-Qwen3.5-4B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf peterbuitho/VietPoet-Qwen3.5-4B-GGUF: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 peterbuitho/VietPoet-Qwen3.5-4B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf peterbuitho/VietPoet-Qwen3.5-4B-GGUF: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 peterbuitho/VietPoet-Qwen3.5-4B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf peterbuitho/VietPoet-Qwen3.5-4B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/peterbuitho/VietPoet-Qwen3.5-4B-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use peterbuitho/VietPoet-Qwen3.5-4B-GGUF with Ollama:
ollama run hf.co/peterbuitho/VietPoet-Qwen3.5-4B-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use peterbuitho/VietPoet-Qwen3.5-4B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf peterbuitho/VietPoet-Qwen3.5-4B-GGUF: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": "peterbuitho/VietPoet-Qwen3.5-4B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use peterbuitho/VietPoet-Qwen3.5-4B-GGUF with Docker Model Runner:
docker model run hf.co/peterbuitho/VietPoet-Qwen3.5-4B-GGUF:Q4_K_M
- Lemonade
How to use peterbuitho/VietPoet-Qwen3.5-4B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull peterbuitho/VietPoet-Qwen3.5-4B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.VietPoet-Qwen3.5-4B-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use peterbuitho/VietPoet-Qwen3.5-4B-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf peterbuitho/VietPoet-Qwen3.5-4B-GGUF: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 peterbuitho/VietPoet-Qwen3.5-4B-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use peterbuitho/VietPoet-Qwen3.5-4B-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf peterbuitho/VietPoet-Qwen3.5-4B-GGUF: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 "peterbuitho/VietPoet-Qwen3.5-4B-GGUF: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"
VietPoet Qwen3.5-4B (GGUF)
A Qwen3.5-4B fine-tuned (QLoRA, 8,000 poems, 2 epochs) to write Vietnamese lục bát poems, exported for
LM Studio / llama.cpp. It is meant to be used with the line-by-line sampler and rule checker from
github.com/peterbuitho/ThoLucBat, whose local installation
for Windows (VietPoet-win.zip) sets it up for you. Used on its own it writes the right shape but breaks the tone rules more often.
| File | Size | Notes |
|---|---|---|
VietPoet-Qwen3.5-4B-Q8_0.gguf |
4.6 GB | near-lossless; use with 10 GB+ of graphics memory |
VietPoet-Qwen3.5-4B-Q4_K_M.gguf |
2.8 GB | for smaller graphics cards or CPU |
What it does and does not do
With the sampler (16 samples per line, only lines that satisfy the 6/8 length, tone and rhyme rules are kept), on 40 held-out "8 câu" prompts against LM Studio: rule score 0.991 (Q8_0), 95% of poems fully valid; Q4_K_M with 4 samples per line: 0.982, 87.5% valid. Without the sampler the raw model scores about 0.81 and breaks the 6th/8th-syllable tone rule in 38% of bát lines.
These numbers measure form, not poetry. Poems are correct lục bát but the meaning is often loose or off-topic (training prompts only had the poem title as topic). Judge the poetry yourself.
Prompt format
Qwen chat format with thinking off, and the poem written by appending lines to the assistant turn:
<|im_start|>system
Bạn là nhà thơ Việt Nam chuyên sáng tác thơ lục bát.<|im_end|>
<|im_start|>user
Viết một bài thơ lục bát 8 câu về mùa thu quê em.<|im_end|>
<|im_start|>assistant
<think>
</think>
The request wording varies (several templates); they are in app/prompts.py in the GitHub repo.
Credits
- Training data: phamson02/vietnamese-poetry-corpus (CC BY 4.0), filtered to poems that pass a lục bát rule checker.
- Base model: Qwen/Qwen3.5-4B (Apache-2.0).
- Scoring idea: Vietnamese Poem Generation & the Prospect of Cross-Language Poem-to-Poem Translation (arXiv:2401.01078).
- Downloads last month
- 145
4-bit
8-bit