File size: 2,929 Bytes
de5802a
 
2006e0b
 
c393a1a
de5802a
2006e0b
 
 
 
 
 
 
2c37e8b
2006e0b
 
 
 
 
 
 
 
 
 
 
 
 
 
2978802
2006e0b
 
 
b892b1c
2006e0b
 
b892b1c
 
 
2006e0b
b892b1c
 
 
 
 
 
 
 
 
 
2006e0b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c393a1a
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
---
license: mit
language:
- it
pipeline_tag: text-generation
---
--------------------------------------------------------------------------------------------------

<body>
<span class="vertical-text" style="background-color:lightgreen;border-radius: 3px;padding: 3px;"></span>
<br>
<span class="vertical-text" style="background-color:orange;border-radius: 3px;padding: 3px;">  </span>
<br>
<span class="vertical-text" style="background-color:lightblue;border-radius: 3px;padding: 3px;">    Model: DIABLO 354M 🔥</span>
<br>
<span class="vertical-text" style="background-color:tomato;border-radius: 3px;padding: 3px;">    Lang: IT</span>
<br>
<span class="vertical-text" style="background-color:lightgrey;border-radius: 3px;padding: 3px;">  </span>
<br>
<span class="vertical-text" style="background-color:#CF9FFF;border-radius: 3px;padding: 3px;"></span>
</body>

--------------------------------------------------------------------------------------------------

<h3>Model description</h3>

This model is a <b>causal</b> language model for the <b>Italian</b> language, based on a GPT-like <b>[1]</b> architecture (more specifically, the model has been obtained by modifying Meta's XGLM architecture <b>[2]</b> and exploiting its 564M checkpoint).

The model has ~354M parameters and a vocabulary of 50.335 tokens. It is a foundation model, pre-trained for causal language modeling, so it is mainly suitable for basic natural language generation, and you will have to fine-tune it in order to use it on more specific downstream tasks.

<h3>Quick usage</h3>

In order to use the model for inference on GPU, the following pipeline is needed:

```python
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
from transformers import pipeline

tokenizer = AutoTokenizer.from_pretrained("osiria/diablo-italian-base-354m")
model = AutoModelForCausalLM.from_pretrained("osiria/diablo-italian-base-354m", torch_dtype=torch.float16)

device = torch.device("cuda")
model = model.to(device)

pipeline_nlg = pipeline("text-generation", model = model, tokenizer = tokenizer, device = 0)
pipeline_nlg("Ciao, mi chiamo Marco Rossi e")

# [{'generated_text': 'Ciao, mi chiamo Marco Rossi e sono un ragazzo di 23 anni.'}]
```


<h3>Limitations</h3>

The model might behave erratically when presented with prompts which are too far away from its pre-training and, because of the probabilistic nature of its generation, it might occasionally produce biased or offensive content with respect to gender, race, ideologies, and political or religious beliefs.
These limitations imply that the model and its outputs should be used with caution, and should not be involved in situations that require the generated text to be fair or true.

<h3>References</h3>

[1] https://arxiv.org/abs/2005.14165

[2] https://arxiv.org/abs/2112.10668

<h3>License</h3>

The model is released under <b>MIT</b> license