Text Generation
Transformers
Safetensors
mini-beatrix
byte-level
tokenizer-free
aleph
signed-address
custom_code
Run this model with HF Jobs
Run AbstractPhil/mini-beatrix-1 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/AbstractPhil/mini-beatrix-1. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/AbstractPhil/mini-beatrix-1 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/AbstractPhil/mini-beatrix-1. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/AbstractPhil/mini-beatrix-1. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
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
mirror alephllm 0.8.9 (same-session law): presets.py (v3 preset builder + registrations guarded for copies without the data stack; TrainConfig.phase_lr_scale/phase_seed_offset; Preset.data_scale/epoch_cap/rebalance_to), governor.py (raw_block: nested wrappers), alephlm.py (compile_hubs via raw_block). Gated: strict load of model.safetensors through the vendored path, logits parity 0.0 vs geolip.
Browse files109 unmodified lines1101111121131141157 unmodified lines12312412512612712882 unmodified lines2112122132142152165 unmodified lines222223224225226227228229230231232109 unmodified lines# requires_grad-only: optimizer param groups are UNCHANGED, so resume# state loads verbatim (Muon skips grad-less params).head_addr_frozen: bool = False# All missions upload to the one training repo, each under its own prefix7 unmodified linestrain: TrainConfighf_repo: str = TRAINING_REPO # run repo (ckpts+manifest+tb)curriculum: list = field(default_factory=list) # [(phase, dataset, planned_tokens)]@propertydef prefix(self) -> str: # path prefix inside hf_repo82 unmodified lines),}# Pure-sdpa control crafts (hub layers removed) — the running architecture# control for any mission: same params otherwise, suffix "-control".for _name in list(PRESETS):5 unmodified lines# form let treatment-specific flags leak into controls (2s-control# inherited head_addr_frozen=True, a post-revival flag no control's# birth recipe may carry) and made cross-mutation possible._t = TrainConfig(**{k: getattr(_p.train, k)for k in _p.train.__dataclass_fields__})PRESETS[_name + "-control"] = Preset(model=_m, train=_t,curriculum=[dict(x) for x in _p.curriculum])# The 2s architecture control runs the BIRTH recipe verbatim: born-null# unfrozen head (it buries, as the treatment's did for its first 24,860109 unmodified lines1101111121131141151161171181191201211221231241257 unmodified lines13313413513613713813914014114214314414514614714882 unmodified lines2312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103115 unmodified lines317318319320321322323324325326327328109 unmodified lines# requires_grad-only: optimizer param groups are UNCHANGED, so resume# state loads verbatim (Muon skips grad-less params).head_addr_frozen: bool = False# v3 (2026-09-19): per-phase LR multiplier keyed by phase-name PREFIX# ({"anneal": 0.5} scales both anneal phases). {} = the flat-LR form# verbatim — the v2 anneal ran at lr_scale 1.000 throughout (a diet# change, not an LR decay); the anneal as a LOWER-rate consolidation# stage is the v3 routine's term, its multiplier unmeasured (owed).phase_lr_scale: dict = field(default_factory=dict)# v3: open every phase's stream with a phase-specific seed offset so a# corpus that sits at the same recipe index in several stages does not# replay the identical shuffle head; False = the 2s form.phase_seed_offset: bool = False# All missions upload to the one training repo, each under its own prefix7 unmodified linestrain: TrainConfighf_repo: str = TRAINING_REPO # run repo (ckpts+manifest+tb)curriculum: list = field(default_factory=list) # [(phase, dataset, planned_tokens)]# v3: the curriculum-stage mixes are scaled (and rebalanced under the# epoch cap) by this factor when the trainer opens a stage — see# data/curriculum.py apply_curriculum_scale. 1.0 = the 2s schedule.data_scale: float = 1.0# v3: the two data-plane decisions a scale other than 1x needs (the# trainer refuses to open a scaled stage without them): the epoch cap# per finite corpus per stage (None = the audit threshold, flagged)# and the rebalance rule ('natural' | 'generators' | 'hold').epoch_cap: float | None = Nonerebalance_to: str | None = None@propertydef prefix(self) -> str: # path prefix inside hf_repo82 unmodified lines),}def make_v3_preset(n_layers: int = 24, d_model: int = 1024,data_scale: float = 4.0, epoch_cap: float | None = None,rebalance_to: str | None = None,name: str | None = None) -> Preset:"""The v3 craft (plan of record 2026-09-15, S2/S14; sizing 09-15):the solidified all-splat form at d1024 — a governed hub in EVERYblock, the certified hub geometry (4 books x 64 @ D128), banks3 x ff1024, head 256@256, ctx 4096 — at a depth the throughput benchpriced (24 or 28 blocks; the choice is the program lead's, with theprice beside it). Phases at `data_scale` x the 2s schedule (4x:warmup 0.3B, fineweb_main 20.9B, S0-S8 35.2B rebalanced under theepoch cap, anneal_nochat 4B, anneal_mix 4B = 64.4B bytes), listedCHRONOLOGICALLY and planned from birth (the two-phase anneal is partof the routine, not a post-hoc activation). Birth recipe: the headaddress trains (head_addr_frozen False — the 2s's True is apost-revival flag); no hub gain, no fusion (owed / the lead's).epoch_cap / rebalance_to: the data-plane decisions (the trainerrefuses a scaled stage without a rebalance rule); under 'hold' thestages stay at 1x and the held budget goes to fineweb_main."""from .data.curriculum import curriculum_phases, _BASE_STAGE_TOKENSif name is None:name = "mini-beatrix-3" if n_layers == 24 and d_model == 1024 \else f"mini-beatrix-3-d{d_model}-l{n_layers}"s = float(data_scale)model = AlephLMConfig(name=name, d_model=d_model, n_layers=n_layers,n_heads=max(1, d_model // 64), context=4096,hub_layers=tuple(range(n_layers)),hub_K=64, hub_D=128, hub_const=4,bank_experts=3, bank_ff=1024,head_K=256, head_D=256, hub_chunk=256, hub_ckpt=0)train = TrainConfig(micro_batch=16, grad_accum=4,governor="minsep", governor_theta=45.0,head_addr_frozen=False, phase_seed_offset=True)# the warmup phase stays at 300M (the LR warmup is 200 steps = 52M# tokens; wikitext-103 is a finite corpus the stage audit does not# cover) and its share of the scale moves to fineweb_main, so the# general-text total is (0.3 + 5.0) x scale exactlywarm = 300_000_000main = int((300_000_000 + 5_000_000_000) * s) - warmif rebalance_to == "hold":# the stages stay at 1x bytes; the held (s-1) x 8.8B is general textmain += int(round((s - 1.0) * sum(_BASE_STAGE_TOKENS.values())))phases = [dict(name="warmup_wikitext", dataset="wikitext-103",planned_tokens=warm, status="planned"),dict(name="fineweb_main", dataset="fineweb-edu",planned_tokens=main, status="planned"),*curriculum_phases(s, rebalance_to),dict(name="anneal_nochat", dataset="anneal-nochat",planned_tokens=int(1_000_000_000 * s), status="planned"),dict(name="anneal_mix", dataset="anneal-mix",planned_tokens=int(1_000_000_000 * s), status="planned"),]return Preset(model=model, train=train, curriculum=phases, data_scale=s,epoch_cap=epoch_cap, rebalance_to=rebalance_to)try:PRESETS["mini-beatrix-3"] = make_v3_preset(24)PRESETS["mini-beatrix-3-l28"] = make_v3_preset(28, name="mini-beatrix-3-l28")except ImportError:# the vendored automodel copies (the mirror law) carry model/ +# presets.py without the data stack: the v3 presets need the# curriculum registry and are simply absent therepassdef _copy_train(t: TrainConfig) -> TrainConfig:"""A field-wise copy with NO shared containers (the dict field wouldotherwise alias between a treatment and its twin)."""import copy as _copyreturn TrainConfig(**{k: _copy.deepcopy(getattr(t, k))for k in t.__dataclass_fields__})# Pure-sdpa control crafts (hub layers removed) — the running architecture# control for any mission: same params otherwise, suffix "-control".for _name in list(PRESETS):5 unmodified lines# form let treatment-specific flags leak into controls (2s-control# inherited head_addr_frozen=True, a post-revival flag no control's# birth recipe may carry) and made cross-mutation possible._t = _copy_train(_p.train)PRESETS[_name + "-control"] = Preset(model=_m, train=_t,curriculum=[dict(x) for x in _p.curriculum],data_scale=_p.data_scale, epoch_cap=_p.epoch_cap,rebalance_to=_p.rebalance_to)# The 2s architecture control runs the BIRTH recipe verbatim: born-null# unfrozen head (it buries, as the treatment's did for its first 24,860
presets.py+99-3