Views
No views yet
Qwen/Qwen3.5-9B8192 tokens4096 new tokensqwen3.5-9b-MT-Lao-to-TH-Q6_K.ggufQ6_K1{
2 "temperature": 0.4,
3 "top_p": 0.6,
4 "ctx_size": 8192,
5 "max_tokens": 4096,
6 "enable_thinking": false
7}system + user messages and enable_thinking=false. Do not use a generic RAG answer prompt for direct translation.1SYSTEM_PROMPT = (
2 "You are a professional Lao-Thai translator. "
3 "Translate completely and faithfully according to the user instruction. "
4 "Do not summarize, omit, reorder, or add information. "
5 "Preserve protected tokens from the source exactly, including all numbers, "
6 "leading zeros, dates, times, amounts, percentages, document IDs, "
7 "article/case numbers, phone numbers, IP addresses, versions, CVE/CWE IDs, "
8 "hashes, URLs, emails, file names, product codes, separators such as "
9 "- / . : _ ( ) [ ], names, tables, bullets, and Q&A labels. "
10 "Before answering, silently check that every protected token from the source "
11 "is still present in the translation. Return only the translation."
12)
13
14USER_PROMPT_TEMPLATE = (
15 "แปลภาษาลาวให้เป็นภาษาไทยแบบครบถ้วนตามต้นฉบับ\n"
16 "ข้อกำหนด:\n"
17 "- แปลทุกประโยคตามลำดับเดิม ห้ามสรุป ห้ามตัด ห้ามข้าม และห้ามเพิ่มข้อมูลใหม่\n"
18 "- คัดลอก protected tokens ตามต้นฉบับให้ครบทุกตัวอักษร: เลขทุกชุด เลข 0 นำหน้า เลขฉบับ เลขมาตรา เลขคดี วันที่ เวลา จำนวนเงิน เปอร์เซ็นต์ เบอร์โทร IP เวอร์ชัน CVE/CWE URL อีเมล hash path ชื่อไฟล์ และรหัสสินค้า\n"
19 "- ห้ามเปลี่ยนรูปเลขหรือรหัส ห้ามรวม/แยกเลขเอง และห้ามเปลี่ยนเครื่องหมายคั่นในรหัส เช่น -, /, ., :, _, (), []\n"
20 "- คงรูปชื่อเฉพาะ ชื่อบุคคล ชื่อหน่วยงาน ชื่อผลิตภัณฑ์ คำอังกฤษ ตัวย่อ รหัส CVE เลข วันที่ เวลา จำนวนเงิน เปอร์เซ็นต์ URL อีเมล และข้อกฎหมายให้ตรงต้นฉบับหรือคำแปลอ้างอิง\n"
21 "- ห้ามเดาหรือเปลี่ยนสะกดชื่อเฉพาะเป็นคำใกล้เสียง หากไม่มั่นใจให้ถอดตามต้นฉบับอย่างระมัดระวัง\n"
22 "- คำกฎหมาย/ราชการ เช่น มาตรา พ.ร.บ. พ.ร.ก. ศาลฎีกา เพิกถอน ฝากขังผัดแรก และจำนวนกรรม ให้รักษาความหมายเดิม\n"
23 "- ก่อนตอบให้ตรวจว่าเลข/รหัส/URL/อีเมล/ชื่ออังกฤษจากต้นฉบับยังอยู่ครบในคำแปล แต่ไม่ต้องแสดงขั้นตอนตรวจ\n"
24 "- ตอบเฉพาะคำแปลภาษาไทยเท่านั้น\n\n"
25 "### ภาษาลาว\n"
26 "{source_text}\n\n"
27 "### ภาษาไทย\n"
28)
29
30messages = [
31 {"role": "system", "content": SYSTEM_PROMPT},
32 {"role": "user", "content": USER_PROMPT_TEMPLATE.format(source_text=lao_text)},
33]
34
35prompt = tokenizer.apply_chat_template(
36 messages,
37 tokenize=False,
38 add_generation_prompt=True,
39 enable_thinking=False,
40)1<|im_start|>system
2You are a professional Lao-Thai translator. Translate completely and faithfully according to the user instruction. Do not summarize, omit, reorder, or add information. 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.
3<|im_end|>
4<|im_start|>user
5แปลภาษาลาวให้เป็นภาษาไทยแบบครบถ้วนตามต้นฉบับ
6ข้อกำหนด:
7- แปลทุกประโยคตามลำดับเดิม ห้ามสรุป ห้ามตัด ห้ามข้าม และห้ามเพิ่มข้อมูลใหม่
8- คัดลอก protected tokens ตามต้นฉบับให้ครบทุกตัวอักษร: เลขทุกชุด เลข 0 นำหน้า เลขฉบับ เลขมาตรา เลขคดี วันที่ เวลา จำนวนเงิน เปอร์เซ็นต์ เบอร์โทร IP เวอร์ชัน CVE/CWE URL อีเมล hash path ชื่อไฟล์ และรหัสสินค้า
9- ห้ามเปลี่ยนรูปเลขหรือรหัส ห้ามรวม/แยกเลขเอง และห้ามเปลี่ยนเครื่องหมายคั่นในรหัส เช่น -, /, ., :, _, (), []
10- คงรูปชื่อเฉพาะ ชื่อบุคคล ชื่อหน่วยงาน ชื่อผลิตภัณฑ์ คำอังกฤษ ตัวย่อ รหัส CVE เลข วันที่ เวลา จำนวนเงิน เปอร์เซ็นต์ URL อีเมล และข้อกฎหมายให้ตรงต้นฉบับหรือคำแปลอ้างอิง
11- ห้ามเดาหรือเปลี่ยนสะกดชื่อเฉพาะเป็นคำใกล้เสียง หากไม่มั่นใจให้ถอดตามต้นฉบับอย่างระมัดระวัง
12- คำกฎหมาย/ราชการ เช่น มาตรา พ.ร.บ. พ.ร.ก. ศาลฎีกา เพิกถอน ฝากขังผัดแรก และจำนวนกรรม ให้รักษาความหมายเดิม
13- ก่อนตอบให้ตรวจว่าเลข/รหัส/URL/อีเมล/ชื่ออังกฤษจากต้นฉบับยังอยู่ครบในคำแปล แต่ไม่ต้องแสดงขั้นตอนตรวจ
14- ตอบเฉพาะคำแปลภาษาไทยเท่านั้น
15
16### ภาษาลาว
17{source_text}
18
19### ภาษาไทย
20<|im_end|>
21<|im_start|>assistantບໍລິສັດ ABC ແຈ້ງວ່າ CVE-2026-1234 ມີຜົນກະທົບຕໍ່ version 1.2.3 ແລະໃຫ້ດາວໂຫຼດ patch ທີ່ https://example.com/patch.บริษัท ABC แจ้งว่า CVE-2026-1234 มีผลกระทบต่อ version 1.2.3 และให้ดาวน์โหลด patch ที่ https://example.com/patch.1llama-cli \
2 -m qwen3.5-9b-MT-Lao-to-TH-Q6_K.gguf \
3 -c 8192 \
4 -n 4096 \
5 --temp 0.4 \
6 --top-p 0.6 \
7 -p "<rendered Qwen chat prompt from the Inference Prompt section>"examples/test_llama_server_inference.ipynb. The notebook was executed with a real llama-server inference output.system promptuser prompt templatetemperature=0.4, top_p=0.6, ctx_size=8192, max_tokens=4096, enable_thinking=falsellama-server:1llama-server \
2 -m qwen3.5-9b-MT-Lao-to-TH-Q6_K.gguf \
3 -c 8192 \
4 --host 127.0.0.1 \
5 --port 8789jupyter notebook examples/test_llama_server_inference.ipynb/completion prompt includes the Qwen no-thinking block after the assistant header:1<|im_start|>assistant
2<think>
3
4</think>
5enable_thinking=false behavior used for fine-tune/evaluation prompt rendering.