AI-HEXAGON
⚠️ Early Development: This project is currently in its early development phase and not accepting external architecture submissions yet. Star/watch the repository to be notified when we open for contributions.
📊 View Live Leaderboard & Results
AI-HEXAGON is an objective benchmarking framework designed to evaluate neural network architectures independently of natural language processing tasks. By isolating architectural capabilities from training techniques and datasets, it enables meaningful and efficient comparisons between different neural network designs.
🎯 Motivation
Traditional neural network benchmarking often conflates architectural performance with training techniques and dataset biases. This makes it challenging to:
- Isolate true architectural capabilities
- Iterate quickly on design changes
- Compare models fairly
AI-HEXAGON solves these challenges by:
- 🔍 Pure Architecture Focus: Tests that evaluate only the architecture, removing confounding factors like tokenization and dataset-specific optimizations
- ⚡ Rapid Iteration: Enable quick testing of architectural changes without large-scale training
- 🛠️ Flexible Testing: Support both standard benchmarking and custom test suites
🌟 Key Features
- 📊 Pure Architecture Evaluation: Tests fundamental capabilities independently
- ⚖️ Controlled Environment: Fixed parameter budget and raw numerical inputs
- 📐 Clear Metrics: Six independently measured fundamental capabilities
- 🔍 Transparent Implementation: Clean, framework-agnostic code
- 🤖 Automated Testing: GitHub Actions for fair, manipulation-proof evaluation
- 📈 Live Results: Real-time benchmarking results at ai-hexagon.dev
📐 Metrics (The Hexagon)
Each architecture is evaluated on six fundamental capabilities:
| Metric | Description |
|---|---|
| 🧠 Memory Capacity | Store and recall information from training data |
| 🔄 State Management | Maintain and manipulate internal hidden states |
| 🎯 Pattern Recognition | Recognize and extrapolate sequences |
| 📍 Position Processing | Handle positional information within sequences |
| 🔗 Long-Range Dependency | Manage dependencies over long sequences |
| 📏 Length Generalization | Process sequences longer than training examples |
📁 Project Structure
ai-hexagon/
├── ai_hexagon/
│ └── modules/ # Common neural network modules
└── results/ # Model implementations and results
├── suite.json # Default test suite configuration
└── transformer/
├── model.py # Transformer implementation
└── modules/ # Custom modules (if needed)
⚙️ Parameter Budget
The default suite enforces a 4MB parameter limit for fair comparisons:
| Precision | Parameter Limit |
|---|---|
| Complex64 | 0.5M params |
| Float32 | 1M params |
| Float16 | 2M params |
| Int8 | 4M params |
🤝 Contributing
We welcome contributions once the project is ready for external input. To contribute:
- Fork: Create your own fork of the project
- Install: Run
poetry install(optionally with--with dev,cuda12) to get theai-hexcommand - Implement: Add your model in
results/your_model_name/ - Document: Include comprehensive docstrings and references
- Submit: Create a pull request following our guidelines
- Wait: CI will automatically evaluate your model and update the leaderboard
Use ai-hex tests list to see available tests, ai-hex tests show test_name to view test schema, and ai-hex suite run ./path/to/model.py to run your model against the suite.
🔧 Technical Stack: JAX and Flax
We chose JAX and Flax for their:
- 🧩 Functional Design: Clear architecture definitions with immutable state
- ⚡ Custom Operations: Comprehensive support through
jax.numpy - 🎯 Reproducibility: First-class random number handling
📝 Code Style: Using einops
We mandate einops for complex tensor operations to enhance readability. Compare:
# Traditional approach - hard to understand the transformation
x = x.reshape(batch, x.shape[1], x.shape[-2]*2, x.shape[-1]//2)
x = x.transpose(0, 2, 1, 3)
# Using einops - crystal clear intent
x = rearrange(x, 'b t (h d) c -> b (h t) (d c)')
📖 Example Model Implementation
import flax.linen as nn
from einops import rearrange
class Transformer(nn.Module):
"""
Transformer Decoder Stack architecture from 'Attention Is All You Need'.
Reference: https://arxiv.org/abs/1706.03762
"""
hidden_dim: int = 256
num_layers: int = 4
num_heads: int = 4
@nn.compact
def __call__(self, x):
# Architecture implementation
return x
🔍 Test Suite Configuration
Test suites use a JSON configuration format:
{
"name": "General 1M",
"description": "General architecture performance evaluation",
"metrics": [
{
"name": "Memory Capacity",
"description": "Information storage and recall capability",
"tests": [
{
"weight": 1.0,
"test": {
"name": "hash_map",
"seed": 0,
"key_length": 8,
"value_length": 64,
"num_pairs_range": [32, 65536],
"vocab_size": 1024
}
}
]
}
]
}
📈 Results are automatically generated via GitHub Actions to ensure fairness. The leaderboard is updated in real-time at ai-hexagon.dev.
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for ai-hexagon 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ai_hexagon-0.1.0.tar.gz | 11.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ai_hexagon-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.4 kB
Release files / ai_hexagon-0.1.0.tar.gz
| Download URL | ai_hexagon-0.1.0.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
929037d4a76131f2a726310f10b29b92dc469cd4e7141dab74412f96a0a24608
|
|
BLAKE2b-256 checksum How to use checksums |
46d68f6e396b5fadec514ff9f547f19f506d7ec8e2b47c5378d97ffe0ede268f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.12.7 Linux/6.11.6
|
Release files / ai_hexagon-0.1.0-py3-none-any.whl
| Download URL | ai_hexagon-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2b4034297565e7bd4afa527bccd9100f9ab95e8b4a4cbaf9a84332d4f2a64fc2
|
|
BLAKE2b-256 checksum How to use checksums |
33ae98e44ad386dc17cb32280cccf4eef507e09838cbb82c52d83db75b97a52e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.12.7 Linux/6.11.6
|
Security for ai-hexagon 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.