<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="http://pythainlp.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="http://pythainlp.github.io/" rel="alternate" type="text/html" /><updated>2026-02-06T09:53:57+00:00</updated><id>http://pythainlp.github.io/feed.xml</id><title type="html">PyThaiNLP</title><subtitle>We build Thai NLP.</subtitle><entry><title type="html">เปิดตัว ภูผา: ชุดข้อมูลความถี่คำภาษาไทย</title><link href="http://pythainlp.github.io/2026-02-06-phupha/" rel="alternate" type="text/html" title="เปิดตัว ภูผา: ชุดข้อมูลความถี่คำภาษาไทย" /><published>2026-02-06T00:00:00+00:00</published><updated>2026-02-06T00:00:00+00:00</updated><id>http://pythainlp.github.io/phupha</id><content type="html" xml:base="http://pythainlp.github.io/2026-02-06-phupha/"><![CDATA[<p>ผมได้ปล่อยชุดข้อมูลภาษาไทยตัวใหม่ ชื่อ “ภูผา (Phupha)” เป็นชุดข้อมูลความถี่คำภาษาไทยจาก CommonCrawl โดย CommonCrawl เป็นชุดข้อมูลที่รวบรวมหน้าเว็บจากอินเทอร์เน็ตเอาไว้ โดยผมได้ใช้ Infini-gram mini API ช่วยสำหรับดึงความถี่คำภาษาไทยจาก CommonCrawl Corpus (Common Crawl July 2025 Crawl) มาเก็บไว้</p>

<p>ชุดข้อมูล Phupha มีขนาดคำ 62,265 คำ (มีภาษาอังกฤษหลุดมาหนึ่งคำคือคำว่า word) โดยคำเป็นคำที่มาจากพจนานุกรมตัดคำภาษาไทยของ PyThaiNLP และรายการคำศัพท์ภาษาไทยจากราชบัณฑิตยสภา</p>

<p>โหลดได้ที่ <a href="https://github.com/PyThaiNLP/Phupha-Word-freq">https://github.com/PyThaiNLP/Phupha-Word-freq</a></p>

<p><strong>สถิติน่าสนใจ</strong></p>

<p>สำหรับ Common Crawl July 2025 Crawl คำภาษาไทยที่มีมากที่สุด 10 อันดับแรกมีดังนี้</p>

<table>
  <thead>
    <tr>
      <th> </th>
      <th>word</th>
      <th>count</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>61861</td>
      <td>กา</td>
      <td>193460292</td>
    </tr>
    <tr>
      <td>11281</td>
      <td>ที</td>
      <td>178316719</td>
    </tr>
    <tr>
      <td>15767</td>
      <td>การ</td>
      <td>170924829</td>
    </tr>
    <tr>
      <td>29153</td>
      <td>อง</td>
      <td>168370283</td>
    </tr>
    <tr>
      <td>58407</td>
      <td>ที่</td>
      <td>162917982</td>
    </tr>
    <tr>
      <td>33326</td>
      <td>ระ</td>
      <td>108382029</td>
    </tr>
    <tr>
      <td>13826</td>
      <td>มา</td>
      <td>98172980</td>
    </tr>
    <tr>
      <td>10729</td>
      <td>แล</td>
      <td>96606598</td>
    </tr>
    <tr>
      <td>40491</td>
      <td>ละ</td>
      <td>85820577</td>
    </tr>
    <tr>
      <td>12358</td>
      <td>รา</td>
      <td>83917626</td>
    </tr>
  </tbody>
</table>

<p>จะเห็นได้ว่าคำว่า “กา” มีความถี่สูงที่สุด</p>

<p>หากใครต้องการค้นคำอื่น ๆ หรือหาตัวอย่างข้อความที่ใช้คำดังกล่าว <a href="https://huggingface.co/spaces/infini-gram-mini/infini-gram-mini">https://huggingface.co/spaces/infini-gram-mini/infini-gram-mini</a></p>

<p>อ่านรายละเอียดเกี่ยวกับ Infini-gram mini ได้ที่ <a href="https://infini-gram-mini.io/">https://infini-gram-mini.io/</a></p>

<p>เขียนโดย วรรณพงษ์ ภัททิยไพบูลย์ 6 กุมภาพันธ์ 2569</p>]]></content><author><name></name></author><category term="news" /><summary type="html"><![CDATA[ผมได้ปล่อยชุดข้อมูลภาษาไทยตัวใหม่ ชื่อ “ภูผา (Phupha)” เป็นชุดข้อมูลความถี่คำภาษาไทยจาก CommonCrawl โดย CommonCrawl เป็นชุดข้อมูลที่รวบรวมหน้าเว็บจากอินเทอร์เน็ตเอาไว้ โดยผมได้ใช้ Infini-gram mini API ช่วยสำหรับดึงความถี่คำภาษาไทยจาก CommonCrawl Corpus (Common Crawl July 2025 Crawl) มาเก็บไว้]]></summary></entry><entry><title type="html">ซอฟต์แวร์ AI Open Source เฉพาะภาษายังจำเป็นอยู่ไหมกับยุค GenAI</title><link href="http://pythainlp.github.io/2025-10-27-ai-oss-monolingual-important/" rel="alternate" type="text/html" title="ซอฟต์แวร์ AI Open Source เฉพาะภาษายังจำเป็นอยู่ไหมกับยุค GenAI" /><published>2025-10-27T00:00:00+00:00</published><updated>2025-10-27T00:00:00+00:00</updated><id>http://pythainlp.github.io/ai-oss-monolingual-important</id><content type="html" xml:base="http://pythainlp.github.io/2025-10-27-ai-oss-monolingual-important/"><![CDATA[<p>หลังจากที่เราเข้าสู่ยุค GenAI การมาของ ChatGPT จนปัจจุบันนี้ ปัญญาประดิษฐ์ด้านภาษาธรรมชาติกลายเป็นผู้ช่วยที่ทุก ๆ คนสามารถเข้าถึงได้ง่ายดาย ไม่ต้องสร้างโมเดลเอง ปรับแต่งแค่คำสั่งเพื่อใช้งาน ทำให้เกิดคำถามซอฟต์แวร์ AI Open Source เฉพาะภาษายังจำเป็นอยู่ไหมกับยุค GenAI</p>

<p>สำหรับ PyThaiNLP เราพัฒนาชุดซอฟต์แวร์สำหรับประมวลผลภาษาไทยมาตั้งแต่ปี ค.ศ. 2016 ก่อนยุค GenAI มีทั้งตัดคำ โมเดลแยกอารมณ์จากข้อความ (ในอดีต) และอื่น ๆ การมาของ ChatGPT เมื่อปี ค.ศ. 2022 ที่เปลี่ยนโลกของการวิจัยปัญญาประดิษฐ์ไป โลกเข้าสู่ยุคโมเดลภาษาขนาดใหญ่ ถนนแทบทุกสายมุ่งไปทางนี้ ทำให้มีหลายคนเกิดคำถามว่าซอฟต์แวร์เปิด (open source software) เฉพาะภาษา อย่าง PyThaiNLP ที่พัฒนาเครื่องมือพื้นฐานยังสำคัญอยู่ไหม ผลกระทบ LLM กับ PyThaiNLP เป็นอย่างไร แล้วถ้าไม่จำเป็นต้องใช้แล้ว PyThaiNLP จะไปไหน</p>

<p>หนึ่ง <strong>PyThaiNLP ที่พัฒนาเครื่องมือพื้นฐานยังสำคัญอยู่ไหม</strong>: เราเป็นชุดซอฟต์แวร์เปิดที่เปิดทั้งโมเดล ชุดข้อมูล โค้ด ที่พัฒนามาอย่างยาวนาน ตั้งแต่ปี ค.ศ. 2016 ถ้ามูลค่าในการพัฒนาซอฟต์แวร์ปิดให้ได้ระดับเดียวกันยังคงเป็นค่าใช้จ่ายที่สูง เราผ่านการลองผิดลองถูกมาค่อนข้างเยอะ ปัจจุบันนี้ เรามีฟังก์ชันครบพื้นฐานทั้งหมดแล้ว และมีเครื่องมือทำความสะอาดข้อมูล เครื่องมือทางภาษาศาสตร์ เครื่องมือช่วยต่าง ๆ ที่หาไม่ได้จากที่ไหนอื่นอยู่ใน PyThaiNLP จำนวนมาก กับชุดข้อมูลที่เราปล่อยให้เข้าถึงสาธารณะจากทุกแห่งบนโลกได้  และสุดท้ายนี้ PyThaiNLP ยังคงถูกนำไปใช้เป็นเครื่องมือในการเรียนการสอนวิชาปัญญาประดิษฐ์และภาษาศาสตร์ในหลายมหาวิทยาลัย รวมถึงใช้ในงานวิจัยที่เกี่ยวข้องกับภาษาไทย อ่านงานวิจัยที่ใช้ PyThaiNLP ได้ที่ <a href="https://scholar.google.com/scholar?start=0&amp;q=%22pythainlp%22">Google Scholar</a></p>

<p><img src="https://pythainlp.org/image/genai-20251027/use-pythainlp.png" alt="" /></p>
<blockquote>
  <p>ตัวอย่างของการใช้ PyThaiNLP ในปัจจุบันจากบริษัทผู้พัฒนา LLM</p>
</blockquote>

<p>สอง <strong>ผลกระทบ LLM กับ PyThaiNLP เป็นอย่างไร</strong>: ข้อนี้อาจทำทุกคนตกใจคือ <strong>PyThaiNLP เราไม่ได้รับผลกระทบทางตรงจากการมาของ ChatGPT หรือ LLM</strong> โดยยอดโหลดของซอฟต์แวร์เรายิ่งสูงขึ้นทุก ๆ ปี แถมเราพบว่า Meta, Huggingface (เท่าที่เปิดเผยสู่สาธารณะ) และอื่น ๆ ต่างยังคงใช้ PyThaiNLP ในขั้นตอนพัฒนาโมเดลของตนเอง ทั้งงานพื้นฐาน ทำความสะอาดข้อมูลสำหรับงานภาษาไทย สิ่งเหล่านี้กลายเป็นโมเดล LLM, ASR และอื่น ๆ จำนวนมาก  แสดงให้เห็นว่า เครื่องมือของ PyThaiNLP หลายอย่างยังคงสำคัญสำหรับงานพัฒนาโมเดล GenAI, LLM อยู่ แม้จะเป็นงานเบื้องหลัง แต่ก็เป็นงานที่ยังคงต้องพึ่งพาซอฟต์แวร์พื้นฐานอยู่ เพราะการพัฒนาซอฟต์แวร์เปิดมีส่วนช่วยให้บริษัทบนโลกใบนี้ไม่ว่าอยู่ที่ไหนก็สามารถพัฒนาโมเดลสำหรับภาษาไทยจากการใช้ซอฟต์แวร์เปิด แม้ว่าจะเปลี่ยนจากเมื่อก่อน ผู้คนที่ต้องการทำโมเดล AI ต้องเริ่มจากศึกษาการประมวลภาษาธรรมชาติพื้นฐาน และใช้เครื่องมือพื้นฐานก่อนไปพัฒนาโมเดลทุกครั้ง กลายเป็น API กับป้อนคำสั่งให้ทำตามผ่าน GenAI ก็ตาม</p>

