แนะนำ Large Language Models (LLMs)

Python เบื้องต้นสำหรับ LLMs

Jasmin Ludolf

Senior Data Science Content Developer, DataCamp

ความรู้เดิม

  • การใช้งาน Hugging Face Hub
  • โมเดล deep learning

การ์ตูนสมองกำลังอ่านหนังสือ

Python เบื้องต้นสำหรับ LLMs

แนะนำ LLMs

 

ไอคอนหลอดไฟและสมอง แทนความเข้าใจ

Python เบื้องต้นสำหรับ LLMs

แนะนำ LLMs

 

ภาพประกอบแล็ปท็อป แทนการใช้งาน

Python เบื้องต้นสำหรับ LLMs

ภาพนามธรรมของ large language model

Python เบื้องต้นสำหรับ LLMs

ภาพนามธรรมของ large language model พร้อมบับเบิลสรุปความ

Python เบื้องต้นสำหรับ LLMs

ภาพนามธรรมของ large language model พร้อมบับเบิลสรุปความและสร้างข้อความ

Python เบื้องต้นสำหรับ LLMs

ภาพนามธรรมของ large language model พร้อมบับเบิลสรุปความ สร้างข้อความ และแปลภาษา

Python เบื้องต้นสำหรับ LLMs

ภาพนามธรรมของ large language model พร้อมบับเบิลสรุปความ สร้างข้อความ แปลภาษา และถาม-ตอบ

โลโก้ LLM ต่าง ๆ

Python เบื้องต้นสำหรับ LLMs

LLMs

 

  • สร้างบน architecture แบบ deep learning

 

  • ส่วนใหญ่ใช้ transformers

 

  • โครงข่ายประสาทเทียม ขนาดใหญ่ที่มีพารามิเตอร์และข้อมูลข้อความจำนวนมาก

โลโก้ Hugging Face

Python เบื้องต้นสำหรับ LLMs

การใช้งานโมเดล Hugging Face

from transformers import pipeline


summarizer = pipeline(task="summarization", model="facebook/bart-large-cnn")
text = "Walking amid Gion's Machiya wooden houses is a mesmerizing experience. The beautifully preserved structures exuded an old-world charm that transports visitors back in time, making them feel like they had stepped into a living museum. The glow of lanterns lining the narrow streets add to the enchanting ambiance, making each stroll a memorable journey through Japan's rich cultural history." summary = summarizer(text, max_length=50)
  • clean_up_tokenization_spaces=True: ลบช่องว่างที่ไม่จำเป็นออก
Python เบื้องต้นสำหรับ LLMs

ผลลัพธ์จากโมเดล

print(summary)
[{'summary_text': "Gion's Machiya
  wooden houses exuded an old-world 
  charm that transports visitors back 
  in time. The glow of lanterns lining 
  the narrow streets add to the 
  enchanting ambiance, making each 
  stroll a memorable journey through 
  Japan's"}]
print(summary[0]["summary_text"])
Gion's Machiya wooden houses exuded an 
old-world charm that transports 
visitors back in time. The glow of 
lanterns lining the narrow streets add 
to the enchanting ambiance, making each 
stroll a memorable journey through 
Japan's
Python เบื้องต้นสำหรับ LLMs

ถัดไป

 

  • ต่อยอดความรู้ LLM ที่มีอยู่
  • ทำงานใหม่ที่หลากหลาย
  • เรียนรู้วิธีสร้าง LLMs
  • Fine-tune LLMs
  • ประเมินประสิทธิภาพของ LLMs

เส้นทางการเรียนรู้

Python เบื้องต้นสำหรับ LLMs

มาฝึกกันเถอะ!

Python เบื้องต้นสำหรับ LLMs

Preparing Video For Download...