Stack-existence-proof model for the Sovereign AI Stack. This is a 494M-parameter Qwen2 architecture trained end-to-end with the Rust-only Sovereign AI Stack — no PyTorch, no Python training loop, no HuggingFace transformers — purely aprender + entrenar + trueno + realizar.
Intended use: stack capability proof, NOT a production code-completion model. See §88 framing below.
Model description
albor-370m-v1 is a 494M-parameter Qwen2-architecture transformer trained on a 49.6B-token Python corpus using the aprender Sovereign AI Stack. The training pipeline (aprender-train ≈ entrenar) was used end-to-end:
Best val_loss: 4.6227 @ epoch 49 (smooth monotonic descent across 50 epochs, no early-stop)
Best val_perplexity: 101.78
Inference throughput: 315.6 tok/s (epoch-020 apr bench on RTX 4090)
Trajectory (every 5 epochs)
ep 0: 7.43 (init eval)
ep 5: 5.91
ep 10: 5.54
ep 15: 5.18
ep 20: 5.02
ep 25: 4.95
ep 30: 4.83
ep 35: 4.77
ep 40: 4.71
ep 45: 4.70
ep 49: 4.62 ← BEST
The descent is smooth and monotonic — the §85 P2-E run demonstrates that the Sovereign AI Stack's training loop reaches the expected loss floor for this architecture and corpus given the compute budget. Marginal-gain decay analysis predicts ~4.4 floor at 100 epochs and ~3.5 floor at 1.2M steps (Chinchilla compute-optimal D ≈ 20·N).
§88 framing — "stack-existence-proof"
Per SPEC-SHIP-TWO-001 §88, this model is shipped as a stack capability proof, not a production code-completion model. The original AC-SHIP2-003 strict target (val_loss ≤ 2.2) requires ~213 GPU-hours (~9 days continuous) of training compute, which exceeds the project's 48-GPU-hour single-shot iteration budget. The §88 amendment introduces a compute-bounded target (val_loss ≤ 4.7) that this model satisfies.
The primary purpose this model serves is to demonstrate end-to-end stack capability:
If you need a production-quality 0.5B code-completion model, use Qwen/Qwen2.5-Coder-0.5B-Instruct directly. The next iteration of albor (distillation epic PMAT-683/684) is the planned route to stricter quality targets.
Intended uses
✅ Sovereign AI Stack demonstrations — show the Rust-only training pipeline working end-to-end
✅ Inference infrastructure validation — drop-in test artifact for realizar / apr run / apr serve
Long-context generation (max_position_embeddings = 32,768 but model wasn't trained beyond seq=512)
HumanEval / MBPP submission as a competitive code-LM (target distillation epic for that)
Limitations
Compute-bounded training: 40.96M tokens consumed of a 49.6B-token corpus (0.083% sampling). Compute-optimal Chinchilla target (D=20·N) would require ~9 days continuous GPU; this model trades depth-of-fit for iteration speed on the stack.
Plateau evidence: doubling the training compute (P2-G with 10k steps vs P2-E's 5k) at the same LR/warmup produces a WORSE result (val_loss 4.6497 vs 4.6227, EARLY_STOP). This is a known marginal-gain-decay regime — more-of-the-same-recipe doesn't help. See §87 Chinchilla 20·N hard gate.
Init lineage: weights inherit from Qwen/Qwen2.5-Coder-0.5B-Instruct (Apache-2.0 license). The fine-tuning pass shifts the model's distribution toward the codeparrot+the-stack-dedup-Python distribution but does NOT fully replace the Instruct prior. Expect chat-formatted outputs to occasionally surface.
Validation set drift: P2-E held-out val batches were drawn from the first 16 batches of the qwen-v3 shard iterator — a mixed codeparrot + the-stack-dedup distribution. The new apr pretrain --val-shard flag (PR #1744) supports independent val sets for future runs.
Training data
Source
Size
License
Role
codeparrot/codeparrot-clean
12.8 GB
Apache-2.0 (permissive subset)
~25% of mix
bigcode/the-stack-dedup (Python)
28.6 GB
Permissive licenses (filtered, dedup'd)
~75% of mix
Combined corpus
49.6B tokens
Permissive (filtered + dedup'd)
qwen-v3
The corpus is tokenized at ingest time via apr tokenize encode-corpus --num-workers 48 and saved to disk as .bin shards (little-endian u32 tokens). The apr-corpus-ingest binary handles license filtering + minhash deduplication upstream.
How to use
Inference (recommended path)
bash
1# Install the aprender CLI2cargo install aprender
34# Pull the model5apr pull paiml/albor-370m-v1
67# Generate8apr run paiml/albor-370m-v1 "def fibonacci(n):"910# Benchmark11apr bench paiml/albor-370m-v1 --iterations 100
Direct .apr load (Rust, no Python)
rust
1userealizar::Model;2let model =Model::load_apr("albor-370m-v1.apr")?;3let output = model.generate(&input_ids, generation_config)?;
HuggingFace Transformers (cross-stack compat)
The repo includes model.safetensors + config.json + tokenizer.json + tokenizer_config.json + generation_config.json, so the model is directly loadable with HuggingFace Transformers:
1@misc{albor-370m-v1,
2 title = {albor-370m-v1: Stack-Existence-Proof for the Sovereign AI Stack},
3 author = {PAIML Engineering},
4 year = 2026,
5 url = {https://huggingface.co/paiml/albor-370m-v1},
6 note = {494M-parameter Qwen2 architecture trained end-to-end with the Rust-only aprender Sovereign AI Stack (no PyTorch). See SPEC-SHIP-TWO-001 §88 for the framing.}
7}
v1.0.0 (2026-05-17): Initial release. Stack-existence-proof model per SPEC §88. Best val_loss = 4.6227. Trained from Qwen/Qwen2.5-Coder-0.5B-Instruct init on codeparrot/codeparrot-clean + bigcode/the-stack-dedup Python permissive subset.