<p><img src="https://pythainlp.org/image/genai-20251027/download-plot.png" alt="" /></p>
<blockquote>
  <p>ยอดโหลดจาก <a href="https://clickpy.clickhouse.com/dashboard/pythainlp">https://clickpy.clickhouse.com/dashboard/pythainlp</a></p>
</blockquote>

<p>นอกเหนือจากนี้ เราเปิดเผยชุดข้อมูลด้วย ซึ่งชุดข้อมูลเรามีส่วนร่วมในการพัฒนาโมเดลเปิดต่าง ๆ ที่รองรับภาษาไทย ไม่ว่าจะเป็น Thai NER, wisesight_sentiment และอื่น ๆ ทำให้แม้เราจะทำโมเดลออกมาแล้วตกยุคไป นักพัฒนาคนอื่น ๆ ยังสามารถนำชุดข้อมูลไปพัฒนาโมเดลของตนเองที่เก่งกว่าได้ เช่น นำไปเทรนร่วมกับ LLM เป็นต้น สำหรับการพัฒนา PyThaiNLP เรายังได้ใช้ GenAI มาช่วยในการพัฒนาซอฟต์แวร์ PyThaiNLP อยู่บ้างในปัจจุบัน</p>

<p>สาม <strong>ถ้าไม่จำเป็นต้องใช้แล้ว PyThaiNLP จะไปไหน</strong>: PyThaiNLP จะยังคงอยู่เป็นซอฟต์แวร์เปิดบนอินเทอร์เน็ตต่อไปพร้อมกับชุดข้อมูล ไม่ว่าจะพัฒนาต่อหรือยุติการพัฒนาก็ตาม โค้ด ชุดข้อมูล โมเดลอาจถูกพัฒนาต่อไปรวมกับโครงการอื่น ๆ ได้ตามธรรมชาติของ open source อย่างไรก็ตาม ช่องว่างของการรันโมเดลขนาดใหญ่ยังคงเป็นปัญหาใหญ่ของการเข้าถึงเทคโนโลยี ค่าใช้จ่าย ความเป็นส่วนตัว ความปลอดภัยของข้อมูล เป็นปัญหาใหญ่ของการใช้งาน LLM ทั้งแบบรันด้วยตนเองหรือผ่าน API ขณะที่เราสามารถทำสิ่งเดียวกันกับที่ LLM ทำ อย่างเช่น บอกอารมณ์จากข้อความ จากการเทรนโมเดลเองถูกกว่าการใช้ LLM หรือ API โดยมีความแม่นยำไม่ต่างกันนักอยู่ในปัจจุบัน แถมปลอดภัยกว่าสำหรับการรักษาข้อมูล</p>

<p>นอกจากนี้ PyThaiNLP เราได้มีส่วนร่วมในการอนุรักษ์ภาษาไทย ตราบใดที่ PyThaiNLP ยังอยู่บนอินเทอร์เน็ต ยังคงสามารถใช้งานเพื่อประมวลผลภาษาไทยได้อยู่ และ PyThaiNLP ได้ถูกบรรจุอยู่ภายใต้ <a href="https://archiveprogram.github.com/arctic-vault/">GitHub Arctic Code Vault</a> ไปแล้วเมื่อปี ค.ศ. 2020 ที่ผ่านมา ซึ่งเป็นโครงการเก็บรักษาซอฟต์แวร์เปิดของมวลมนุษยชาติบน GiHub ไปฝังใต้ดินขั้วโลกเหนือ เก็บรักษาระดับ 1,000 ปี ภาษาไทยเราได้ถูกสำเนาไปด้วย พร้อมกับ PyThaiNLP (และข้อผิดพลาดหรือ bug ไปด้วย) คนยุคพันปีข้างหน้า หากเจอเอกสารภาษาไทยแบบโบราณจากยุคนี้ (กรณียังมีคนใช้งานภาษาไทย) หรือเป็นยุคที่ภาษาไทยอาจหายสาบสูญไปแล้วก็ได้ (กรณีไม่มีคนใช้ภาษาไทยเหลืออยู่) แต่จะยังคงสามารถประมวลผลภาษาไทยจากโค้ด PyThaiNLP ที่ถูกรักษาไว้ได้ มรดกมวลมนุษยชาติทางภาษา ทั้งปรัชญา วัฒนธรรม วรรณกรรม ประเพณี ศาสนา ความคิดและอื่น ๆ ที่เกิดขึ้นในภาษาไทยจะไม่สูญหายไปไหน ถ้าให้คนยุคพันปีข้างหน้าหรือให้ AGI มาช่วยกันถอดโดยไม่มีซอฟต์แวร์พื้นฐานเลย คงจะยังเป็นงานที่ยุ่งยากอยู่ดี</p>

