This repository contains a fine-tuned version of the Mistral language model. The fine-tuning was performed using a dataset derived from a CSV file, enabling the model to specialize in tasks related to the specific context of the dataset.
The dataset used for fine-tuning contains conversational data structured as follows:
{
"conversations": [
{ "from": "human", "value": "<input-text>" },
{ "from": "gpt", "value": "<output-text>" }
]
}
Preprocessing:
Training Configuration:
Hardware:
Frameworks:
pip install torch transformers datasets unsloth
To use the fine-tuned model, load it with the Hugging Face Transformers library:
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load model and tokenizer
model = AutoModelForCausalLM.from_pretrained("path_to_your_finetuned_model")
tokenizer = AutoTokenizer.from_pretrained("path_to_your_finetuned_model")
# Generate a response
input_text = "<your input>"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=50)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
input_text = "What is the weather like today?"
response = get_response(input_text)
print(response)
The fine-tuned model achieved:
Special thanks to the open-source AI community for providing tools like Unsloth and Hugging Face Transformers. Their contributions make fine-tuning large language models accessible to all.
Below is an example conversation showcasing the capabilities of the fine-tuned Mistral model. The model is optimized for customer service in the FMCG industry and supports use cases like recommending healthy snacks.
| Field | Value |
|---|---|
| doc_id | cs001 |
| last_update | 2024-12-06 |
| use_case | customer service |
| topic | FMCG |
| stage | awareness |
| input | Halo, aku cari camilan sehat nih. |
| language | bahasa |
| intent | menyapa dan memulai pencarian produk |
| input_emotion | penasaran |
| instruction | Sapa pelanggan dengan hangat, tawarkan beberapa rekomendasi camilan sehat, dan ajak mereka untuk memilih kategori tertentu. |
| output | Hai Kak! Aku [ai_agent_name] 😊. Lagi cari camilan sehat ya? Kita punya banyak pilihan nih, mulai dari granola bar, kacang panggang, sampai keripik sayur. Kakak lagi butuh yang praktis buat dibawa atau buat ngemil di rumah? 🛍️🍴 |
| output_tone | ramah, santai |
| metadata/product_category/0 | snacks |
| metadata/dynamic_placeholders/0 | [ai_agent_name] |
Halo, aku cari camilan sehat nih.
Hai Kak! Aku SnackBot 😊. Lagi cari camilan sehat ya? Kita punya banyak pilihan nih, mulai dari granola bar, kacang panggang, sampai keripik sayur. Kakak lagi butuh yang praktis buat dibawa atau buat ngemil di rumah? 🛍️🍴
This demonstrates the model's ability to:
[ai_agent_name] with a suitable agent name, e.g., SnackBot.For more usage examples, refer to the instructions in the dataset or try interacting with the model directly!
This project is licensed under the MIT License.
Feel free to raise any issues or contribute improvements to this repository!
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.
有文件?提交种子。
发布种子