Downloads · 30 days
7
11% of all-time downloads
sitthisak17sm/qwen3-06b-th-distill-lora
qwen3-06b-th-distill-lora is a text generation model from sitthisak17sm. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
This repository contains a PEFT LoRA adapter trained as a small proof of concept for Thai text generation/distillation.
Downloads · 30 days
7
11% of all-time downloads
All-time downloads
65
Public
Repo size
51.8 MB
Likes
1
Public
Click a slice to open those files.
.safetensors40.4 MB · 72%
From the Hugging Face model README
This repository contains a PEFT LoRA adapter trained as a small proof of concept for Thai text generation/distillation.
Qwen/Qwen3-0.6BQwen/Qwen3-32BThe experiment sampled Thai text from an internal path:
/project/zz992000-zdevb/pretrain_raw/th
Data used in this run:
This is an early PoC adapter. In the current run, the adapter improved teacher-style SFT eval loss, but degraded structured/exact-answer behavior compared with the base model.
| Metric | Teacher Qwen3-32B partial 300 | Base Qwen3-0.6B 300 | Student LoRA 300 |
|---|---|---|---|
| exact / accuracy | 0.6476 | 0.6311 | 0.4800 |
| JSON validity | 0.2740 | 0.5733 | 0.0667 |
| Thai fluency score | 0.8700 | 0.8362 | 0.7956 |
| serve tokens/sec | 212.40 | 1029.27 | 362.05 |
| errors | 0 | 0 | 0 |
Training loss/eval loss:
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = "Qwen/Qwen3-0.6B"
adapter_id = "<your-namespace>/qwen3-06b-th-distill-lora"
tokenizer = AutoTokenizer.from_pretrained(adapter_id)
model = AutoModelForCausalLM.from_pretrained(base_model, device_map="auto", torch_dtype="auto")
model = PeftModel.from_pretrained(model, adapter_id)
messages = [{"role": "user", "content": "สรุปข้อความนี้เป็นภาษาไทยสั้น ๆ"}]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.2)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
For vLLM:
vllm serve Qwen/Qwen3-0.6B \
--enable-lora \
--lora-modules student=<your-namespace>/qwen3-06b-th-distill-lora \
--served-model-name student \
--max-model-len 2048 \
--trust-remote-code