<p>จากสามข้อขั้นต้น จะเห็นได้ว่า ซอฟต์แวร์เปิดอย่าง open source เฉพาะภาษายังคงจำเป็นแม้ในยุค GenAI ถึงแม้จากงานเบื้องหน้าจะกลายเป็นงานเบื้องหลังก็ตาม และเป็นสิ่งที่ซอฟต์แวร์เปิดทำได้ไม่ว่ายุคสมัยจะเปลี่ยนแปลงไปอย่างไรก็ตาม นี่คือความงดงามของ Open Source</p>

<p>สำหรับ PyThaiNLP เราพัฒนาซอฟต์แวร์ โมเดลและชุดข้อมูลมาตั้งแต่ปี ค.ศ. 2016 ณ ปัจจุบันวงการปัญญาประดิษฐ์กับการประมวลผลภาษาธรรมชาติสำหรับภาษาไทยถือว่าพัฒนามาไกลพอสมควรและดีกว่าเมื่อเทียบกับก่อนปี ค.ศ. 2016 อ่านเพิ่มเติมเกี่ยวกับ PyThaiNLP ได้ที่ <a href="https://aclanthology.org/2023.nlposs-1.4/">PyThaiNLP: Thai Natural Language Processing in Python</a></p>

<p><strong>เกี่ยวกับ PyThaiNLP</strong></p>

<p>PyThaiNLP เป็นกลุ่มนักพัฒนาซอฟต์แวร์เปิดเพื่อการประมวลผลภาษาไทย พวกเราสร้างซอฟต์แวร์ โมเดลและชุดข้อมูลสำหรับภาษาไทย</p>

<p>บทความนี้เขียนโดย วรรณพงษ์ ภัททิยไพบูลย์ 27 ตุลาคม ค.ศ. 2025</p>]]></content><author><name></name></author><category term="news" /><summary type="html"><![CDATA[หลังจากที่เราเข้าสู่ยุค GenAI การมาของ ChatGPT จนปัจจุบันนี้ ปัญญาประดิษฐ์ด้านภาษาธรรมชาติกลายเป็นผู้ช่วยที่ทุก ๆ คนสามารถเข้าถึงได้ง่ายดาย ไม่ต้องสร้างโมเดลเอง ปรับแต่งแค่คำสั่งเพื่อใช้งาน ทำให้เกิดคำถามซอฟต์แวร์ AI Open Source เฉพาะภาษายังจำเป็นอยู่ไหมกับยุค GenAI]]></summary></entry><entry><title type="html">PyThaiNLP 5.1 Released!</title><link href="http://pythainlp.github.io/2025-02-25-pythainlp-5-1-0/" rel="alternate" type="text/html" title="PyThaiNLP 5.1 Released!" /><published>2025-02-25T00:00:00+00:00</published><updated>2025-02-25T00:00:00+00:00</updated><id>http://pythainlp.github.io/pythainlp-5-1-0</id><content type="html" xml:base="http://pythainlp.github.io/2025-02-25-pythainlp-5-1-0/"><![CDATA[<p>We released PyThaiNLP v5.1.0! This version are increase features and fixed some problems such as Thai Discourse Treebank (TDTB), Thai Solar Date convert to Thai Lunar Date, and others.</p>

<p>Install: pip install pythainlp
Upgrade: pip install -U pythainlp</p>

<ul>
  <li>Documentation: <a href="https://pythainlp.github.io/docs/5.1">https://pythainlp.github.io/docs/5.1</a></li>
  <li>Report bug: <a href="https://github.com/PyThaiNLP/pythainlp/issues">https://github.com/PyThaiNLP/pythainlp/issues</a></li>
</ul>

<p>See PyThaiNLP 5.1 Change Log: <a href="https://github.com/PyThaiNLP/pythainlp/issues/900">#900</a></p>

<p>See more: <a href="https://github.com/PyThaiNLP/pythainlp/releases/tag/v5.1.0">https://github.com/PyThaiNLP/pythainlp/releases/tag/v5.1.0</a></p>

<p>We build Thai NLP.
#PyThaiNLP #ThaiNLP</p>]]></content><author><name></name></author><category term="news" /><summary type="html"><![CDATA[We released PyThaiNLP v5.1.0! This version are increase features and fixed some problems such as Thai Discourse Treebank (TDTB), Thai Solar Date convert to Thai Lunar Date, and others.]]></summary></entry><entry><title type="html">nlpO3-Python 1.3.1 Released!</title><link href="http://pythainlp.github.io/2024-11-12-nlpo3-new-release/" rel="alternate" type="text/html" title="nlpO3-Python 1.3.1 Released!" /><published>2024-11-12T00:00:00+00:00</published><updated>2024-11-12T00:00:00+00:00</updated><id>http://pythainlp.github.io/nlpo3-new-release</id><content type="html" xml:base="http://pythainlp.github.io/2024-11-12-nlpo3-new-release/"><![CDATA[<p>What’s Changed</p>
<ul>
  <li>PyO3 compatibility: Updated to support the latest PyO3 versions (0.21+) and leverage the Bound struct for efficiency.</li>
  <li>Python version: Minimum supported Python version is now 3.7.</li>
  <li>Upgraded backend: The Rust nlpo3 library has been upgraded to v1.4.0, resulting in improved Thai character cluster handling.</li>
  <li>No new features or API changes.</li>
</ul>

<p>Install:</p>

<blockquote>
  <p>pip install nlpo3</p>
</blockquote>

<p>See more: <a href="https://github.com/PyThaiNLP/nlpo3/releases/tag/nlpo3-python-v1.3.1">https://github.com/PyThaiNLP/nlpo3/releases/tag/nlpo3-python-v1.3.1</a></p>]]></content><author><name></name></author><category term="news" /><summary type="html"><![CDATA[What’s Changed PyO3 compatibility: Updated to support the latest PyO3 versions (0.21+) and leverage the Bound struct for efficiency. Python version: Minimum supported Python version is now 3.7. Upgraded backend: The Rust nlpo3 library has been upgraded to v1.4.0, resulting in improved Thai character cluster handling. No new features or API changes.]]></summary></entry><entry><title type="html">KhanomTanLLM: Open Source Thai LLM</title><link href="http://pythainlp.github.io/2024-09-12-khanomtanllm/" rel="alternate" type="text/html" title="KhanomTanLLM: Open Source Thai LLM" /><published>2024-09-12T00:00:00+00:00</published><updated>2024-09-12T00:00:00+00:00</updated><id>http://pythainlp.github.io/khanomtanllm</id><content type="html" xml:base="http://pythainlp.github.io/2024-09-12-khanomtanllm/"><![CDATA[<p><img src="https://imgur.com/LpQmJqY.png" alt="" /></p>
<blockquote>
  <p>Image gen from <a href="https://huggingface.co/spaces/black-forest-labs/FLUX.1-dev">FLUX.1 [dev]</a></p>
</blockquote>

<p>วันนี้เรายินดีที่จะเปิดตัว KhanomTanLLM (ขนมตาล LLM) เป็น Open Source language model แรกของภาษาอังกฤษ-ภาษาไทย ที่เทรนด้วยชุดข้อมูลเปิด และปล่อยชุดข้อมูลที่ใช้เทรน LLM ทั้งหมด พร้อม pipeline ในการเทรน และโมเดลที่สามารถนำไปใช้งานในเชิงพาณิชย์ได้ นอกจากนั้นเรายังปล่อยโมเดลทั้งขนาด 1B กับ 3B ถือเป็น small lm ตัวแรกที่เป็น Open Source ของภาษาไทยที่เปิดเผยทั้งชุดข้อมูลในการทำ pretrained, pipeline ในการทำ pretrained, และโมเดล</p>

<p>หลังจากที่ Phi model ออกมา ได้จุดประกายโมเดล LLM ที่มีขนาดน้อยกว่า 7B ในการใช้งานในโลกจริง แต่โมเดลที่มีขนาด 1B และ 3B ที่รองรับภาษาไทย ยังมีจำนวนน้อย ได้แก่ <a href="https://huggingface.co/google/gemma-2b">gemma-2b</a>, <a href="https://huggingface.co/Qwen/Qwen2-1.5B">Qwen2-1.5B</a>, <a href="https://huggingface.co/models?other=xglm">XGLM</a>, <a href="https://huggingface.co/ai-forever/mGPT">mGPT</a> และ <a href="https://huggingface.co/RWKV/">RWKV</a> เป็นต้น แต่ทั้งหมดไม่ได้เปิดเผยชุดข้อมูลที่นำมาเทรนโมเดลเพื่อทำ pretrained model สู่สาธารณะที่เข้าถึงได้ และ gemma-2b ไม่ได้ถูกนับว่าเป็น Open Source ด้วยเงื่อนไขในการใช้งานโมเดล ดังนั้น เราจึงเริ่มลงมือรวบรวมชุดข้อมูลภาษาไทย-ภาษาอังกฤษ เพื่อทำ Open Source LM ขนาดเล็กที่เราอยากได้ที่เปิดเผยทั้งชุดข้อมูลในการทำ pretrained, pipeline ในการทำ pretrained, และโมเดล</p>

<p>GitHub KhanomTanLLM: <a href="https://github.com/PyThaiNLP/KhanomTanLLM">https://github.com/PyThaiNLP/KhanomTanLLM</a></p>

<h2 id="dataset">Dataset</h2>

<p>เราได้ทำการปล่อยชุดข้อมูลสำหรับการทำ Pretrained LLM ตัวนี้ไว้ที่</p>

<p>Pretraining dataset: <a href="https://huggingface.co/datasets/wannaphong/KhanomTanLLM-pretrained-dataset">https://huggingface.co/datasets/wannaphong/KhanomTanLLM-pretrained-dataset</a></p>
<ul>
  <li>Thai subset only: <a href="https://huggingface.co/datasets/wannaphong/KhanomTanLLM-pretrained-dataset-thai-subset">https://huggingface.co/datasets/wannaphong/KhanomTanLLM-pretrained-dataset-thai-subset</a></li>
  <li>List Thai subset: <a href="https://huggingface.co/collections/pythainlp/datasets-for-pretrained-thai-llm-65db96ab730386b492889a98">https://huggingface.co/collections/pythainlp/datasets-for-pretrained-thai-llm-65db96ab730386b492889a98</a></li>
