AGi Transformer v5.1 Advanced — FP4-E2M1, Parallel Blocks, Mamba, Double Buffering
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
agi_transformer-5.1.0.tar.gz
(325.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agi_transformer-5.1.0.tar.gz.
File metadata
- Download URL: agi_transformer-5.1.0.tar.gz
- Upload date:
- Size: 325.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c8ea1dc5d74e72c3c7718e33da94c67352186169374891b39f3709a17707812
|
|
| MD5 |
0febd6ad2da30aa7075fb7d01337665b
|
|
| BLAKE2b-256 |
2e44c878a103b2ab4cc318232ef95f81fe099cc569c9f313e8d03ac9ecaf80c3
|
File details
Details for the file agi_transformer-5.1.0-py3-none-any.whl.
File metadata
- Download URL: agi_transformer-5.1.0-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e77be3905799201ec077f5e934c656431562d885808f901fb3c16b5a11c7fe0
|
|
| MD5 |
c07684764c683d3533799b72b04cb613
|
|
| BLAKE2b-256 |
d0554be4427c86640c42e558a8a992bb7fefbee7325eb969cfe6b138914c4d5d
|