Skip to main content

🌌 AXIOM-1

The Foundation of Recurrent-Depth Transformation

Model Architecture Parameter Count Precision Vocabulary Lab

“One block. Twelve iterations. The first axiom of EGen Core.”


AXIOM-1 (EGen-Core/AXIOM-1) is a radically different approach to Large Language Modeling. Built entirely from scratch by EGen Labs, it abandons the traditional feed-forward paradigm of stacking 32+ specialized layers. Instead, AXIOM-1 utilizes Recurrent Depth (LoopLLM): learning a single, highly-generalized block and passing thoughts through it iteratively to refine understanding.

This repository serves as the definitive reference implementation and training grounds for Phase 0 of the EGen Core architecture.


⚡ Core Architecture (Upgraded V1.1)

AXIOM-1 has recently undergone a major architectural upgrade for extreme memory efficiency, stability, and multilingual scale:

  • Universal LoopBlock: 1 shared Transformer block applied autoregressively 12 times per forward pass.
  • Scale: d_model=512, heads=8q/2kv (GQA), d_ff=1365.
  • Multilingual Expansion: Tokenizer vocabulary expanded from 32K to 132,000, enabling seamless multi-language processing (English, French, Arabic, coding languages).
  • Loop Stability Interventions: Features mid-loop re-normalization (forces strict magnitude bounds every 4 iterations) and dynamic consistency loss warmup to prevent loop collapse.
  • AirLLM Integrations: Engineered to run comfortably on sub-4GB consumer hardware via component-level layer streaming, dynamic INT8 FFN quantization, and memory-tracked per-step KV caches.

📦 Installation (PyPI Ready)

You can install AXIOM-1 as a python package directly from the source.

# Clone the Core repository
git clone https://github.com/EGen-V/EGen-Core.git
cd EGen-Core

# Install the axiom1 package and dependencies
pip install .

Once officially published, AXIOM-1 will be installable via pip install axiom1.


🔬 Running the Google Colab Prototype

We actively support barrier-free testing of the recurrent architecture. Use our ready-to-use Google Colab notebook: axiom1_colab_training.ipynb

Features natively handled by the notebook:

  1. Zero-Setup Environment: Installs axiom1 and imports the 132K dataset builder.
  2. Validation: Automatically runs the strict 6-Rule Sanity Check (gradient flow tracking).
  3. End-to-End Pipeline: Trains the prototype using PyTorch's native loops.
  4. Export: Automatically saves and pushes the weight-tied checkpoint to your Hugging Face Hub.

Quick Start in Colab:

  1. Upload axiom1_colab_training.ipynb to Google Colab.
  2. Set Runtime > Change runtime type > T4 GPU (or better).
  3. Run all blocks (ensure you have a Hugging Face write token ready for the final cell).

🛠️ Manual Usage / API Guide

1. The 6-Rule Sanity Check (Mandatory)

Because recurrent networks are uniquely vulnerable to gradient explosion, you must run the 6-rule sanity check before any training session.

from axiom1.model.config import AXIOM1Config
from axiom1.model.model import AXIOM1
from axiom1.evals.sanity_check import run_sanity_check

cfg = AXIOM1Config()
model = AXIOM1(cfg).to('cuda')

# Validates params, initial loss (11.79), LSE norms, and verifies
# that recurrent gradients successfully flow through all 12 iterations.
run_sanity_check(model, cfg) 

2. High-Efficiency Generation (AirLLM Style)

AXIOM-1 is built for edge hardware. Use AXIOM1_Offloaded to stream the single transformer block continuously between CPU and GPU.

import torch
from axiom1.model.config import AXIOM1Config
from axiom1.model.model import AXIOM1
from axiom1.inference.offload import AXIOM1_Offloaded
from axiom1.tokenizer.tokenizer import AXIOM1Tokenizer

# 1. Load your trained model to CPU
cfg = AXIOM1Config()
model = AXIOM1(cfg)
# model.load_state_dict(...)
model.eval()

# 2. Wrap via AirLLM offload wrapper
offloaded_model = AXIOM1_Offloaded(model, device='cuda')

# 3. Generate with top-k, top-p, temperature
prompt_ids = torch.tensor([[1, 234, 555]])
generated = offloaded_model.generate(
    prompt_ids, 
    cfg, 
    max_new_tokens=256,
    top_k=50,
    top_p=0.9
)

3. VRAM Budget Estimation

AXIOM-1 scales infinitely depending on batch size and context window. Check your exact memory footprint before testing:

from axiom1.inference.memory import print_memory_report

# Will output a highly detailed console report verifying if
# your intended configuration fits within 2GB / 4GB / 8GB VRAM pools.
print_memory_report(cfg, batch_size=4, seq_len=1024)

4. Full Documentation

For a complete breakdown of the 3-Phase training curriculum, sanity check diagnostics, and INT8 quantization features, please see the AXIOM-1 Comprehensive Usage Guide.


Designed & Built by EGen Labs | Directed by ErebusTN
*Redefining Architectural Depth.*

Metadata

Release files for axiom1 1.0.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for axiom1 1.0.12
File Size Uploaded
axiom1-1.0.12.tar.gz 52.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for axiom1 1.0.12
File Interpreter ABI Platform
axiom1-1.0.12-py3-none-any.whl Python 3 none any Details

Total release size: 100.5 kB

Release files / axiom1-1.0.12.tar.gz

Download URL axiom1-1.0.12.tar.gz
Size 52.1 kB
Tags Source
SHA-256 checksum
How to use checksums
aa8d8937369e74297103ad7e40ae8e9d9cca20b2643a6fa2fd9ffdf0b80da9ab
BLAKE2b-256 checksum
How to use checksums
9b704f79be6aabf2488cb08645cd0b0586a27324d4713ab3446aa1ececf9add8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Release files / axiom1-1.0.12-py3-none-any.whl

Download URL axiom1-1.0.12-py3-none-any.whl
Size 48.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ba3ef07b49bddb673b242fed0761c3e3c941a8f393cddb9def7b05780fb299d
BLAKE2b-256 checksum
How to use checksums
a75e0a849bd34414bd15474d1e19febbd359e2f5bb959afbb43e762947bce4bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Release history Release notifications | RSS feed

This release

1.0.12 This release

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.8

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page