Downloads · 30 days
85
8% of all-time downloads
ngxson/Vistral-7B-ChatML
Vistral-7B-ChatML is a text generation model from ngxson. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
This model is finetuned from Viet-Mistral/Vistral-7B-Chat. The dataset is taken from bkai-foundation-models/vi-self-chat-sharegpt-format
Downloads · 30 days
85
8% of all-time downloads
All-time downloads
1.1K
Public
Parameters
7.3B
19.8 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors15.3 GB · 77%
From the Hugging Face model README
This model is finetuned from Viet-Mistral/Vistral-7B-Chat. The dataset is taken from bkai-foundation-models/vi-self-chat-sharegpt-format
This is a low rank finetune to add support for chatml template. While the template does not affect model performance, it would be nice to support chatml since most of models based on Mistral already using it.
The format looks like this:
<|im_start|>system
Provide some context and/or instructions to the model.
<|im_end|>
<|im_start|>user
The user’s message goes here
<|im_end|>
<|im_start|>assistant
The recommended way is to use the GGUF vistral-7b-chatml-Q4_K_M.gguf file included in this repository. Run it via llama.cpp (remember to pass -cml argument to use chatml template)
./main -m vistral-7b-chatml-Q4_K_M.gguf -p "Bạn là một trợ lí Tiếng Việt nhiệt tình và trung thực." -cml
Additionally, you can run the python3 run.py inside this repository to try the model using transformers library. This it not the recommended way since you may need to change some params inside in order to make it work.
This is an example of a conversation using llama.cpp:
xin chào
trợ lý AI là gì? bạn giải thích được không?
ồ, cảm ơn, vậy bạn có thể làm gì?
tức là sao?
You can also look at the training code in the finetune.py file.
For tokenizer, I changed these things:
[INST] to <|im_start|>, make it become special token[/INST] to <|im_end|>, make it become special tokeneos_token to <|im_end|>chat_template to chatml, taken from this exampleAdditionally, there is a checkpoint file in my repository if you want to merge the LORA yourself.
Disclaimer: I'm not expert in machine learning, my background is from cybersecurity so the making of this model is a "hobby" to me. Training is done using a VPS on Google Cloud, I paid with my own money.
If you want to discuss, feel free to contact me at contact at ngxson dot com - ngxson.com