</ul>

<p>โดยชุดข้อมูลทั้งหมดมี 53,376,211,711 Tokens</p>

<ul>
  <li>English: 31,629,984,243 Tokens</li>
  <li>Thai: 12,785,565,497 Tokens</li>
  <li>Code: 8,913,084,300 Toekns</li>
  <li>Parallel data: 190,310,686 Tokens</li>
</ul>

<p>Based on Typhoon-7B (https://huggingface.co/scb10x/typhoon-7b) tokenizer</p>

<p>สำหรับภาษาอังกฤษ เรานำชุดข้อมูลสังเคราะห์ทำตาม Cosmopedia ของ HuggingFace ที่สังเคราะห์ชุดข้อมูลภาษาอังกฤษไว้ <a href="https://huggingface.co/datasets/HuggingFaceTB/cosmopedia">https://huggingface.co/datasets/HuggingFaceTB/cosmopedia</a> และนำชุดข้อมูลอย่าง openwebtext ชุดข้อมูลเว็บ, epfl-llm/guidelines, MathPile_Commercial ชุดข้อมูลคณิตศาสตร์, minipile ชุดข้อมูลขนาดย่อจาก The Pile, goodwiki ชุดข้อมูลวิกิแบบ markdown และชุดข้อมูลจาก bigscience ที่เทรน Bloom LM มาใช้งาน</p>

<p>สำหรับรายละเอียดชุดข้อมูลอ่านได้ที่ <a href="https://huggingface.co/datasets/wannaphong/KhanomTanLLM-pretrained-dataset">https://huggingface.co/datasets/wannaphong/KhanomTanLLM-pretrained-dataset</a></p>

<h2 id="tokenizer">Tokenizer</h2>

<p>เราตัดสินใจใช้ Tokenizer ของ Typhoon-7B <a href="https://huggingface.co/scb10x/typhoon-7b">https://huggingface.co/scb10x/typhoon-7b</a> ในโมเดลของเรา เพื่อประหยัดทรัพยากรในการเทรน Tokenizer</p>

<h2 id="pretraining">Pretraining</h2>

<p>เราได้ใช้ pipeline สำหรับเทรน LLM ของเราด้วย <a href="https://github.com/young-geng/EasyLM">EasyLM project</a> เป็นชุด pipeline ของ<a href="https://github.com/openlm-research/open_llama">โมเดล OpenLLaMA</a>  เราได้ยืนขอการสนับสนุน TPU ผ่านโครงการ <a href="https://sites.research.google/trc/about/">TPU Research Cloud</a> ของ Google และเราได้ใช้เครติดฟรีของ Google Cloud สำหรับการทำ pretrained model  ทำให้เราไม่เสียค่าใช้จ่ายใด ๆ ในการเทรนโมเดลเลย</p>

<p>เราได้ทำการเทรนโมเดลทั้งขนาด 1B กับ 3B บนชุดข้อมูลเดียวกัน โดยใช้สถาปัตยกรรม Llama 2 จำนวนแค่ 1 Epoch เพื่อไม่ให้ repeat</p>

<p>สำหรับ pipeline ในการทำ pretrained model สามารถดูได้ที่ <a href="https://github.com/wannaphong/EasyLM/tree/KhanomTanLLM-pretraining">https://github.com/wannaphong/EasyLM/tree/KhanomTanLLM-pretraining</a></p>

<p>Pretrained Models:</p>
<ul>
  <li>1B: <a href="https://huggingface.co/pythainlp/KhanomTanLLM-1B">https://huggingface.co/pythainlp/KhanomTanLLM-1B</a></li>
  <li>3B: <a href="https://huggingface.co/pythainlp/KhanomTanLLM-3B">https://huggingface.co/pythainlp/KhanomTanLLM-3B</a></li>
</ul>

<h2 id="model">Model</h2>

<p>หลังจากที่เราได้โมเดลจาก pretraining แล้ว เราได้นำไปทำ SFT โดยมีโมเดลกับชุดข้อมูลดังนี้</p>

<p>Instruct Models:</p>
<ul>
  <li>Instruct dataset: <a href="https://huggingface.co/datasets/wannaphong/KhanomTanLLM-Instruct-dataset">wannaphong/KhanomTanLLM-Instruct-dataset</a></li>
  <li>SFT Script: <a href="https://github.com/PyThaiNLP/KhanomTanLLM/tree/main/finetuning">https://github.com/PyThaiNLP/KhanomTanLLM/tree/main/finetuning</a></li>
  <li>1B: <a href="https://huggingface.co/pythainlp/KhanomTanLLM-1B-Instruct">https://huggingface.co/pythainlp/KhanomTanLLM-1B-Instruct</a></li>
  <li>3B: <a href="https://huggingface.co/pythainlp/KhanomTanLLM-3B-Instruct/">https://huggingface.co/pythainlp/KhanomTanLLM-3B-Instruct/</a></li>
</ul>

<h2 id="acknowledgements">Acknowledgements</h2>

<p>Research supported with Cloud TPUs from Google’s <a href="https://sites.research.google/trc/about/">TPU Research Cloud</a> (TRC). We use TPU4-64 for training model.</p>

<p>Thank you <a href="https://sites.research.google/trc/about/">TPU Research Cloud</a> and <a href="https://github.com/young-geng/EasyLM">EasyLM project</a>! We use EasyLM for pretraining model.</p>

<h2 id="บทส่งท้าย">บทส่งท้าย</h2>

<p>หากคุณนำโมเดลไป eval จะพบว่าโมเดลมีประสิทธิภาพค่อนข้างต่ำในหลายชุดทดสอบ เพราะด้วยขนาดโมเดลที่มีแค่ 1B กับ 3B และเราไม่มีทรัพยากรมากเพียงพอที่จะนำชุดข้อมูลขนาดใหญ่จากภาษาอังกฤษมาเทรนร่วมด้วย เช่น <a href="https://huggingface.co/datasets/HuggingFaceFW/fineweb">FineWeb</a>, <a href="allenai/dolma">Dolma</a>, <a href="EleutherAI/the_pile_deduplicated">The Pile</a> เป็นต้น เราได้เทรน LLM ตัวนี้ด้วยชุดข้อมูลข้อความเพียง 53B tokens หากได้รับการเทรนขนาด &gt;1T tokens น่าจะมีประสิทธิภาพมากยิ่งขึ้น นอกจากนี้ชุดข้อมูลภาษาไทยยังมีขนาดเล็กเกินไปสำหรับการเทรน LLM ให้มีประสิทธิภาพดีที่สุด (12B) ทางแก้ที่ดีที่สุด คือ การปล่อยชุดข้อมูลออกสู่สาธารณะให้มากยิ่งขึ้น, ขอความร่วมมือชุนชนในไทยในการสนับสนุนชุดข้อมูลเปิด และแนวทางการสังเคราะห์ชุดข้อมูลอาจเป็นหนึ่งในแนวทางแก้ไขปัญหาได้</p>

<p>สุดท้ายนี้ เราหวังว่า ชุดข้อมูล pretrained, pipeline, และโมเดลที่เราปล่อยออกสู่สาธารณะจะเป็นประโยชน์ต่อผู้ที่สนใจทำ pretrained Thai LLM และช่วยส่งเสริมวงการ Open Source AI ในประเทศไทยมากยิ่งขึ้น</p>

<p>เขียนโดย วรรณพงษ์ ภัททิยไพบูลย์</p>]]></content><author><name></name></author><category term="news" /><summary type="html"><![CDATA[Image gen from FLUX.1 [dev]]]></summary></entry><entry><title type="html">PyThaiNLP 5.0 Released!</title><link href="http://pythainlp.github.io/2024-02-10-pythainlp-5-0-0/" rel="alternate" type="text/html" title="PyThaiNLP 5.0 Released!" /><published>2024-02-10T00:00:00+00:00</published><updated>2024-02-10T00:00:00+00:00</updated><id>http://pythainlp.github.io/pythainlp-5-0-0</id><content type="html" xml:base="http://pythainlp.github.io/2024-02-10-pythainlp-5-0-0/"><![CDATA[<p>We are excited to announce the latest release of PyThaiNLP - version 5.0! PyThaiNLP is a Python library for Thai natural language processing (NLP). We are welcome to release PyThaiNLP 5.0!
With PyThaiNLP 5.0, you can expect improved performance and accuracy for NLP tasks in Thai. We have also added new functions to make your NLP tasks even easier and more efficient.</p>

