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.
To use the fine-tuned model, load it with the Hugging Face Transformers library:
python
1from transformers import AutoModelForCausalLM, AutoTokenizer
23# Load model and tokenizer4model = AutoModelForCausalLM.from_pretrained("path_to_your_finetuned_model")5tokenizer = AutoTokenizer.from_pretrained("path_to_your_finetuned_model")67# Generate a response8input_text ="<your input>"9inputs = tokenizer(input_text, return_tensors="pt")10outputs = model.generate(**inputs, max_new_tokens=50)11response = tokenizer.decode(outputs[0], skip_special_tokens=True)12print(response)
Inference Example
python
1input_text ="What is the weather like today?"2response = get_response(input_text)3print(response)
Results
The fine-tuned model achieved:
Improved Response Quality: The model generates responses closely aligned with the target dataset.
Faster Convergence: Optimized for a small dataset with minimal overfitting.
Limitations
Dataset Size: The model was fine-tuned on a small dataset (141 rows), which may limit generalization to other tasks.
Domain-Specific: Performance is optimal for the domain represented by the dataset.
Acknowledgments
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.
Fine-Tuned Mistral Model
Example Chat Conversation
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.
Input Data Example
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]
Example Conversation
Human:
Halo, aku cari camilan sehat nih.
Assistant:
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:
Understand intent: Identify the user's need for healthy snacks.
Generate relevant responses: Provide a list of options in a friendly tone.
Utilize placeholders dynamically: Replace [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!