Instructions to use batteryphil/VAULT-v2.5-180M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use batteryphil/VAULT-v2.5-180M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="batteryphil/VAULT-v2.5-180M", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("batteryphil/VAULT-v2.5-180M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use batteryphil/VAULT-v2.5-180M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "batteryphil/VAULT-v2.5-180M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "batteryphil/VAULT-v2.5-180M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/batteryphil/VAULT-v2.5-180M
- SGLang
How to use batteryphil/VAULT-v2.5-180M 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 "batteryphil/VAULT-v2.5-180M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "batteryphil/VAULT-v2.5-180M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "batteryphil/VAULT-v2.5-180M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "batteryphil/VAULT-v2.5-180M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use batteryphil/VAULT-v2.5-180M with Docker Model Runner:
docker model run hf.co/batteryphil/VAULT-v2.5-180M
- VAULT v2.5 (180.6M) β Co-Prime Kenyon Cell Architecture & Zero-
rocFFTO(1) Streaming Engine
VAULT v2.5 (180.6M) β Co-Prime Kenyon Cell Architecture & Zero-rocFFT O(1) Streaming Engine
Author & Architect: Philip Bartsch (@batteryphil)
GitHub Repository: https://github.com/batteryphil/VAULT
License: MIT
New β Looking for the 1.54B quantized (
BF16/Q8_0/Q4_0) + freestanding C99 (-ffreestanding -nostdlib) release? Seebatteryphil/VAULT-v3-1.5B.
VAULT (Variance-Weighted Associative Unitary Lattice Tensor) is a 180.6M-parameter post-Transformer, post-SSM recurrent sequence architecture (d_model=768, n_layers=16, H_q=12, G_vault=4, d_head=64, d_ff=2048) trained from scratch on a single consumer 16 GB GPU (AMD Radeon RX 9060 XT) on 0.594B total tokens (0.575B base continual pretraining + 19.7M precision SFT tokens).
Instead of an unbounded $\mathcal{O}(T)$ KV-cache (Transformers) or a single exponentially decaying state matrix (Mamba / linear RNNs), VAULT routes high-salience entities into 4 Co-Prime Kenyon Cell fast-weight banks ($P = {47, 53, 59, 61} = 220$ cells, $8.97\text{M}$ CRT addresses) via phase-bound circular convolution, where unaddressed memory cells have zero passive temporal decay ($\gamma = 1.0$) and capacity can be expanded zero-shot at inference time up to $2,002$ cells ($P = {491, 499, 503, 509}$, $62.7\text{B}$ CRT addresses) via Elastic Co-Prime Mitosis without changing per-token decode latency.
β‘ Super-Quick Start (5 Lines β Zero Repo Clone Needed)
pip install torch transformers safetensors huggingface_hub
# Optional on Linux CUDA / ROCm for 48.8 tok/s hardware-fused O(1) kernels:
# pip install triton
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("batteryphil/VAULT-v2.5-180M", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
"batteryphil/VAULT-v2.5-180M", trust_remote_code=True
).to("cuda" if __import__("torch").cuda.is_available() else "cpu")
print(model.chat(tok, "Explain why recursion needs a base case in programming.", stream=True))
Zero-Shot Elastic Co-Prime Mitosis (220 -> 2,002 Cells in 1 Line)
Expand the associative memory state 9.1x (220 -> 2,002 Kenyon cells) at inference time for 32K+ streaming retrieval (83.3% exact needle recall at 32K, trained strictly at 2K!) with identical 20.59 ms/tok O(1) decode latency:
model_2002c = model.expand_mitosis(2002) # Supports 220, 508, 942, or 2002 cells
reply, stats = model_2002c.chat(
tok,
"[python] Write a Python function to find the maximum element and sum of a list of numbers.",
return_stats=True,
)
print(reply)
print(stats)
One-Command CLI & Interactive REPL (via GitHub Repo)
git clone https://github.com/batteryphil/VAULT.git
cd VAULT
pip install -r requirements.txt
# Auto-downloads weights from HuggingFace Hub & runs 4 live streaming demos:
python run_vault.py --demo
# Interactive streaming Chat REPL (supports /mitosis 2002, /demo, /temp):
python run_vault.py
Hardware Compatibility (NVIDIA CUDA β’ AMD ROCm β’ Apple Silicon β’ CPU)
- NVIDIA CUDA (
RTX 30xx/40xx/50xx,L4,A100,H100): Native OpenAI/NVIDIA Triton PTX TensorCore chunkwise prefill (<= 32 KBshared memory across all220c..2,002cMitosis presets), zero-external-FFT register-DFT Triton decode kernels, andtorch.cuda.CUDAGraph. - Older NVIDIA GPUs (
T4,RTX 20xx,V100): AutomaticFP32Triton &FP16support onSM < 8.0. - AMD ROCm (
RDNA3/RDNA4/CDNA): Native TritonBF16WMMA + HIPGraph acceleration. - Apple Silicon (
mps) &CPU: Automatic pure-PyTorch Compact-WY fallback when Triton/CUDA is not present.
π Empirical Benchmarks (VAULT v2.4 @ Step 10k Base vs. VAULT v2.5 SFT)
All evaluations run offline under identical EleutherAI lm-eval and streaming protocols on a single 16 GB AMD Radeon RX 9060 XT:
1. Zero-Shot Academic Suite (0.594B Tokens vs. 100Bβ600B External Baselines)
| Benchmark / Metric | VAULT v2.4 Base (0.575B tok) |
VAULT v2.5 SFT (0.594B tok) |
Delta (SFT vs Base) | Reference: Mamba-2 130M (300B tok) |
Reference: SmolLM 135M (600B tok) |
|---|---|---|---|---|---|
SciQ w/ Passage (acc_norm) |
50.40% |
71.80% |
+21.40% |
73.20% |
76.40% |
SciQ Closed-Book (acc_norm) |
37.00% |
50.70% |
+13.70% |
46.70% |
64.70% |
| SciQ In-Context Gain | +13.40% |
+21.10% |
+7.70% |
+26.50% |
+11.70% |
ARC-Easy (acc_norm) |
37.71% (41.37% raw) |
45.37% (46.34% raw) |
+7.66% |
42.38% |
57.41% |
ARC-Challenge (acc_norm) |
23.12% |
23.72% |
+0.60% |
23.81% |
28.92% |
PIQA (acc_norm) |
57.02% (58.92% raw) |
58.22% (59.09% raw) |
+1.20% |
63.71% |
68.44% |
HellaSwag (acc_norm) |
35.73% |
37.13% |
+1.40% |
43.07% |
45.60% |
Winogrande (acc) |
49.64% |
50.43% |
+0.79% |
53.28% |
52.72% |
BoolQ (acc / acc_norm) |
56.93% / 62.93% |
41.53% / 51.33% |
-15.40% |
56.33% / 61.40% |
59.87% / 63.20% |
LAMBADA (acc) |
12.27% |
13.73% |
+1.46% |
42.93% |
36.87% |
WikiText-2 (BPB / TokPPL) |
1.5447 / 93.97 |
1.5466 / 94.51 |
+0.0019 BPB |
0.9645 / 19.98 |
0.9686 / 17.26 |
| 9-Task Zero-Shot Average | 39.98% |
43.63% |
+3.65% |
49.49% |
54.55% |
2. True O(1) Streaming Decode Latency & State Scaling (2K -> 128K & 220c -> 2,002c)
Zero-rocFFT Fused Triton Decode (_vault_v2_5_fft_bind_64_kernel + _vault_v2_5_salience_pool_decode_kernel + _vault_v2_5_local_syntax_decode_kernel + _vault_v2_decode_fw_kernel):
- FP32 Monolithic vs. Streaming Parity (
t = 0..255across rollovers): Prefill max diff5.91e-5, 128-step decode median diff2.46e-5,100.00%Top-1 token agreement. 220c@2K(2,048tok):10,214 tok/sprefill |227.3 MBstate |20.61 ms/tok(48.5 tok/s)220c@128K(131,072tok):13,119 tok/sprefill |227.3 MBstate |20.53 ms/tok(48.7 tok/s)2,002cMitosis @128K(131,072tok):2,798 tok/sprefill |2,009.7 MBstate |20.59 ms/tok(48.6 tok/s)
3. In-Context Multi-Needle Retrieval & 16x Zero-Shot Extrapolation (Trained at 2K Only)
- Controlled
2KSyntactic Gaps:100.0%(+3tok),93.8%(+15tok boilerplate),87.5%(+24tok wide). - Adversarial
>=8-Subword Sibling Collision Stress Test (>=7shared prefix BPE tokens):2K ChatML:81.2%(+6.2%vs v2.4)4K ChatML:75.0%(+16.7%vs v2.4,-0.70bits NLL via Tri-Horizong2m=1..10binder)4K 1-Shot:75.0%(+8.3%vs v2.4,-0.64bits NLL)
32KZero-Shot Co-Prime Mitosis (2,002c,16xbeyond2Ktraining horizon):83.3%exact (1-shot,91.7%digit acc) /66.7%exact (ChatML,83.3%digit acc).
π Honest Capabilities & Known Compute Limits
- Strengths: Strong in-context reading comprehension (
71.80%SciQ +Passage), exact multi-needle key-value routing,16xzero-shot length extrapolation to32Kvia Co-Prime Mitosis, clean Python/C++20/CoT/CS-prose generation, and flatO(1)memory & latency up to128K. - Compute Limits (
0.594BTokens): Closed-book trivia and rare fiction idioms (LAMBADA, rawWikiText-2PPL) remain strictly compute-bound by training on<0.6Btokens (~1/500thof a 300B-token run). At64Kβ128K, zero-shot2,002cmitosis lowers target NLL by-2.7b, retrieves the leading digit (33%β50%), and requires post-mitosis continual adaptation to orthogonalize daughter Voronoi cones pastocc > 0.90.
π¦ Included Checkpoints in This Repo
model.safetensors:VAULT v2.5SFT (180.58Mparams, promotedema_step_600, lossless FP32) β loaded automatically byAutoModelForCausalLM.base/vault_v2_4_step10k.safetensors:VAULT v2.4Step 10,000 Base (180.51Mparams, Pre-SFT checkpoint, lossless FP32) β loadable viapython run_vault.py --variant base.
- Downloads last month
- 338