Update README.md
Browse files
README.md
CHANGED
|
@@ -5,17 +5,54 @@ tags:
|
|
| 5 |
- transformers
|
| 6 |
- unsloth
|
| 7 |
- llama
|
|
|
|
| 8 |
license: apache-2.0
|
| 9 |
language:
|
| 10 |
- en
|
| 11 |
---
|
| 12 |
|
| 13 |
-
# Uploaded
|
| 14 |
|
| 15 |
-
- **Developed by:** matteoangeloni
|
| 16 |
-
- **License:** apache-2.0
|
| 17 |
-
- **
|
|
|
|
| 18 |
|
| 19 |
-
This
|
|
|
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
- transformers
|
| 6 |
- unsloth
|
| 7 |
- llama
|
| 8 |
+
- education
|
| 9 |
license: apache-2.0
|
| 10 |
language:
|
| 11 |
- en
|
| 12 |
---
|
| 13 |
|
| 14 |
+
# 🦙 Uploaded Finetuned Model – Llama 3.1 (8B) by Matteo Angeloni
|
| 15 |
|
| 16 |
+
- **Developed by:** [matteoangeloni](https://huggingface.co/matteoangeloni)
|
| 17 |
+
- **License:** apache-2.0
|
| 18 |
+
- **Base model:** [unsloth/meta-llama-3.1-8b-unsloth-bnb-4bit](https://huggingface.co/unsloth/meta-llama-3.1-8b-unsloth-bnb-4bit)
|
| 19 |
+
- **Libraries used:** [Unsloth](https://github.com/unslothai/unsloth), Hugging Face TRL
|
| 20 |
|
| 21 |
+
This model is my **first finetuned Llama model**, built for **educational and legal-domain text generation**.
|
| 22 |
+
Training was accelerated with **Unsloth** (2x faster fine-tuning) and integrated with Hugging Face tools.
|
| 23 |
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
## 📚 Training Data
|
| 27 |
+
|
| 28 |
+
The model was trained on:
|
| 29 |
+
|
| 30 |
+
- **Dataset:** [louisbrulenaudet/code-education](https://huggingface.co/datasets/louisbrulenaudet/code-education)
|
| 31 |
+
→ educational dataset for code-related instructions.
|
| 32 |
+
|
| 33 |
+
---
|
| 34 |
+
|
| 35 |
+
## 🎯 Intended Use
|
| 36 |
+
|
| 37 |
+
- Experimentation with **educational text generation**
|
| 38 |
+
- Testing **instruction-following capabilities** in code/education-related contexts
|
| 39 |
+
- Benchmarking performance of Unsloth-accelerated LLaMA models
|
| 40 |
+
|
| 41 |
+
⚠️ **Not suitable for production**. This is an **experimental finetune**.
|
| 42 |
+
|
| 43 |
+
---
|
| 44 |
+
|
| 45 |
+
## 🚀 Example Usage
|
| 46 |
+
|
| 47 |
+
```python
|
| 48 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 49 |
+
|
| 50 |
+
model_name = "matteoangeloni/llama3-8b-edu"
|
| 51 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 52 |
+
model = AutoModelForCausalLM.from_pretrained(model_name)
|
| 53 |
+
|
| 54 |
+
prompt = "Summarize the main points of the Italian privacy law."
|
| 55 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
| 56 |
+
outputs = model.generate(**inputs, max_new_tokens=200)
|
| 57 |
+
|
| 58 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|