File size: 2,013 Bytes
7a360e1
a174bbb
7a360e1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9de9507
 
 
7a360e1
 
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
# Alireo-400M Model Card πŸ“š

## Model Description
Alireo-400M is a lightweight yet powerful Italian language model with 400M parameters, designed to provide efficient natural language processing capabilities while maintaining a smaller footprint compared to larger models.

## Key Features ✨
* **Architecture**: Transformer-based language model πŸ—οΈ
* **Parameters**: 400M πŸ“Š
* **Context Window**: 8K tokens πŸͺŸ
* **Training Data**: Curated Italian text corpus (books, articles, web content) πŸ“š
* **Model Size**: ~800MB πŸ’Ύ

## Performance πŸ“ˆ
Despite its compact size, Alireo-400M demonstrates impressive performance:

* **Benchmark Results**: Outperforms Qwen 0.5B across multiple benchmarks πŸ†
* **Language Understanding**: Maintains high accuracy in Italian language understanding tasks 🎯
* **Speed**: Efficient inference speed due to optimized architecture ⚑

## Limitations ⚠️
* Limited context window compared to larger models
* May struggle with highly specialized technical content
* Performance may vary on dialectal variations
* Not suitable for multilingual tasks

## Hardware Requirements πŸ’»
* **Minimum RAM**: 2GB
* **Recommended RAM**: 4GB
* **GPU**: Optional, but recommended for faster inference
* **Disk Space**: ~1GB (including model and dependencies)

## Usage Example

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

# Load model and tokenizer
model = AutoModelForCausalLM.from_pretrained("montebovi/alireo-400m")
tokenizer = AutoTokenizer.from_pretrained("montebovi/alireo-400m")

# Example text
text = "L'intelligenza artificiale sta"

# Tokenize and generate
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=50)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(result)
```

## License πŸ“œ
Apache 2.0

## Citation πŸ“„
```bibtex
@software{alireo2024,
  author = {[Michele Montebovi]},
  title = {Alireo-400M: A Lightweight Italian Language Model},
  year = {2024},
}
```