ACAB-X is a hardware-native, highly optimized training engine designed to train, fine-tune, or adapter-train massive large language models (7B to 120B+ parameters) on commodity consumer devices, workstations, and decentralized P2P clusters.
- Weight Compression (Target: β€ 1.6 bits): Implements block quantization achieving 1.125 bits/weight for Binary and 1.728 bits/weight for Ternary configurations.
- Constant Activation Memory ($O(1)$): Replaces global backpropagation with Cellular Local Error Learning, immediately evicting intermediate activation graphs to guarantee flat memory growth regardless of model depth.
-
8x Optimizer Compression: Saves 87.5% of state RAM by quantizing momentum and variance states to 4-bit (INT4) format in
CompressedAdamWor using 0-state 1-bitSignSGD. - Dynamic Dual-Backend Dispatch: Automatically queries system accelerators. Runs custom compiled Rust SIMD/AVX kernels (CPU), vectorized PyTorch fallbacks, or native CUDA/Triton templates (e.g. for ASUS ROG Z13 GeForce GPU).
- P2P Mesh Pipelining: Integrates with the Hyperspace Pods framework to pool distributed consumer compute shards and aggregate updates asynchronously using DiLoCo-style weight delta syncing.
- Long-Context RoPE Scaling: Incorporates Linear and Dynamic NTK-aware position interpolation to extend context windows safely without retraining.
/ACAB-X
βββ runtime/
β βββ hardware_detector.py # Accelerator, package, and compiler detection
β βββ backend_selector.py # Runtime backend dispatch logic
β βββ quantizers.py # Vectorized PyTorch/Rust fallback quantizers
β βββ cellular_layer.py # Local learning & activation eviction wrapper
β βββ hyperspace_bridge.py # P2P Hyperspace Pod cluster sync client
βββ optimizers/
β βββ compressed_optimizers.py # 4-bit CompressedAdamW & 1-bit SignSGD
βββ configs/
β βββ model_configs.py # Modular profiles (7B - 120B) & memory estimates
β βββ rope_scaling.py # Long-context window RoPE scaler
βββ kernels/
β βββ src/lib.rs # High-performance Rust CPU SIMD quantizers
β βββ cuda_kernels.cu # CUDA template kernels (ASUS ROG Z13 target)
β βββ Cargo.toml # Cargo configuration (cdylib target)
βββ benchmarks/
β βββ profile_engine.py # Speed, memory, and scaling benchmark suite
βββ tests/ # Integrity unit tests
Query your local device capabilities and automatically load the optimal compilation/runtime backend:
python -m runtime.backend_selectorMeasure local quantization speeds, compute throughput, and visualize memory footprint projections for 7B-120B models:
python -m benchmarks.profile_engineValidate quantization precision, optimizer updates, context scaling, and P2P connection fallbacks:
python -m unittest discover tests/Below are the memory consumption requirements calculated by the engine for various scaling configurations:
| Model Scale | Weight Memory (GB) | Std Optimizer (GB) | Compressed Opt (GB) | Std Activations (GB) | Cellular Activations (GB) |
|---|---|---|---|---|---|
| 7B | 1.34 GB | 53.60 GB | 6.70 GB | 2.15 GB | 0.07 GB |
| 13B | 2.60 GB | 104.00 GB | 13.00 GB | 3.36 GB | 0.08 GB |
| 34B | 6.76 GB | 270.40 GB | 33.80 GB | 6.44 GB | 0.13 GB |
| 70B | 13.96 GB | 558.40 GB | 69.80 GB | 10.74 GB | 0.13 GB |
| 120B | 24.04 GB | 961.60 GB | 120.20 GB | 16.78 GB | 0.17 GB |
Tip
By combining 1.6-bit weight quantization, 4-bit optimizers, and cellular activation eviction, a 120B parameter model requires only ~144.4 GB total memory during training (down from 1000+ GB standard), making training locally on unified memory consumer systems or small clusters fully feasible.