<ul>
  <li>Documentation: <a href="https://pythainlp.github.io/docs/5.0">https://pythainlp.github.io/docs/5.0</a></li>
  <li>Report bug: <a href="https://github.com/PyThaiNLP/pythainlp/issues">https://github.com/PyThaiNLP/pythainlp/issues</a></li>
</ul>

<p>See more: <a href="https://github.com/PyThaiNLP/pythainlp/releases/tag/v5.0.0">https://github.com/PyThaiNLP/pythainlp/releases/tag/v5.0.0</a></p>

<p>We build Thai NLP.
#PyThaiNLP #ThaiNLP</p>]]></content><author><name></name></author><category term="news" /><summary type="html"><![CDATA[We are excited to announce the latest release of PyThaiNLP - version 5.0! PyThaiNLP is a Python library for Thai natural language processing (NLP). We are welcome to release PyThaiNLP 5.0! With PyThaiNLP 5.0, you can expect improved performance and accuracy for NLP tasks in Thai. We have also added new functions to make your NLP tasks even easier and more efficient.]]></summary></entry><entry><title type="html">PyThaiNLP Joined NLP-0SS at EMNLP 2023!</title><link href="http://pythainlp.github.io/2023-12-08-pythainlp-emnlp2023/" rel="alternate" type="text/html" title="PyThaiNLP Joined NLP-0SS at EMNLP 2023!" /><published>2023-12-08T00:00:00+00:00</published><updated>2023-12-08T00:00:00+00:00</updated><id>http://pythainlp.github.io/pythainlp-emnlp2023</id><content type="html" xml:base="http://pythainlp.github.io/2023-12-08-pythainlp-emnlp2023/"><![CDATA[<p>PyThaiNLP was present at 3rd Workshop for Natural Language Processing Open Source Software (NLP-OSS) 6 Dec 2023 @ EMNLP 2023 in Singapore by Peerat Limkonchotiwat.</p>

<p>You can read our paper at <a href="https://aclanthology.org/2023.nlposs-1.4/">PyThaiNLP: Thai Natural Language Processing in Python</a>.</p>

