部署在 Vertex AI 上的 Llama 3 生成完成而不是完成提示

问题描述 投票:0回答:1

我已经从 Vertex AI 的 Model Garden 部署了 Llama 3 70b 聊天。

在提出提示时,模型似乎是在尝试完成提示,而不是尝试回答它,例如具有以下参数的 JSON 请求:

提示:

Classify the below as fruit or vegetable:

Examples:
Apple - fruit
Spinach - vegetable

Classify these:
Brinjal
Orange
Lettuce
Corn

参数

temperature: 0
max_tokens: 1024
stop_token_ids": [128009]

回应

Prompt:
Classify the below as fruit or vegetable:

Examples:
Apple - fruit
Spinach - vegetable

Classify these:
Brinjal
Orange
Lettuce
Corn
Output:
Pineapple
Grapes<|eot_id|>

我是否缺少模型部署的一些参数以使模型按照说明响应提示?

google-cloud-platform google-cloud-vertex-ai llama
1个回答
0
投票

添加参数:stop_sequences=["<|start_header_id|>", "<|end_header_id|>", "<|eot_id|>", ”<|reserved_special_token"]

使用 llama3 提示技术以获得更好的响应https://llama.meta.com/docs/model-cards-and-prompt-formats/meta-llama-3/

© www.soinside.com 2019 - 2024. All rights reserved.