🚀 Llama3.1 Turkish Educational ChatBot
This project presents a fine - tuned version of the Meta LLaMA 3.1 8B large language model. It's specifically tailored to handle Turkish educational question - answer prompts. The core objective is to offer fluent, informative, and context - aware Turkish answers, which are ideal for general inquiries and learning support.
The model was fine - tuned using the LoRA technique on a small scale (1% of trainable parameters) and is available on Hugging Face:
👉 [metehanayhan/Llama3 - 1_Turkish_ChatBot](https://huggingface.co/metehanayhan/Llama3 - 1_Turkish_ChatBot)
🚀 Quick Start
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
tokenizer = AutoTokenizer.from_pretrained("metehanayhan/Llama3-1_Turkish_ChatBot")
model = AutoModelForCausalLM.from_pretrained("metehanayhan/Llama3-1_Turkish_ChatBot")
qa_pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
print(qa_pipe("İklim değişikliği neden önemlidir?", max_new_tokens=200)[0]["generated_text"])
✨ Features
- This is a fine - tuned version of Meta LLaMA 3.1 8B, specialized for Turkish educational Q&A.
- It can provide fluent, informative, and context - aware answers in Turkish.
- The model uses the LoRA technique for fine - tuning, enabling effective learning with low computational resources.
📦 Installation
The installation details are not provided in the original README. However, based on the quick - start code, you need to have adapter - transformers
installed. You can install it using pip install adapter - transformers
.
💻 Usage Examples
Basic Usage
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
tokenizer = AutoTokenizer.from_pretrained("metehanayhan/Llama3-1_Turkish_ChatBot")
model = AutoModelForCausalLM.from_pretrained("metehanayhan/Llama3-1_Turkish_ChatBot")
qa_pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
print(qa_pipe("İklim değişikliği neden önemlidir?", max_new_tokens=200)[0]["generated_text"])
Advanced Usage
There is no advanced usage example in the original README. You can potentially adjust parameters such as max_new_tokens
and other hyperparameters according to your specific needs.
📚 Documentation
Training Summary
Property |
Details |
Model Type |
Meta LLaMA 3.1 8B |
Fine - Tuning Method |
Supervised Fine - Tuning (SFT) |
LoRA Usage |
Yes (1% of model trained) |
Training Data |
Turkish question - answer pairs |
Number of Training Samples |
17,587 |
Epochs |
1 |
Total Training Steps |
2,199 |
Learning Rate |
2e - 5 |
Total Batch Size |
8 |
Training Duration (approx.) |
~3 hours |
Trainable Parameters |
83M / 8B (1.05%) |
Quantization |
4 - bit |
Data Format
The dataset consists of Turkish question - answer pairs in CSV format. Each row represents a complete educational sample.
Example:
question,answer
What can be done to prevent climate change?,
"To combat climate change, actions like reducing fossil fuel usage and transitioning to renewable energy sources are essential..."
A total of 17,587 such examples were used for fine - tuning.
Use Case
This model serves as an educational assistant in Turkish. It can answer questions related to:
- Informative, general - knowledge, or school - related topics
- Support for curious learners and students
Deployment
The model is shared on Hugging Face with 4 - bit quantization and is ready for low - resource inference. It has also been exported in GGUF format for use in compatible environments.
Additional Notes
- The training was performed using
Trainer
with standard SFT configuration.
random_state = 3407
was used to ensure reproducibility.
- Although fine - tuned on just 1% of parameters, the model responds effectively across a wide range of Turkish topics.
🔧 Technical Details
- The model is a fine - tuned version of Meta LLaMA 3.1 8B.
- The LoRA technique is used for fine - tuning, which only trains 1% of the model's parameters.
- The training data is Turkish question - answer pairs in CSV format.
- The model is quantized to 4 - bit for low - resource inference.
📄 License
The model is released under the MIT license.