Inconsistency in Output Format of `get_prompt` Function in Llama-2
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.5k
- Forks
- 4.8k
- PR merge metrics
- No merged PRs in 30d
Description
In my experience with the `get_prompt` function in the llama-2 conversation format, I've noticed a discrepancy in the output format. The expected format is `[INST] <>\n{your_system_message}\n<>\n\n{user_message_1} [/INST] {model_reply_1}`.
However, what the function actually returns is `[INST] <>\n{your_system_message}\n<>\n\n{user_message_1} [/INST] {model_reply_1}`.
This additional `` at the end diverges from the standard llama-2 format.
Reference:
https://github.com/lm-sys/FastChat/blob/5f46ff4b0c0e9b5f4d3378a7a19bf3974a19763b/fastchat/conversation.py#L130-L145
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open fastchat/conversation.py and inspect the get_prompt implementation around the referenced lines 130-145. Compare its Llama-2 output with the standard format in the issue, then verify that the returned prompt no longer contains the extra token at the end.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100