Text Generation
Transformers
Safetensors
mini-beatrix
byte-level
tokenizer-free
aleph
signed-address
custom_code
Instructions to use AbstractPhil/mini-beatrix-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AbstractPhil/mini-beatrix-1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AbstractPhil/mini-beatrix-1", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("AbstractPhil/mini-beatrix-1", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AbstractPhil/mini-beatrix-1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AbstractPhil/mini-beatrix-1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AbstractPhil/mini-beatrix-1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AbstractPhil/mini-beatrix-1
- SGLang
How to use AbstractPhil/mini-beatrix-1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "AbstractPhil/mini-beatrix-1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AbstractPhil/mini-beatrix-1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "AbstractPhil/mini-beatrix-1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AbstractPhil/mini-beatrix-1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AbstractPhil/mini-beatrix-1 with Docker Model Runner:
docker model run hf.co/AbstractPhil/mini-beatrix-1
vendored code: comment-only cleanup (alephllm 0.10.8); AST-identical, no behaviour change
Browse files- attention.py +1 -1
- governor.py +2 -2
- head.py +1 -1
- presets.py +9 -9
attention.py
CHANGED
|
@@ -66,7 +66,7 @@ class _Constellation(nn.Module):
|
|
| 66 |
|
| 67 |
The multi-constellation hub is the PRODUCT-CODE form (B2: independent
|
| 68 |
frames compose, .859 -> .955 monotone in members) at lawful supply
|
| 69 |
-
(
|
| 70 |
32 dims ran 16x and crowded into 333-646 duplicate pairs)."""
|
| 71 |
|
| 72 |
def __init__(self, d: int, K: int, D: int, tau: float):
|
|
|
|
| 66 |
|
| 67 |
The multi-constellation hub is the PRODUCT-CODE form (B2: independent
|
| 68 |
frames compose, .859 -> .955 monotone in members) at lawful supply
|
| 69 |
+
(aleph-splat-0 TECHNICAL_ROUND5.md, round 5e: K <= 2*D per address space β v1's single 512-anchor book in
|
| 70 |
32 dims ran 16x and crowded into 333-646 duplicate pairs)."""
|
| 71 |
|
| 72 |
def __init__(self, d: int, K: int, D: int, tau: float):
|
governor.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
"""The anchor governor β min-separation projection (
|
| 2 |
|
| 3 |
-
Measured
|
| 4 |
crowded past the separation floor flutter under the positional sweep (the
|
| 5 |
static logit gap is quadratic in separation, the oscillation linear), and the
|
| 6 |
crowding tail tracks seed fragility. The governor holds the space open FROM
|
|
|
|
| 1 |
+
"""The anchor governor β min-separation projection (2026-08-25).
|
| 2 |
|
| 3 |
+
Measured (aleph-splat-0 TECHNICAL_ROUND5.md, rounds 5e/5f): anchors
|
| 4 |
crowded past the separation floor flutter under the positional sweep (the
|
| 5 |
static logit gap is quadratic in separation, the oscillation linear), and the
|
| 6 |
crowding tail tracks seed fragility. The governor holds the space open FROM
|
head.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
"""DualHead β the standard readout plus
|
| 2 |
|
| 3 |
logits = W_h h + W_s s(h), W_s == 0 at init
|
| 4 |
|
|
|
|
| 1 |
+
"""DualHead β the standard readout plus an aleph read, born null.
|
| 2 |
|
| 3 |
logits = W_h h + W_s s(h), W_s == 0 at init
|
| 4 |
|
presets.py
CHANGED
|
@@ -51,7 +51,7 @@ class AlephLMConfig:
|
|
| 51 |
tie_embeddings: bool = False # BPE crafts tie; byte crafts cannot (trigram)
|
| 52 |
hub_chunk: int = 128 # chunked-scan block for the hub prefix memories
|
| 53 |
# v2 (2026-08-26): multi-constellation hubs β the product-code form at
|
| 54 |
-
# lawful supply (K <= 2*hub_D per book;
|
| 55 |
# bit-identical state dict. Old manifests load via the default.
|
| 56 |
hub_const: int = 1
|
| 57 |
# Activation checkpointing (training only; inference/decode untouched).
|
|
@@ -102,14 +102,14 @@ class TrainConfig:
|
|
| 102 |
canary_episodes: int = 128
|
| 103 |
seed: int = 1337
|
| 104 |
compile: bool = False
|
| 105 |
-
# The anchor governor (
|
| 106 |
# min-separation projection over hub/head codebooks β preventive
|
| 107 |
# anti-crowding, identity when slack, zero parameters, outside the
|
| 108 |
# task gradient (the no-balance-machinery law is untouched).
|
| 109 |
governor: str = "" # "" off (v1 verbatim) | "minsep"
|
| 110 |
governor_theta: float = 45.0 # deg; scale ~ gamma*(D): 45 at D=256
|
| 111 |
governor_every: int = 8 # steps between slack checks (~free)
|
| 112 |
-
# Post-revival address freeze (0.8.2;
|
| 113 |
# BOUNDARY-WRITE head revival, proj + head codebook freeze so the
|
| 114 |
# self-burial channel (proj rotating to codebook-orthogonality,
|
| 115 |
# measured 2/2 crafts) is structurally closed β only W_s trains.
|
|
@@ -129,7 +129,7 @@ class TrainConfig:
|
|
| 129 |
|
| 130 |
|
| 131 |
# All missions upload to the one training repo, each under its own prefix
|
| 132 |
-
# (
|
| 133 |
TRAINING_REPO = "AbstractPhil/alephllm-mini-beatrix-training"
|
| 134 |
|
| 135 |
|
|
@@ -184,12 +184,12 @@ PRESETS: dict[str, Preset] = {
|
|
| 184 |
train=TrainConfig(micro_batch=48, grad_accum=3),
|
| 185 |
curriculum=_curriculum(300_000_000, 3_000_000_000, 6_000_000_000),
|
| 186 |
),
|
| 187 |
-
# v2 (2026-08-26
|
| 188 |
# a hub in every block, multi-constellation product code at lawful
|
| 189 |
# supply (16 books x 256 anchors in 256-dim spaces = 1.0x supply;
|
| 190 |
# v1's single book ran 16x and crowded), governed from birth, ctx 8192
|
| 191 |
# where the O(L) read is ~4.5x cheaper than the MHA equivalent.
|
| 192 |
-
# ~873.7M params.
|
| 193 |
"mini-beatrix-2": Preset(
|
| 194 |
model=AlephLMConfig(name="mini-beatrix-2", d_model=1024, n_layers=32,
|
| 195 |
n_heads=16, context=8192,
|
|
@@ -207,8 +207,8 @@ PRESETS: dict[str, Preset] = {
|
|
| 207 |
governor="minsep", governor_theta=45.0),
|
| 208 |
curriculum=_curriculum(500_000_000, 8_000_000_000, 16_000_000_000),
|
| 209 |
),
|
| 210 |
-
# THE
|
| 211 |
-
#
|
| 212 |
# full-splat craft one rung above v1 β d1024 L20 ctx4096, governed
|
| 213 |
# 4x64@128 books (4x supply headroom vs v1's crowded 16x). Also the
|
| 214 |
# screen bed for every v2-era gating cell. hub_ckpt=0: at 237M the
|
|
@@ -241,7 +241,7 @@ def make_v3_preset(n_layers: int = 24, d_model: int = 1024,
|
|
| 241 |
data_scale: float = 4.0, epoch_cap: float | None = None,
|
| 242 |
rebalance_to: str | None = None,
|
| 243 |
name: str | None = None) -> Preset:
|
| 244 |
-
"""The v3 craft (plan of
|
| 245 |
the solidified all-splat form at d1024 β a governed hub in EVERY
|
| 246 |
block, the certified hub geometry (4 books x 64 @ D128), banks
|
| 247 |
3 x ff1024, head 256@256, ctx 4096 β at a depth the throughput bench
|
|
|
|
| 51 |
tie_embeddings: bool = False # BPE crafts tie; byte crafts cannot (trigram)
|
| 52 |
hub_chunk: int = 128 # chunked-scan block for the hub prefix memories
|
| 53 |
# v2 (2026-08-26): multi-constellation hubs β the product-code form at
|
| 54 |
+
# lawful supply (K <= 2*hub_D per book; aleph-splat-0 TECHNICAL_ROUND5.md, round 5e). 1 = the v1 layout,
|
| 55 |
# bit-identical state dict. Old manifests load via the default.
|
| 56 |
hub_const: int = 1
|
| 57 |
# Activation checkpointing (training only; inference/decode untouched).
|
|
|
|
| 102 |
canary_episodes: int = 128
|
| 103 |
seed: int = 1337
|
| 104 |
compile: bool = False
|
| 105 |
+
# The anchor governor (2026-08-25; see model/governor.py): post-optimizer-step
|
| 106 |
# min-separation projection over hub/head codebooks β preventive
|
| 107 |
# anti-crowding, identity when slack, zero parameters, outside the
|
| 108 |
# task gradient (the no-balance-machinery law is untouched).
|
| 109 |
governor: str = "" # "" off (v1 verbatim) | "minsep"
|
| 110 |
governor_theta: float = 45.0 # deg; scale ~ gamma*(D): 45 at D=256
|
| 111 |
governor_every: int = 8 # steps between slack checks (~free)
|
| 112 |
+
# Post-revival address freeze (0.8.2; see train/revival.py): after the
|
| 113 |
# BOUNDARY-WRITE head revival, proj + head codebook freeze so the
|
| 114 |
# self-burial channel (proj rotating to codebook-orthogonality,
|
| 115 |
# measured 2/2 crafts) is structurally closed β only W_s trains.
|
|
|
|
| 129 |
|
| 130 |
|
| 131 |
# All missions upload to the one training repo, each under its own prefix
|
| 132 |
+
# (checkpoints + manifests + tensorboard for every craft).
|
| 133 |
TRAINING_REPO = "AbstractPhil/alephllm-mini-beatrix-training"
|
| 134 |
|
| 135 |
|
|
|
|
| 184 |
train=TrainConfig(micro_batch=48, grad_accum=3),
|
| 185 |
curriculum=_curriculum(300_000_000, 3_000_000_000, 6_000_000_000),
|
| 186 |
),
|
| 187 |
+
# v2 (2026-08-26): FULL-SPLAT β
|
| 188 |
# a hub in every block, multi-constellation product code at lawful
|
| 189 |
# supply (16 books x 256 anchors in 256-dim spaces = 1.0x supply;
|
| 190 |
# v1's single book ran 16x and crowded), governed from birth, ctx 8192
|
| 191 |
# where the O(L) read is ~4.5x cheaper than the MHA equivalent.
|
| 192 |
+
# ~873.7M params.
|
| 193 |
"mini-beatrix-2": Preset(
|
| 194 |
model=AlephLMConfig(name="mini-beatrix-2", d_model=1024, n_layers=32,
|
| 195 |
n_heads=16, context=8192,
|
|
|
|
| 207 |
governor="minsep", governor_theta=45.0),
|
| 208 |
curriculum=_curriculum(500_000_000, 8_000_000_000, 16_000_000_000),
|
| 209 |
),
|
| 210 |
+
# THE 2s MISSION (2026-08-26): the next stage up from v1, since the
|
| 211 |
+
# large shape above could not be trained on the available card: the lawful
|
| 212 |
# full-splat craft one rung above v1 β d1024 L20 ctx4096, governed
|
| 213 |
# 4x64@128 books (4x supply headroom vs v1's crowded 16x). Also the
|
| 214 |
# screen bed for every v2-era gating cell. hub_ckpt=0: at 237M the
|
|
|
|
| 241 |
data_scale: float = 4.0, epoch_cap: float | None = None,
|
| 242 |
rebalance_to: str | None = None,
|
| 243 |
name: str | None = None) -> Preset:
|
| 244 |
+
"""The v3 craft (the v3 plan of 2026-09-15; sizing 09-15):
|
| 245 |
the solidified all-splat form at d1024 β a governed hub in EVERY
|
| 246 |
block, the certified hub geometry (4 books x 64 @ D128), banks
|
| 247 |
3 x ff1024, head 256@256, ctx 4096 β at a depth the throughput bench
|