恭喜你!

使用 Llama 3

Imtihan Ahmed

Machine Learning Engineer

回顾一下

步骤 1 - 本地运行 Llama

from llama_cpp import Llama

llm = Llama(model_path = "path/to/model.gguf")
使用 Llama 3

回顾一下

步骤 2 - 调参

$$

  • temperaturetop_ktop_p 参数
使用 Llama 3

回顾一下

步骤 3 - 指定角色

message_list = [{"role": "system", "content": system_message},
               {"role": "user", "content": user_message}]
使用 Llama 3

回顾一下

步骤 4 - 引导输出

  • 精准提示
  • stop
  • 零样本/少样本提示
使用 Llama 3

回顾一下

步骤 5 - 使用 JSON 响应 $$

response_format = {"type": "json_object"}
使用 Llama 3

回顾一下

步骤 6 - 构建多轮对话

  • Conversation
  • .create_completion() 方法
使用 Llama 3

接下来做什么?

使用 Llama 3

感谢!

使用 Llama 3

Preparing Video For Download...