Skip to content

Commit fb19b76

Browse files
committed
Fix message input format for instruct model
1 parent cf68497 commit fb19b76

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

triton/apps/llms.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,14 @@ The ``your_script.py`` Python script uses a HuggingFace model ``mistralai/Mistra
7676
)
7777
7878
# Prepare prompts
79-
prompts = ["Continue the following sequence: 1, 2, 3, 5, 8", "What is the meaning of life?"]
79+
messages = [
80+
{"role": "user", "content": "Continue the following sequence: 1, 2, 3, 5, 8"},
81+
{"role": "user", "content": "What is the meaning of life?"}
82+
]
8083
8184
# Generate and print responses
82-
responses = pipe(prompts)
83-
print(responses)
85+
responses = pipe(messages)
86+
print(messages)
8487
8588
You can look at the `model card <https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1>`__ for more information about the model.
8689

0 commit comments

Comments
 (0)