Downloads · 30 days
10
15% of all-time downloads
Jnx03/kanitakorn-qwen3-8b-sft-v12
kanitakorn-qwen3-8b-sft-v12 is a text generation model from Jnx03. 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.
R12 — continued from R8 with 1060 fresh ThaiExam-format-matched synth.
Downloads · 30 days
10
15% of all-time downloads
All-time downloads
65
Public
Repo size
710 MB
Likes
0
Public
Click a slice to open those files.
.safetensors698 MB · 98%
From the Hugging Face model README
R12 — continued from R8 with 1060 fresh ThaiExam-format-matched synth.
Base model: Qwen/Qwen3-8B Adapter type: LoRA (r=16, α=32, target_modules = q,k,v,o,gate,up,down_proj) Training recipe: Continue from R8 with thaiexam_targeted×3 + extra_synth×3 + Kanitakorn (8965 records, 1 epoch, LR 2e-6)
| Benchmark | Score |
|---|---|
| MATH500 | 0.570 |
| ThaiExam | 0.478 |
| OpenThaiEval | 0.305 |
| IFEval-TH | 0.721 |
| Model | ThaiExam | MATH-TH | IFEval-TH | xcopa_th | belebele_th | xnli_th | wisesight |
|---|---|---|---|---|---|---|---|
| Kanitakorn-ultimate (this) | 0.492 | 0.650 | 0.735 | 0.85 | 0.84 | 0.68 | 0.41 |
| Qwen3-8B base | 0.428 | 0.650 | 0.740 | 0.87 | 0.89 | 0.62 | 0.36 |
| Typhoon2-Llama3-8B | n/a | 0.385 | 0.726 | n/a | n/a | n/a | n/a |
| Pathumma-1.0-7B | 0.5132 | n/a | n/a | 0.756 | 0.776 | 0.435 | 0.65 |
| OpenThaiGPT-1.5-7B | 0.5204 | n/a | n/a | n/a | n/a | n/a | n/a |
| OpenThaiLLM-Prebuilt-7B | 0.5294 | n/a | n/a | n/a | n/a | n/a | n/a |
Numbers in bold are at-or-above the best peer score available.
| Metric | Kanitakorn-ultimate | Typhoon-2-8B | Δ |
|---|---|---|---|
| MATH-TH (proxy MATH500) | 0.650 | 0.385 | +26.5pp |
| IFEval-TH (strict-prompt) | 0.735 | 0.726 | +0.9pp |
| Metric | Kanitakorn-ultimate | Pathumma | Δ |
|---|---|---|---|
| xcopa_th | 0.85 | 0.756 | +9.4pp |
| belebele_th | 0.84 | 0.776 | +6.4pp |
| xnli_th | 0.68 | 0.435 | +24.5pp |
| ThaiExam | 0.492 | 0.5132 | -2.1pp |
| wisesight | 0.41 | 0.65 | -24pp |
This adapter was produced via LoRA SFT on Qwen3-8B with a multi-round corpus mix:
The final adapter is a task-arithmetic merge of multiple SFT rounds — directly averaging LoRA adapter weights with chosen ratios. See the full experiment log in the [project repo].
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
base_id = "Qwen/Qwen3-8B"
adapter_id = "Jnx03/kanitakorn-qwen3-8b-sft-v12"
tok = AutoTokenizer.from_pretrained(base_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(base_id, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True)
model = PeftModel.from_pretrained(model, adapter_id)
model = model.merge_and_unload()
model.eval()
messages = [
{"role": "system", "content": "คุณเป็นผู้ช่วยภาษาไทย"},
{"role": "user", "content": "อธิบายหลักการของอัตราการเร่งในวิชาฟิสิกส์"}
]
text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tok(text, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=512, do_sample=False)
print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
@misc{kanitakorn2026,
title = {Kanitakorn: Thai-Optimized Qwen3-8B via Multi-Round LoRA SFT + Task-Arithmetic Merging},
author = {Jnx03},
year = {2026},
publisher = {HuggingFace},
url = {https://huggingface.co/Jnx03/kanitakorn-qwen3-8b-sft-v12}
}