Skip to content

Commit

Permalink
Merge pull request #1 from drniwech/chapter7
Browse files Browse the repository at this point in the history
Issue#huggingface#64: Thai Translation of Chapter7.
  • Loading branch information
drniwech authored Jul 7, 2024
2 parents 3f2ad53 + 8da6a99 commit 67660cd
Show file tree
Hide file tree
Showing 10 changed files with 6,628 additions and 1 deletion.
24 changes: 23 additions & 1 deletion chapters/th/_toctree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,26 @@
title: เรียนจบเรื่อง tokenizer แล้ว!
- local: chapter6/10
title: คำถามท้ายบท
quiz: 6
quiz: 6

- title: 7. หน้าที่หลักของ NLP
sections:
- local: chapter7/1
title: บทนำ
- local: chapter7/2
title: การจำแนกประเภทคำ (Token classification)
- local: chapter7/3
title: การปรับแต่งโมเดลภาษา (Fine-tuning a masked language model)
- local: chapter7/4
title: การแปลความหมาย
- local: chapter7/5
title: การสรุปความหมาย (Summarization)
- local: chapter7/6
title: การเทร็นภาษาเชิงสาเหตุตั้งแต่เริ่มต้น (Training a causal language model from scratch)
- local: chapter7/7
title: การตอบคำถาม (Question answering)
- local: chapter7/8
title: การเชี่ยวชาญใน NLP
- local: chapter7/9
title: คำถามท้ายบท
quiz: 7
38 changes: 38 additions & 0 deletions chapters/th/chapter7/1.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<FrameworkSwitchCourse {fw} />

# บทนำ[[บทนำ]]

<CourseFloatingBanner
chapter={7}
classNames="absolute z-10 right-0 top-0"
/>

ใน [บทที่ 3](/course/th/chapter3), คุณได้เห็นวิธีการปรับแต่งโมเดลสำหรับการจัดหมวดหมู่ข้อความแล้ว ในบทนี้ เราจะพูดถึงหน้าที่ NLP โดยทั่วไป ดังนี้:

- การจำแนกประเภทคำ (Token classification)
- การปรับแต่งโมเดลภาษา (Masked language modeling) เช่น BERT
- การสรุปความหมาย (Summarization)
- การแปลความหมาย (Translation)
- โมเดลภาษาเชิงสาเหตุ (Causal language modeling pretraining) เช่น GPT-2
- การตอบคำถาม (Question answering)

{#if fw === 'pt'}

ในการดำเนินการนี้ คุณจะต้องใช้ประโยชน์จากทุกสิ่งที่คุณได้เรียนรู้เกี่ยวกับ `Trainer` API และ 🤗 Accelerate ไลบรารี่ใน [บทที่ 3](/course/th/chapter3) ไลบรารี 🤗 ชุดข้อมูลใน [บทที่ 5](/course/th/chapter5 ) และไลบรารี 🤗 Tokenizers ใน [บทที่ 6](/course/th/chapter6) นอกจากนี้เรายังจะอัปโหลดผลลัพธ์ของเราไปยัง Model Hub เช่นเดียวกับที่เราทำใน [บทที่ 4](/course/th/chapter4) ดังนั้นนี่คือบทที่ทุกอย่างมารวมกันจริงๆ!

แต่ละส่วนสามารถอ่านแยกกันได้ และจะแสดงวิธีฝึกโมเดลด้วย `Trainer` API หรือด้วยลูปการฝึกของคุณเอง โดยใช้ 🤗 Accelerate คุณสามารถข้ามส่วนใดส่วนหนึ่งและมุ่งความสนใจไปที่ส่วนที่คุณสนใจมากที่สุดได้เลย: `Trainer` API นั้นยอดเยี่ยมสำหรับการปรับแต่ง (fine-tuning) หรือฝึกฝน (training) โมเดลของคุณโดยไม่ต้องกังวลกับสิ่งที่เกิดขึ้นเบื้องหลัง ในขณะที่ลูปการฝึกฝนด้วย `Accelerate` จะช่วยให้คุณปรับแต่งส่วนใด ๆ ที่คุณต้องการได้ง่ายขึ้น

{:else}

ในการดำเนินการนี้ คุณจะต้องใช้ประโยชน์จากทุกสิ่งที่คุณได้เรียนรู้เกี่ยวกับโมเดลการฝึกอบรมด้วย Keras API ใน [บทที่ 3](/course/th/chapter3) ไลบรารี 🤗 ชุดข้อมูลใน [บทที่ 5](/course/th/chapter5) และ 🤗 ไลบรารี Tokenizers ใน [บทที่ 6](/course/th/chapter6) นอกจากนี้เรายังจะอัปโหลดผลลัพธ์ของเราไปยัง Model Hub เช่นเดียวกับที่เราทำใน [บทที่ 4](/course/th/chapter4) ดังนั้นนี่คือบทที่ทุกอย่างมารวมกันจริงๆ!

แต่ละส่วนสามารถอ่านได้อย่างอิสระ

{/if}


<Tip>

หากคุณอ่านส่วนต่างๆ ตามลำดับ คุณจะสังเกตเห็นว่ามีโค้ดและข้อความค่อนข้างเหมือนกัน การทำซ้ำนี้ มีเจตนาเพื่อให้คุณสามารถเข้าไปทำงานใดๆ ที่คุณสนใจ (หรือกลับมาใหม่ทีหลัง) และค้นหาตัวอย่างการทำงานที่สมบูรณ์ได้

</Tip>
Loading

0 comments on commit 67660cd

Please sign in to comment.