เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

Saving preprocessed datasets

As part of your customer service chatbot project, you now have prepared a dataset for fine-tuning a Llama model. The next step is to save the dataset so that you can reload it later without having to repeat the preprocessing steps. This will allow your team to reuse the dataset across multiple experiments and iterations.

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Fine-Tuning with Llama 3

ดูคอร์ส

คำแนะนำการฝึกหัด

  • Save the preprocessed dataset ds to disk.
  • Load the saved dataset into a new variable ds_preprocessed.
  • Print the first element of ds_preprocessed.

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

from datasets import load_from_disk

# Save the dataset to disk
____

# Load the dataset from disk
ds_preprocessed = ____

# Print the first element of the loaded dataset
print(____)
แก้ไขและรันโค้ด