Skip to main content

AGi Transformer v5.1 — Advanced Core

High-performance transformer library with FP4-E2M1 quantization, Parallel Blocks, Mamba layers, and Triton double-buffering kernels.

Features

  • FP4-E2M1 Format: 1 sign + 2 exponent + 1 mantissa (superior to NF4 for Gaussian weights)
  • Parallel Block Architecture: PaLM-style simultaneous Attention + FFN (15% speedup)
  • Mamba/TTT Hybrid: Replace middle attention with O(L) linear recurrent layers
  • Double Buffering: Triton kernel preloads Block K+1 while computing Block K
  • Matrix Swizzling: XOR-based shared memory indexing eliminates bank conflicts
  • Dynamic Scaled Clamping: Per-row adaptive bounds based on block maxima
  • Vector SmoothAlpha: Per-channel 4096-parameter scaling (not scalar)
  • AdaRound + KLD: Learnable rounding with distribution-preserving loss

Quick Start

pip install -e .
python scripts/train.py --steps 5000 --d-model 512 --n-layers 8

Project Structure

src/agi_core/
├── kernels/      # Triton AOT kernels (FP4, Double Buffer, Swizzle)
├── layers/       # Quantized Linear, Mamba, Parallel Block
├── model/        # AGiParallelTransformer
├── ops/csrc/     # C++/CUDA extensions (optional AOT)
└── utils/        # Quantization helpers, logging

License

MIT

Release files for agi-transformer 5.1.0

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

Source distribution (sdist)

Source distribution for agi-transformer 5.1.0
File Size Uploaded
agi_transformer-5.1.0.tar.gz 325.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agi-transformer 5.1.0
File Interpreter ABI Platform
agi_transformer-5.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 339.1 kB

Release files / agi_transformer-5.1.0.tar.gz

Download URL agi_transformer-5.1.0.tar.gz
Size 325.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3c8ea1dc5d74e72c3c7718e33da94c67352186169374891b39f3709a17707812
BLAKE2b-256 checksum
How to use checksums
2e44c878a103b2ab4cc318232ef95f81fe099cc569c9f313e8d03ac9ecaf80c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / agi_transformer-5.1.0-py3-none-any.whl

Download URL agi_transformer-5.1.0-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e77be3905799201ec077f5e934c656431562d885808f901fb3c16b5a11c7fe0
BLAKE2b-256 checksum
How to use checksums
d0554be4427c86640c42e558a8a992bb7fefbee7325eb969cfe6b138914c4d5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

5.1.0 This release

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