File size: 1,828 Bytes
ad267ed
 
 
 
 
 
 
0c8613e
ad267ed
 
 
 
 
0c8613e
ad267ed
0c8613e
 
 
 
ad267ed
0c8613e
 
ad267ed
0c8613e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
base_model: unsloth/meta-llama-3.1-8b-unsloth-bnb-4bit
tags:
- text-generation-inference
- transformers
- unsloth
- llama
- education
license: apache-2.0
language:
- en
---

# ๐Ÿฆ™ Uploaded Finetuned Model โ€“ Llama 3.1 (8B) by Matteo Angeloni

- **Developed by:** [matteoangeloni](https://huggingface.co/matteoangeloni)  
- **License:** apache-2.0  
- **Base model:** [unsloth/meta-llama-3.1-8b-unsloth-bnb-4bit](https://huggingface.co/unsloth/meta-llama-3.1-8b-unsloth-bnb-4bit)  
- **Libraries used:** [Unsloth](https://github.com/unslothai/unsloth), Hugging Face TRL  

This model is my **first finetuned Llama model**, built for **educational and legal-domain text generation**.  
Training was accelerated with **Unsloth** (2x faster fine-tuning) and integrated with Hugging Face tools.

---

## ๐Ÿ“š Training Data

The model was trained on:

- **Dataset:** [louisbrulenaudet/code-education](https://huggingface.co/datasets/louisbrulenaudet/code-education)  
  โ†’ educational dataset for code-related instructions.

---

## ๐ŸŽฏ Intended Use

- Experimentation with **educational text generation**  
- Testing **instruction-following capabilities** in code/education-related contexts  
- Benchmarking performance of Unsloth-accelerated LLaMA models  

โš ๏ธ **Not suitable for production**. This is an **experimental finetune**.

---

## ๐Ÿš€ Example Usage

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "matteoangeloni/llama3-8b-edu"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)

prompt = "Summarize the main points of the Italian privacy law."
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=200)

print(tokenizer.decode(outputs[0], skip_special_tokens=True))