Files
Table with columns: File, Format, Size, Use| File | Format | Size | Use |
|---|
model.safetensors + config.json + tokenizer.json | Transformers (Llama), bf16 | 1.04 GB | Python / transformers |
Alfa-1-0.5B-F16.gguf | GGUF F16 | 1.04 GB | llama.cpp, highest fidelity |
Alfa-1-0.5B-Q8_0.gguf | GGUF Q8_0 | 554 MB | llama.cpp, recommended |
Alfa-1-0.5B-Q4_K_M.gguf | GGUF Q4_K_M | 329 MB | llama.cpp on small devices (Raspberry Pi) |
Usage
llama.cpp
llama-cli -hf alvar-legaz/Alfa-1-0.5B:Q8_0 -p "La capital de España es" -n 64 -no-cnv
Transformers
from transformers import AutoModelForCausalLM, AutoTokenizertok = AutoTokenizer.from_pretrained("alvar-legaz/Alfa-1-0.5B")model = AutoModelForCausalLM.from_pretrained("alvar-legaz/Alfa-1-0.5B")ids = tok("La capital de España es", return_tensors="pt")print(tok.decode(model.generate(**ids, max_new_tokens=40)[0]))
Documents were separated with <|endofstory|>, which is the end-of-sequence (EOS) token of this base model.
Architecture
Llama-style decoder: 18 layers, hidden size 1536, 24 attention heads with 6 KV heads (GQA), SwiGLU FFN of 4096, RoPE (θ = 10,000), 8192-token context, tied embeddings, custom 48,000-token BPE tokenizer.
Table with columns: Hyperparameter, Value| Hyperparameter | Value |
|---|
| Total parameters | 519.7M |
| Embedding dimension | 1536 |
| Layers | 18 |
| Attention heads (Q) | 24 |
| KV heads (GQA) | 6 |
| FFN hidden size (SwiGLU) | 4096 |
| Vocabulary | 48,000 (custom BPE) |
| Final context length (block size) | 8192 |
| RoPE base frequency (θ) | 10,000 |
| RMSNorm epsilon | 1×10⁻⁵ |
| Weight tying | Yes |
Training
- 80B tokens: 65B in the stable phase of a WSD schedule and 15B of annealing with 1-√ decay down to LR 1e-6.
- Corpus mostly in Spanish and English: filtered web, Wikipedia, academic and technical text, mathematics and code.
- Final validation loss: 1.1322.
Block size progression and training throughput on an RTX 5090:
Table with columns: Training stage, Block, Tokens/block, Throughput (tokens/s)| Training stage | Block | Tokens/block | Throughput (tokens/s) |
|---|
| Start to 40% | 1K | 1024 | 40,000 |
| 40% to 60% | 2K | 2048 | 38,000 |
| 60% to start of annealing | 4K | 4096 | 34,000 |
| Annealing phase | 8K | 8192 | 29,000 |
Results
Training budget compared with reference models of similar size (parameters and pretraining tokens):
Table with columns: Model, Parameters, Training tokens, × vs. Alfa 1| Model | Parameters | Training tokens | × vs. Alfa 1 |
|---|
| Alfa 1 (0.5B) | 520M | 80B | 1× |
| Pythia-410m | 410M | 300B | 3.8× |
| Qwen1.5-0.5B | 500M | 3T | 37× |
| SmolLM2-360M | 360M | 4T | 50× |
| Salamandra-2B | 2B | 12.875T | 161× |
| Qwen2.5-0.5B | 500M | 18T | 225× |
| Qwen3-0.6B | 600M | 36T | 450× |
Results of Alfa 1 and the reference models. BCC-ES: our own Spanish benchmark of knowledge (chance 25%) and skills (chance 50%).
Table with columns: Model, MMLU, GSM8K, HumanEval, HellaSwag, BCC-ES knowl., BCC-ES skills| Model | MMLU | GSM8K | HumanEval | HellaSwag | BCC-ES knowl. | BCC-ES skills |
|---|
| Alfa 1 | 30.9% | 5.4% | 5.5% | 34.0% | 48% | 66% |
| Qwen1.5-0.5B | 31.4% | 17.9% | 12.2% | 48.0% | 42% | 65% |
| Qwen2.5-0.5B | 35.3% | 36.3% | 28.7% | 49.5% | 48% | 69% |
| Qwen3-0.6B | 35.2% | 39.1% | 20.7% | 46.5% | 50% | 69% |
| Pythia-410m | 29.5% | 1.9% | 1.2% | 39.5% | 35% | 58% |
| SmolLM2-360M | 36.9% | 5.0% | 0.0% | 53.5% | 38% | 59% |
| Salamandra-2B | 36.7% | 3.6% | 1.8% | 60.0% | 65% | 70% |
LLM-judge score (1–10, mean over 30 Spanish continuations, 30 English and 15 Python code, with sampling). Best in each column in bold.
Table with columns: Model, Spanish, English, Code (Python)| Model | Spanish | English | Code (Python) |
|---|
| Alfa 1 | 6 | 6 | 3 |
| Qwen1.5-0.5B | 3 | 6 | 4 |
| Qwen2.5-0.5B | 5 | 6 | 7 |
| Qwen3-0.6B | 3 | 4 | 7 |
| Pythia-410m | 4 | 7 | 2 |
| SmolLM2-360M | 2 | 7 | 5 |
| Salamandra-2B | 7 | 7 | 2 |
Details in the technical report Alfa1-0.5B: preentrenamiento eficiente de un modelo pequeño bilingüe español/inglés (in Spanish).
Limitations
This is a small model. It readily makes things up, its factual knowledge is limited, and it is not aligned: it may generate incorrect or inappropriate content. It must not be used for consequential decisions without human oversight.
Credits
Developed by Minaya Research.
Resumen en castellano
Alfa 1 es un modelo de lenguaje pequeño (~520 M parámetros), bilingüe español/inglés, preentrenado desde cero por Minaya Research con 80 000 millones de tokens. Este repositorio contiene el modelo base: completa texto, pero no está ajustado para conversar; para chat y modo agente usa Alfa-1-0.5B-Instruct.
- Ficheros: pesos para transformers y GGUF en F16, Q8_0 (recomendado) y Q4_K_M (Raspberry Pi). Los ejemplos de uso de arriba valen tal cual.
- Resultados: con entre 3,8 y 450 veces menos tokens de entrenamiento que los modelos de referencia, iguala a Qwen2.5-0.5B en conocimiento en español (BCC-ES, 48 %) y obtiene la mejor nota del juez en español entre los modelos de su tamaño.
- Limitaciones: inventa datos con facilidad y no está alineado; no debe usarse para decisiones con consecuencias sin supervisión humana.
Más detalles en el informe técnico Alfa1-0.5B: preentrenamiento eficiente de un modelo pequeño bilingüe español/inglés.