<p>Poster: <a href="https://github.com/nlposs/NLP-OSS/blob/master/nlposs-2023/08-PyThaiNLP-Poster.pdf">https://github.com/nlposs/NLP-OSS/blob/master/nlposs-2023/08-PyThaiNLP-Poster.pdf</a></p>

<p>Slide: <a href="https://github.com/nlposs/NLP-OSS/blob/master/nlposs-2023/08-PyThaiNLP-Slide.pdf">https://github.com/nlposs/NLP-OSS/blob/master/nlposs-2023/08-PyThaiNLP-Slide.pdf</a></p>]]></content><author><name></name></author><category term="news" /><summary type="html"><![CDATA[PyThaiNLP was present at 3rd Workshop for Natural Language Processing Open Source Software (NLP-OSS) 6 Dec 2023 @ EMNLP 2023 in Singapore by Peerat Limkonchotiwat.]]></summary></entry><entry><title type="html">PyThaiNLP Joined Hacktoberfest 2023!</title><link href="http://pythainlp.github.io/2023-09-23-pythainlp-hacktoberfest2023/" rel="alternate" type="text/html" title="PyThaiNLP Joined Hacktoberfest 2023!" /><published>2023-09-23T00:00:00+00:00</published><updated>2023-09-23T00:00:00+00:00</updated><id>http://pythainlp.github.io/pythainlp-hacktoberfest2023</id><content type="html" xml:base="http://pythainlp.github.io/2023-09-23-pythainlp-hacktoberfest2023/"><![CDATA[<p>PyThaiNLP Joined Hacktoberfest 2023!
You can contributing to PyThaiNLP and get free gift from Hacktoberfest 2023.
Just coding and pull request!</p>

<p>Contributing to PyThaiNLP: <a href="https://github.com/PyThaiNLP/pythainlp/blob/dev/CONTRIBUTING.md">https://github.com/PyThaiNLP/pythainlp/blob/dev/CONTRIBUTING.md</a>
GitHub: <a href="https://github.com/PyThaiNLP/pythainlp">https://github.com/PyThaiNLP/pythainlp</a>
Hacktoberfest: <a href="https://hacktoberfest.com">https://hacktoberfest.com</a></p>

<p>#Hacktoberfest2023 #Hacktoberfest #PyThaiNLP #ThaiNLP</p>]]></content><author><name></name></author><category term="news" /><summary type="html"><![CDATA[PyThaiNLP Joined Hacktoberfest 2023! You can contributing to PyThaiNLP and get free gift from Hacktoberfest 2023. Just coding and pull request!]]></summary></entry><entry><title type="html">Han-solo - Thai syllable segmenter Released!</title><link href="http://pythainlp.github.io/2023-07-30-han-solo/" rel="alternate" type="text/html" title="Han-solo - Thai syllable segmenter Released!" /><published>2023-07-30T00:00:00+00:00</published><updated>2023-07-30T00:00:00+00:00</updated><id>http://pythainlp.github.io/han-solo</id><content type="html" xml:base="http://pythainlp.github.io/2023-07-30-han-solo/"><![CDATA[<p>🪿 Han-solo: Thai syllable segmenter</p>

<p>This work wants to create a Thai syllable segmenter that can work in the Thai social media domain.
It use data from <a href="https://doi.org/10.5281/zenodo.3457447">Wisesight Sentiment Corpus</a>.</p>

<p>This work uses 2 datasets:</p>

<ol>
  <li>Nutcha Dataset (Thai news domain). See more data_nutcha/</li>
  <li>Han-solo: Thai syllable segmenter dataset (Thai social media domain). See more <a href="https://zenodo.org/record/8196608">Han-solo: Thai syllable segmenter</a></li>
</ol>

<p>We train the model by CRF model that uses the same feature from <a href="https://github.com/ponrawee/ssg">ssg</a>.</p>

<p>This project is developed by 🪿 Wannaphong Phatthiyaphaibun.</p>

<p>GitHub: <a href="https://github.com/PyThaiNLP/Han-solo">PyThaiNLP/Han-solo</a></p>]]></content><author><name></name></author><category term="news" /><summary type="html"><![CDATA[🪿 Han-solo: Thai syllable segmenter]]></summary></entry><entry><title type="html">Han-Coref Thai Coreference resolution by PyThaiNLP Released!</title><link href="http://pythainlp.github.io/2023-05-24-han/" rel="alternate" type="text/html" title="Han-Coref Thai Coreference resolution by PyThaiNLP Released!" /><published>2023-05-24T00:00:00+00:00</published><updated>2023-05-24T00:00:00+00:00</updated><id>http://pythainlp.github.io/han</id><content type="html" xml:base="http://pythainlp.github.io/2023-05-24-han/"><![CDATA[<p>Han-Coref: Thai Coreference resolution by PyThaiNLP</p>

<p>This project want to create Thai Coreference resolution system.</p>

<p>This project is developed by 🪿 Wannaphong Phatthiyaphaibun.</p>

<p>GitHub: <a href="https://github.com/PyThaiNLP/han-coref">PyThaiNLP/han-coref</a></p>]]></content><author><name></name></author><category term="news" /><summary type="html"><![CDATA[Han-Coref: Thai Coreference resolution by PyThaiNLP]]></summary></entry></feed>