friday-generation-pretrained
a compact Italian language model in ONNX
2 min read
friday-generation-pretrained is a compact language model (109.5 million parameters) featuring a decoder-only architecture (GPT-2 style), trained from scratch exclusively on Italian using a 1.42 billion token corpus. Distributed in ONNX format and shipped with a built-in SentencePiece tokenizer (subword text tokenization method), it runs without PyTorch via the onnxruntime library. It is built as a base model for further fine-tuning on simple tasks like text generation, summarization, or paraphrasing. The model suits developers who need a lightweight local language model for Italian on low-end hardware or in non-standard execution environments.
Key features
- ONNX format: A single file contains the weights, computation graph, and built-in tokenizer.
- Pure Italian: Trained on 1.42B tokens (FineWeb2, Wikipedia, news, and EUR-Lex documents).
- Lightweight: Available in fp32 (422 MB) and quantized int8 (130 MB) versions for fast CPU performance.
- Task prefixes: Supports special prefixes like
[continua]for text continuation or[articolo]for writing articles in various styles.
What you can do
- Text continuation: Use the model with the
[continua]prefix to generate coherent passages of Italian text. - Article writing: Generate texts in specific styles (news, sports, interviews, recipes) using prefixes like
[articolo][ricetta]. - Third-party integration: Run the model in C#, Java, JavaScript, or on mobile devices using onnxruntime after extracting the tokenizer.
- Fine-tuning: Use the checkpoint as a foundation for fine-tuning on specific Italian text processing tasks.
Example
import sys; sys.path.insert(0, "friday-gen")
import run_onnx
m = run_onnx.load("friday-gen/friday-generation-pretrained.int8.onnx")
print(run_onnx.generate(m, "[continua] Il Po è il fiume più lungo d'Italia.", max_new_tokens=80, temperature=0.8, top_k=50))Read more
DetailsMetrics: Best validation loss of 3.033 at iteration 21,000.
Hardware: The int8 version requires minimal memory and delivers about 150 tokens per second on a CPU.
Limitations: The model is small (110M), so it can hallucinate facts and repeat itself on long texts.
License: CC BY-NC 4.0 (non-commercial use only).
Architecture: 12 layers, 12 attention heads, hidden size of 768, context up to 1024 tokens.










Comments