Instructions to use sengtha/Qwen3-0.6B-khm-ft3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sengtha/Qwen3-0.6B-khm-ft3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sengtha/Qwen3-0.6B-khm-ft3") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sengtha/Qwen3-0.6B-khm-ft3") model = AutoModelForCausalLM.from_pretrained("sengtha/Qwen3-0.6B-khm-ft3", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sengtha/Qwen3-0.6B-khm-ft3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sengtha/Qwen3-0.6B-khm-ft3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sengtha/Qwen3-0.6B-khm-ft3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sengtha/Qwen3-0.6B-khm-ft3
- SGLang
How to use sengtha/Qwen3-0.6B-khm-ft3 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 "sengtha/Qwen3-0.6B-khm-ft3" \ --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": "sengtha/Qwen3-0.6B-khm-ft3", "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 "sengtha/Qwen3-0.6B-khm-ft3" \ --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": "sengtha/Qwen3-0.6B-khm-ft3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use sengtha/Qwen3-0.6B-khm-ft3 with Docker Model Runner:
docker model run hf.co/sengtha/Qwen3-0.6B-khm-ft3
Qwen3-0.6B-khm-ft3 — a small Khmer model for on-device RAG
A 0.6B Khmer-focused language model fine-tuned from Qwen3-0.6B, built to run on a phone, offline — it's the answering model behind iAny and runs on a 2019 Galaxy S10.
The key trick: the base Qwen3 vocabulary (~150k tokens) is trimmed to ~32k Khmer-focused tokens, which shrinks the output logits buffer enough to fit weak devices while keeping Khmer coverage. It is then continued-pretrained and instruction-tuned on Khmer.
Lineage
| Stage | What | Data |
|---|---|---|
| Base | Qwen3-0.6B | — |
| Vocab trim | ~32k Khmer-focused vocabulary (smaller logits → fits low-RAM phones) | via alphaedge-ai |
| CPT | Continued pre-training for Khmer fluency | FineWeb-2 (Khmer) + ParaCrawl |
| SFT (ft3) | Instruction / Q&A tuning for correct, fuller answers | sengtha/khmer-qa |
ft3 is the current release — retrained on a richer khmer-qa for fuller
answers than the earlier ft/ft2 checkpoints.
Intended use
Grounded Khmer question-answering / RAG on-device: the app retrieves context from the user's own documents and this model writes the answer in Khmer. Small and Khmer-first — not a general-purpose assistant, and it can be wrong or hallucinate, especially without retrieved context.
Usage (transformers)
from transformers import AutoModelForCausalLM, AutoTokenizer
m = "sengtha/Qwen3-0.6B-khm-ft3"
tok = AutoTokenizer.from_pretrained(m)
model = AutoModelForCausalLM.from_pretrained(m)
msgs = [{"role": "user", "content": "តើភ្នំពេញជាអ្វី?"}]
inputs = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt")
out = model.generate(inputs, max_new_tokens=256)
print(tok.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))
Uses the standard Qwen3 chat template (ChatML). Append /no_think to a
message to skip the reasoning block for faster, direct answers.
On-device (GGUF)
Quantized GGUF builds (Q4_K_M + Q8_0) for llama.cpp / llama.rn live in
sengtha/Qwen3-0.6B-khm-ft3-Q8_0-GGUF.
Q4 (~0.4 GB) fits weak phones; Q8 is higher quality.
License & attribution
Apache-2.0, inherited from the base Qwen3-0.6B
(© Alibaba, Apache-2.0). 32k-vocab base via alphaedge-ai. Training corpora:
FineWeb-2, ParaCrawl, and sengtha/khmer-qa. Please keep this
attribution in derivatives.
- Downloads last month
- 330