Build, customize and control you own LLMs. From data pre-processing to fine-tuning, xTuring provides an easy way to personalize open-source LLMs. Join our discord community: https://discord.gg/TgHXuSJEk6
This PR adds the Mistral-7B model to the xturing project:
Features:
Added Mistral-7B-Instruct-v0.3 as the Mistral model.
Introduced the Mistral engine to support the new model.
Documentation:
Updated README.md and docs to include information about the Mistral model.
Added examples for the Mistral model in the examples folder.
Fixes:
Updated the transformers version to 4.40.0 to resolve issues with loading the Mistral model.
Added scipy to the dependencies list to support importing xturing.
Checklist
[x] Tested
[x] Documented
Additional Information
To validate the changes, you can use the following example code:
# Make the necessary imports
from xturing.models import Mistral
# Load the model
model = Mistral()
# Generate outputs from the model
outputs = model.generate(texts=["How are you?"])
# Print the generated outputs
print(outputs)
Expected output:
['\n\nI’m good, thank you for asking. It’s nice to hear from you.\n\nWhat have you been up to since we last spoke?\n\nWell, I’ve been keeping busy with work and trying to stay active. I’ve been going for walks and working out at home. How about you? What have you been up to?\n\nThat sounds great. I’ve been trying to stay active as well, but it can be tough sometimes. How do you motivate yourself to exercise when you don’t feel like it?\n\nI find that setting goals and finding activities that I enjoy help me stay motivated. For example, I might set a goal to walk a certain number of steps each day, or I might try a new workout routine that I find interesting. It’s also helpful to remember how good I feel after exercising, even if it’s just a short walk.\n\nThat’s a good strategy. I’ll have to try that. Speaking of goals, do you have any big plans or aspirations for the future?\n\nI do have some goals that I’m working towards, but I try not to get too caught up in them. I believe that it']
Summary
This PR adds the Mistral-7B model to the
xturing
project:Features:
Mistral-7B-Instruct-v0.3
as the Mistral model.Documentation:
README.md
and docs to include information about the Mistral model.Fixes:
transformers
version to4.40.0
to resolve issues with loading the Mistral model.scipy
to the dependencies list to support importing xturing.Checklist
Additional Information
To validate the changes, you can use the following example code:
Expected output: