File size: 2,014 Bytes
eae5795
 
 
 
 
 
 
 
 
c6d05bc
eae5795
76e490c
 
1a5b147
76e490c
 
 
 
1a5b147
76e490c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
eae5795
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
60
61
62
63
64
65
66
67
68
69
---
license: apache-2.0
language:
- it
base_model:
- PleIAs/Pleias-350m-Preview
pipeline_tag: text-generation
tags:
- poetry
library_name: transformers
---
# Dante-Zero Fine-tuned Model

This model was fine-tuned using Reinforcement Learning with Group Relative Policy Optimization (GRPO) to generate Dante-style poetry in endecasillabi (11-syllable lines).

## Model Details

- **Base Model:** PleIAs/Pleias-350m-Preview
- **Training Method:** GRPO (Group Relative Policy Optimization )
- **Training Data:** 1,000 chunks from Dante's Divine Comedy
- **Epochs:** 10
- **Trained By:** ruggsea
- **Date:** 2025-03-05

## Model Description

This model is specialized in generating Italian poetry in the style of Dante Alighieri's Divine Comedy. It has been trained to:

1. Generate proper endecasillabi (11-syllable lines)
2. Follow the structure of Dante's poetry
3. Avoid repetition
4. Create original content (not plagiarize the Divine Comedy)

## Usage

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

# Load model and tokenizer
model = AutoModelForCausalLM.from_pretrained("ruggsea/dante-zero-2025-03-05")
tokenizer = AutoTokenizer.from_pretrained("ruggsea/dante-zero-2025-03-05")

# Generate poetry
prompt = "Nel mezzo del cammin di nostra vita"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
    inputs.input_ids,
    max_new_tokens=200,
    do_sample=True,
    temperature=0.7,
    top_p=0.9,
    repetition_penalty=1.2
)
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(generated_text)
```

## Reward Functions

The model was trained using several reward functions:

1. **Endecasillabo Checker:** Rewards proper 11-syllable lines
2. **Plagiarism Checker:** Penalizes copying from the Divine Comedy
3. **Verse Structure Checker:** Encourages verse-like structure
4. **Repetition Penalty:** Discourages repetitive patterns

## License

This model is available under the same license as the base model (PleIAs/Pleias-350m-Preview).