Chúc mừng!

Làm việc với Llama 3

Imtihan Ahmed

Machine Learning Engineer

Ôn lại

Bước 1 - chạy Llama cục bộ

from llama_cpp import Llama

llm = Llama(model_path = "path/to/model.gguf")
Làm việc với Llama 3

Ôn lại

Bước 2 - tinh chỉnh tham số

$$

  • Tham số temperature, top_k, top_p
Làm việc với Llama 3

Ôn lại

Bước 3 - gán vai trò

message_list = [{"role": "system", "content": system_message},
               {"role": "user", "content": user_message}]
Làm việc với Llama 3

Ôn lại

Bước 4 - dẫn hướng đầu ra

  • Prompt chính xác
  • Từ dừng stop
  • Zero-shot/Few-shot prompting
Làm việc với Llama 3

Ôn lại

Bước 5 - khám phá phản hồi JSON $$

response_format = {"type": "json_object"}
Làm việc với Llama 3

Ôn lại

Bước 6 - xây dựng hội thoại nhiều lượt

  • Lớp Conversation
  • Phương thức .create_completion()
Làm việc với Llama 3

Tiếp theo là gì?

Làm việc với Llama 3

Xin cảm ơn!

Làm việc với Llama 3

Preparing Video For Download...