Downloads · 30 days
31
2% of all-time downloads
thodsapon/qwen3.5-9b-MT-Lao-to-TH-GGUF-V1.5
qwen3.5-9b-MT-Lao-to-TH-GGUF-V1.5 is a translation model from thodsapon. Use it when you need text moved from one language to another. It is set up for llama.cpp. The card lists the license as apache-2.0.
This GGUF Q4KM release is provided for testing and research results only. It is part of an experiment on preparing diverse-domain data for Lao-to-Thai machine translation.
Downloads · 30 days
31
2% of all-time downloads
All-time downloads
1.3K
Public
Repo size
5.6 GB
Likes
0
Public
Click a slice to open those files.
.gguf5.6 GB · 100%
From the Hugging Face model README
This GGUF Q4_K_M release is provided for testing and research results only. It is part of an experiment on preparing diverse-domain data for Lao-to-Thai machine translation.
This repository uploads the compact Q4_K_M GGUF only. Q6_K and Q8_0 were evaluated locally for comparison. In local quality/runtime checks, Q6_K was the best overall balance, but Q4_K_M is published here as the smaller distribution build.
Use greedy decoding for stable translation. With llama.cpp/OpenAI-compatible chat completions, omit sampling fields such as temperature, top_p, and top_k unless you intentionally want to test sampling behavior.
| Parameter | Recommended value |
|---|---|
| sampling fields | omit |
| context length | 8192 |
max_tokens | 4096 |
| thinking | disabled, if runtime supports it |
For the 30-case local benchmark, max_tokens=2048 was used. For regular inference, use max_tokens=4096.
You are a professional Lao-Thai translator. Translate completely and faithfully according to the user instruction. Do not summarize, omit, reorder, or add information. For names, places, organizations, projects, apps, and transliterated terms, consider source spelling first. Do not substitute a more familiar name, do not add syllables, and do not change a name into another entity. Preserve protected tokens from the source exactly, including all numbers, leading zeros, dates, times, amounts, percentages, document IDs, article/case numbers, phone numbers, IP addresses, versions, CVE/CWE IDs, hashes, URLs, emails, file names, product codes, separators such as - / . : _ ( ) [ ], names, tables, bullets, and Q&A labels. Before answering, silently check that every protected token from the source is still present in the translation. Return only the translation.
แปลภาษาลาวให้เป็นภาษาไทยแบบครบถ้วนตามต้นฉบับ
ข้อกำหนด:
- แปลทุกประโยคตามลำดับเดิม ห้ามสรุป ห้ามตัด ห้ามข้าม และห้ามเพิ่มข้อมูลใหม่
- ให้พิจารณาตัวสะกดของต้นฉบับก่อนเลือกคำแปล โดยเฉพาะชื่อเฉพาะและคำทับศัพท์
- ชื่อบุคคล ชื่อสถานที่ ชื่อหน่วยงาน ชื่อโครงการ ชื่อแอป และคำทับศัพท์ ให้ถอดเป็นภาษาไทยตามรูปสะกด/เสียงจากต้นฉบับหรือคำแปลอ้างอิงเท่านั้น
- ห้ามเดาชื่อเฉพาะให้เป็นชื่อที่คุ้นเคยกว่า และห้ามเปลี่ยนเป็นชื่อสถานที่ ชื่อบุคคล หรือชื่อหน่วยงานอื่น
- ห้ามเพิ่มพยางค์หรือคำที่ไม่มีในต้นฉบับลงในชื่อเฉพาะ
- คัดลอก protected tokens ตามต้นฉบับให้ครบทุกตัวอักษร: เลขทุกชุด เลข 0 นำหน้า เลขฉบับ เลขมาตรา เลขคดี วันที่ เวลา จำนวนเงิน เปอร์เซ็นต์ เบอร์โทร IP เวอร์ชัน CVE/CWE URL อีเมล hash path ชื่อไฟล์ และรหัสสินค้า
- ห้ามเปลี่ยนรูปเลขหรือรหัส ห้ามรวม/แยกเลขเอง และห้ามเปลี่ยนเครื่องหมายคั่นในรหัส เช่น -, /, ., :, _, (), []
- คงรูปชื่อเฉพาะ ชื่อบุคคล ชื่อหน่วยงาน ชื่อผลิตภัณฑ์ คำอังกฤษ ตัวย่อ รหัส CVE เลข วันที่ เวลา จำนวนเงิน เปอร์เซ็นต์ URL อีเมล และข้อกฎหมายให้ตรงต้นฉบับหรือคำแปลอ้างอิง
- คำกฎหมาย/ราชการ เช่น มาตรา พ.ร.บ. พ.ร.ก. ศาลฎีกา เพิกถอน ฝากขังผัดแรก และจำนวนกรรม ให้รักษาความหมายเดิม
- ก่อนตอบให้ตรวจว่าเลข/รหัส/URL/อีเมล/ชื่ออังกฤษจากต้นฉบับยังอยู่ครบในคำแปล แต่ไม่ต้องแสดงขั้นตอนตรวจ
- ตอบเฉพาะคำแปลภาษาไทยเท่านั้น
### ภาษาลาว
{source_text}
### ภาษาไทย
huggingface-cli download thodsapon/qwen3.5-9b-MT-Lao-to-TH-GGUF-V1.5 \
lao_to_thai_final_adapter_Q4_K_M.gguf \
--local-dir .
llama-server \
-m lao_to_thai_final_adapter_Q4_K_M.gguf \
-c 8192 \
-ngl 99 \
--host 127.0.0.1 \
--port 8080 \
--flash-attn on
import requests
SYSTEM_PROMPT = """You are a professional Lao-Thai translator. Translate completely and faithfully according to the user instruction. Do not summarize, omit, reorder, or add information. For names, places, organizations, projects, apps, and transliterated terms, consider source spelling first. Do not substitute a more familiar name, do not add syllables, and do not change a name into another entity. Preserve protected tokens from the source exactly, including all numbers, leading zeros, dates, times, amounts, percentages, document IDs, article/case numbers, phone numbers, IP addresses, versions, CVE/CWE IDs, hashes, URLs, emails, file names, product codes, separators such as - / . : _ ( ) [ ], names, tables, bullets, and Q&A labels. Before answering, silently check that every protected token from the source is still present in the translation. Return only the translation."""
def build_user_prompt(source_text: str) -> str:
return f"""แปลภาษาลาวให้เป็นภาษาไทยแบบครบถ้วนตามต้นฉบับ
ข้อกำหนด:
- แปลทุกประโยคตามลำดับเดิม ห้ามสรุป ห้ามตัด ห้ามข้าม และห้ามเพิ่มข้อมูลใหม่
- ให้พิจารณาตัวสะกดของต้นฉบับก่อนเลือกคำแปล โดยเฉพาะชื่อเฉพาะและคำทับศัพท์
- ชื่อบุคคล ชื่อสถานที่ ชื่อหน่วยงาน ชื่อโครงการ ชื่อแอป และคำทับศัพท์ ให้ถอดเป็นภาษาไทยตามรูปสะกด/เสียงจากต้นฉบับหรือคำแปลอ้างอิงเท่านั้น
- ห้ามเดาชื่อเฉพาะให้เป็นชื่อที่คุ้นเคยกว่า และห้ามเปลี่ยนเป็นชื่อสถานที่ ชื่อบุคคล หรือชื่อหน่วยงานอื่น
- ห้ามเพิ่มพยางค์หรือคำที่ไม่มีในต้นฉบับลงในชื่อเฉพาะ
- คัดลอก protected tokens ตามต้นฉบับให้ครบทุกตัวอักษร: เลขทุกชุด เลข 0 นำหน้า เลขฉบับ เลขมาตรา เลขคดี วันที่ เวลา จำนวนเงิน เปอร์เซ็นต์ เบอร์โทร IP เวอร์ชัน CVE/CWE URL อีเมล hash path ชื่อไฟล์ และรหัสสินค้า
- ห้ามเปลี่ยนรูปเลขหรือรหัส ห้ามรวม/แยกเลขเอง และห้ามเปลี่ยนเครื่องหมายคั่นในรหัส เช่น -, /, ., :, _, (), []
- คงรูปชื่อเฉพาะ ชื่อบุคคล ชื่อหน่วยงาน ชื่อผลิตภัณฑ์ คำอังกฤษ ตัวย่อ รหัส CVE เลข วันที่ เวลา จำนวนเงิน เปอร์เซ็นต์ URL อีเมล และข้อกฎหมายให้ตรงต้นฉบับหรือคำแปลอ้างอิง
- คำกฎหมาย/ราชการ เช่น มาตรา พ.ร.บ. พ.ร.ก. ศาลฎีกา เพิกถอน ฝากขังผัดแรก และจำนวนกรรม ให้รักษาความหมายเดิม
- ก่อนตอบให้ตรวจว่าเลข/รหัส/URL/อีเมล/ชื่ออังกฤษจากต้นฉบับยังอยู่ครบในคำแปล แต่ไม่ต้องแสดงขั้นตอนตรวจ
- ตอบเฉพาะคำแปลภาษาไทยเท่านั้น
### ภาษาลาว
{source_text}
### ภาษาไทย
"""
source_text = "ສະບາຍດີ ຂ້ອຍຊື່ ສົມຊາຍ ແລະ ມີເລກອ້າງອີງ INV-2026/001."
payload = {
"model": "lao-to-thai-q4",
"messages": [
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": build_user_prompt(source_text)},
],
"max_tokens": 4096,
"stream": False,
"chat_template_kwargs": {"enable_thinking": False},
}
response = requests.post("http://127.0.0.1:8080/v1/chat/completions", json=payload, timeout=600)
response.raise_for_status()
print(response.json()["choices"][0]["message"]["content"].strip())
| Item | Value |
|---|---|
| Epochs | 2 |
| LoRA rank | 32 |
| LoRA alpha | 32 |
| Scheduler | cosine |
| Max sequence length | 8192 |
| Epoch 2 final logged loss | 0.008393 at checkpoint-3008 / step 3008 |
The synthetic use-case data was generated by an LLM as a Lao-to-Thai test set. The Excel file contains 30 longer multi-domain examples.
Use-case file included in this repository:
lao_thai_use_cases.xlsx: Excel use-case file with exactly two columns: A ภาษาลาว, B ภาษาไทย.| Model | Cases (items) | BLEU (0-100) | chrF++ (0-100) | Exact (ratio) | Protected missing (tokens) | CJK chars (chars) | Avg sec (sec/case) |
|---|---|---|---|---|---|---|---|
| FT_Q8_0 | 30 | 93.2327 | 94.6946 | 0.0000 | 9 | 2 | 2.02 |
| FT_Q6_K | 30 | 92.9800 | 94.5062 | 0.0000 | 14 | 4 | 1.68 |
| FT_Q4_K_M | 30 | 89.9864 | 92.1602 | 0.0000 | 17 | 2 | 1.41 |
| Qwen3.6_35B_A3B_Q6_K_XL | 30 | 86.5539 | 90.1042 | 0.0000 | 40 | 0 | 1.34 |
| Qwen3.5_9B_Base_HF | 30 | 83.9285 | 89.2971 | 0.0000 | 7 | 0 | 6.57 |
| Qwen3.6_27B_MTB_Q6_K_XL | 30 | 81.9250 | 88.2279 | 0.0000 | 19 | 0 | 4.89 |
| Qwen3.5_4B_Base_HF | 30 | 78.6997 | 84.7728 | 0.0000 | 53 | 0 | 7.19 |
Decode note: the benchmark used greedy decoding. GGUF tests omitted sampling fields (temperature, top_p, top_k); Hugging Face base-model tests used greedy generation with do_sample=False.
Column notes / คำอธิบายคอลัมน์:
Cases (items): EN: number of synthetic test examples. TH: จำนวนตัวอย่างทดสอบBLEU (0-100): EN: translation similarity score on a 0-100 scale; higher is better. TH: คะแนนความใกล้เคียงของคำแปลในสเกล 0-100 ยิ่งสูงยิ่งดีchrF++ (0-100): EN: character n-gram F-score with word-order support on a 0-100 scale; higher means the generated Thai text is closer to the reference. TH: คะแนนความใกล้เคียงระดับตัวอักษรพร้อมพิจารณาลำดับคำในสเกล 0-100 ยิ่งสูงยิ่งใกล้คำแปลอ้างอิงExact (ratio): EN: strict exact-match ratio after trimming leading/trailing whitespace. TH: สัดส่วนคำตอบที่ตรงกับคำแปลอ้างอิงทุกตัวอักษรหลังตัดช่องว่างหัวท้ายProtected missing (tokens): EN: count of protected source tokens missing from the output, such as numbers, dates, IDs, URLs, emails, product names, and codes. TH: จำนวน token สำคัญจากต้นฉบับที่หายไปจากผลลัพธ์ เช่น ตัวเลข วันที่ รหัส URL อีเมล ชื่อสินค้า และ codeCJK chars (chars): EN: count of Chinese/Japanese/Korean characters found in the generated output. TH: จำนวนอักขระจีน/ญี่ปุ่น/เกาหลีที่หลุดมาในผลลัพธ์Avg sec (sec/case): EN: average generation time in seconds per test example. TH: เวลาเฉลี่ยในการสร้างคำตอบ หน่วยเป็นวินาทีต่อหนึ่งตัวอย่างThe base model is Apache-2.0 licensed. This GGUF release follows Apache-2.0. Intended for education and research only.