Downloads · 30 days
48
6% of all-time downloads
paiml/albor-370m-v1
albor-370m-v1 is a text generation model from paiml. Use it when you need the model to write or continue text. It is set up for aprender. The card lists the license as apache-2.0.
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 transf…
Downloads · 30 days
48
6% of all-time downloads
All-time downloads
781
Public
Parameters
630M
7.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors5 GB · 52%
From the Hugging Face model README
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— purelyaprender+entrenar+trueno+realizar.Intended use: stack capability proof, NOT a production code-completion model. See §88 framing below.
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:
apr tokenize encode-corpus (BPE NFC, Qwen2 vocab, 151,936 tokens)Qwen/Qwen2.5-Coder-0.5B-Instruct (via apr convert)apr pretrain --device cuda on RTX 4090 (cuBLAS TF32 forward + custom backward kernels).apr (aprender native, row-major, no PyTorch dependency)apr run model.apr "..." (realizar inference engine)| Parameter | Value |
|---|---|
| Architecture | Qwen2 (24L, 14H, 2KV, 896d, 4864 intermediate) |
| Parameters | ~494M |
| Tokenizer | Qwen2 BPE (151,936 vocab) |
| Init | Qwen/Qwen2.5-Coder-0.5B-Instruct (post-fine-tune from instruct) |
| Optimizer | AdamW (β₁=0.9, β₂=0.95, ε=1e-8, wd=0.01) |
| LR schedule | Cosine warmup (500 steps) → 1.5e-5 peak → 1.0e-7 floor |
| Batch | 16 |
| Seq length | 512 |
| Total steps | 5,000 (50 epochs × 100 steps) |
| Total tokens consumed | 40.96M |
| Hardware | NVIDIA RTX 4090 (sm_89), 24 GB |
| Wall time | 53 minutes |
| Throughput | 15,460 tok/s (pure training) / 12,880 tok/s (with 2.5 GB checkpoint per epoch) |
| GPU utilization | 99-100% sustained, 10.4 GB / 24 GB used, 57°C |
apr bench on RTX 4090)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).
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:
apr tokenize encode-corpus)apr pretrain, no PyTorch).apr format, no safetensors dependency for the training path)apr run)apr export --format gguf)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.
realizar / apr run / apr serveapr quantize benchmarks against this checkpointQwen/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.apr pretrain --val-shard flag (PR #1744) supports independent val sets for future runs.| 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.
# Install the aprender CLI
cargo install aprender
# Pull the model
apr pull paiml/albor-370m-v1
# Generate
apr run paiml/albor-370m-v1 "def fibonacci(n):"
# Benchmark
apr bench paiml/albor-370m-v1 --iterations 100
use realizar::Model;
let model = Model::load_apr("albor-370m-v1.apr")?;
let output = model.generate(&input_ids, generation_config)?;
The repo includes model.safetensors + config.json + tokenizer.json + tokenizer_config.json + generation_config.json, so the model is directly loadable with HuggingFace Transformers:
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("paiml/albor-370m-v1")
model = AutoModelForCausalLM.from_pretrained("paiml/albor-370m-v1", torch_dtype="auto")
inputs = tokenizer("def fibonacci(n):", return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=64, do_sample=False)
print(tokenizer.decode(out[0], skip_special_tokens=True))
This path is provided for compatibility — but note the model was trained with the Rust-only Sovereign AI Stack, not PyTorch.
# Quantize to Q4_K for llama.cpp (--quantize int4 selects Q4_K internally)
apr export albor-370m-v1.apr --format gguf --quantize int4 -o albor-370m-q4k.gguf
# Export to SafeTensors for transformers (round-trip works but loses some metadata)
apr export albor-370m-v1.apr --format safetensors -o albor-370m.safetensors
# Pull the source init
apr pull Qwen/Qwen2.5-Coder-0.5B-Instruct -o qwen-init.apr
# Pull the corpus (dataset asset-type discriminator)
apr pull dataset bigcode/the-stack-dedup --filter python --subset deduped -o the-stack-py/
apr pull dataset codeparrot/codeparrot-clean -o codeparrot-clean/
# Tokenize (multi-source, NFC normalized, Qwen2 vocab)
apr tokenize encode-corpus \
--corpus the-stack-py/ \
--corpus codeparrot-clean/ \
--tokenizer qwen-init.apr \
-o qwen-v3-shards/
# Train (the P2-E recipe)
apr pretrain \
--dataset qwen-v3-shards/ \
--tokenizer qwen-tokenizer/ \
--run-dir runs/albor-370m-v1/ \
--init qwen-init.apr \
--mode finetune \
--lr 1.5e-5 \
--num-steps 5000 \
--warmup-steps 500 \
--batch-size 16 \
--seq-length 512 \
--target-val-loss 3.0 \
--vocab-size 151936 \
--device cuda \
--seed 42 \
--force-under-provisioned
Expected wall time: 53 minutes on RTX 4090.
@misc{albor-370m-v1,
title = {albor-370m-v1: Stack-Existence-Proof for the Sovereign AI Stack},
author = {PAIML Engineering},
year = 2026,
url = {https://huggingface.co/paiml/albor-370m-v1},
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.}
}
| Field | Value |
|---|---|
| Model weights license | Apache-2.0 (inherits from base) |
| Init checkpoint | Qwen/Qwen2.5-Coder-0.5B-Instruct (Apache-2.0) |
| Training data sources | codeparrot/codeparrot-clean + bigcode/the-stack-dedup (Python, permissive-licensed subset) |
| Training data license | Aggregated permissive (Apache-2.0 / MIT / BSD via license filtering) |
| Training stack | aprender + entrenar + trueno + realizar (all Apache-2.0) |
| Training hardware | NVIDIA RTX 4090 (sm_89) |
| Training framework | Rust-native (no PyTorch, no HF transformers) |
Qwen/Qwen2.5-Coder-0.5B-Instruct init on codeparrot/codeparrot-clean + bigcode/the-stack-dedup Python permissive subset.For full training methodology and methodology lessons learned (Class 3 packaging cascades, audit hypothesis bounds, upstream metadata masquerade), see docs/specifications/aprender-train/ship-model-2-spec.md §81–§88.