-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Mistral/Mixtral instruct prompt #5214
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Related to this, why isn't the start of sequence token The Mistral template doesn't use it at all. The LLama-v2 template adds it after the first instruction turn is over with |
PoetOnTheRun
pushed a commit
to PoetOnTheRun/text-generation-webui
that referenced
this pull request
Feb 22, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello.
The mistral instruct prompt is supposed to be this one
Source: https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1
The original instruct template wasn't accurate enough:
![image](https://private-user-images.githubusercontent.com/110173477/295100092-b53984d2-12a0-4490-9fb4-40a8b9442fb7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIxNjA2OTYsIm5iZiI6MTcyMjE2MDM5NiwicGF0aCI6Ii8xMTAxNzM0NzcvMjk1MTAwMDkyLWI1Mzk4NGQyLTEyYTAtNDQ5MC05ZmI0LTQwYThiOTQ0MmZiNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzI4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyOFQwOTUzMTZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05YTg0YTYzYmYzZjUxZGRjOWMyYmYxODU1ZmQ0ZTkxZGEwZjI4YWY2NDk1NjMxYTQ4NGE5NGRkYjRiNjg5MWI5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.KaLdVh9K1J6xjgHXpcheRsrizw5hwC5Jkf7KrCIyH1U)
Here's the final result with my change:
![image](https://private-user-images.githubusercontent.com/110173477/295100265-11f634d7-33c0-4832-9e56-076d8ea9d887.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIxNjA2OTYsIm5iZiI6MTcyMjE2MDM5NiwicGF0aCI6Ii8xMTAxNzM0NzcvMjk1MTAwMjY1LTExZjYzNGQ3LTMzYzAtNDgzMi05ZTU2LTA3NmQ4ZWE5ZDg4Ny5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzI4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyOFQwOTUzMTZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03NGQyYzM2MTU4YjA4OWYxZTExNTY5MWYxYTBmNTlhYTgwZDg4ZWNkY2Y0MmRkMzZmMmJjZjAyZTljMmZlNWVjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9._jc8pDC3kJX6l6IZOV4zZRXsngYXNxJZXTmdJSr7B4w)
The thing is that this modification isn't really the final version, normally there should be a pair of "INST" for every new instruction
It should look like this at the end (If I understood that correctly):
![image](https://private-user-images.githubusercontent.com/110173477/295101025-76f00df4-0a82-4869-8a8b-1cdc2f4773d7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIxNjA2OTYsIm5iZiI6MTcyMjE2MDM5NiwicGF0aCI6Ii8xMTAxNzM0NzcvMjk1MTAxMDI1LTc2ZjAwZGY0LTBhODItNDg2OS04YThiLTFjZGMyZjQ3NzNkNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzI4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyOFQwOTUzMTZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zOTY2ZDZlNDIyODgzNDkyMjRkZmVjYjFiMzIyNTFhOGE0YzNhZWVkZTk3N2Q2MTM0ODQyZGRhNDIyZWY5YmE1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.vk4Whqdu-LvtYkTveLWa5xkgHgLuu-MXjfHYZTBFd4c)
I don't know how to do that one, so if you could help me on that part it would be appreciated.