Genesis-152M-Instruct is an experimental small language model that combines recent advances in efficient attention mechanisms into a single architecture. It serves as a research platform for exploring:
Hybrid attention: Mixing O(n) linear attention with O(n²) softmax attention
Efficient inference: Sub-quadratic complexity for most layers
Adaptive computation: Test-time training for dynamic model adaptation
⚠️ Experimental Model: This is a research artifact, not a production-ready model. It demonstrates architectural innovations but has limitations typical of small models.
├── genesis_152m_instruct.safetensors # Model weights
├── README.md # This model card
└── LICENSE # Apache 2.0
Architecture Deep Dive
Genesis follows a "deep-and-thin" design philosophy inspired by SmolLM2 and MobileLLM, which has proven effective for small language models.
Core Configuration
Component
Value
Rationale
Layers
30
Deep architecture for better representation
Hidden Size
576
Optimal width for 150M scale
Attention Heads
9
Query heads
KV Heads
3
3:1 GQA ratio for memory efficiency
Head Dimension
64
Standard for efficient attention
FFN Size
1,440
2.5× expansion (SwiGLU-efficient)
Weight Tying
✓
Embeddings tied with LM head
Hybrid Attention Layout
Genesis employs a hybrid attention layout inspired by Qwen3-Next, alternating between linear and full attention:
Layer Distribution (30 layers):
├── 23 layers: GLA (Gated DeltaNet) - O(n) linear attention
└── 7 layers: FoX (Forgetting Attention) - O(n²) softmax with forget gate
Ratio: 75% Linear / 25% Full Attention
Why hybrid? Pure linear attention struggles with precise retrieval tasks (e.g., copying, in-context learning). Interleaving full attention layers restores this capability while maintaining overall efficiency.
📖 Reference: The hybrid approach is validated by Qwen3-Next (2025) and research showing that 3:1 to 6:1 linear-to-full ratios optimize the efficiency-quality tradeoff.
Gated DeltaNet (GLA)
The primary attention mechanism (75% of layers) is Gated DeltaNet, a state-of-the-art O(n) linear attention mechanism from NVIDIA.
1gla_expand_k:0.75# Key expansion ratio2gla_expand_v:1.5# Value expansion ratio (asymmetric)3gla_gate_fn:"swish"# Gating activation4gla_use_short_conv:True5gla_conv_size:46gla_chunk_size:64# For chunked parallel training7gla_use_delta_rule:True8gla_qk_norm:"l2"9gla_use_mamba_gate:True
Forgetting Attention (FoX)
The full attention layers (25%) use FoX (Forgetting Transformer), which augments standard softmax attention with a learnable forget gate.
Why FoX over Standard Attention?
Aspect
Standard Attention
FoX
Position Encoding
Requires RoPE/ALiBi
NoPE (implicit via forget gate)
Long-range Decay
Uniform attention
Data-dependent decay
Length Extrapolation
Poor
Better generalization
Mechanism
FoX modifies attention scores with cumulative forget gates:
Genesis includes an experimental TTT metacognition layer that adapts the model during inference.
Concept
Traditional models have fixed weights at inference. TTT layers have a small set of fast weights that update based on the input sequence, allowing the model to "learn" from context.
Standard: y = f(x; θ_fixed)
TTT: y = f(x; θ_fixed, θ_fast(x))
Implementation Details
Parameter
Value
Description
ttt_rank
4
Low-rank adaptation dimension
ttt_inner_lr
0.01
Learning rate for fast weights
ttt_mode
"dual"
Parallel dual-form computation
ttt_chunk_size
64
Chunking for efficiency
The "dual form" enables fully parallel gradient computation:
python
1# Instead of sequential updates:2# W_1 = W_0 - lr * grad_03# W_2 = W_1 - lr * grad_14# ...56# Dual form computes all at once:7# W_t = W_0 - lr * Σ_{i<t} grad_i (via cumsum)
Important: This is a regularization technique, not a speedup mechanism. Real sparse acceleration requires specialized kernels (e.g., Triton sparse GEMM).
📖 Related: ReLU Strikes Back (Apple, ICLR 2024) shows natural activation sparsity can be exploited for inference.
Additional Components
Grouped Query Attention (GQA)
Genesis uses 3:1 GQA (9 query heads, 3 KV heads) for memory efficiency during inference.
Note: With only 2B pre-training tokens (vs. 2T for SmolLM2), benchmarks primarily reflect architectural capacity rather than world knowledge.
Limitations
Known Issues
Hallucinations: Frequent factual errors due to limited pre-training data
Math: Unreliable arithmetic and multi-step reasoning
Instruction Following: Can be brittle with strict constraints
TTT Overhead: Metacognition layer adds latency (can be disabled)
Not Suitable For
Production deployments requiring reliability
Tasks requiring factual accuracy
Complex multi-step reasoning
Safety-critical applications
Best Use Cases
Architecture research and ablation studies
Efficient attention mechanism exploration
Small model behavior analysis
Educational purposes
Citation
If you use Genesis in your research, please cite:
bibtex
1@misc{genesis2025,
2 title={Genesis: A Hybrid Linear Attention Architecture for Small Language Models},
3 author={Ferrari Brescia, Guilherme},
4 year={2025},
5 url={https://huggingface.co/guiferrarib/genesis-152m-instruct}
6}
Related Papers
bibtex
1@inproceedings{yang2024gated,
2 title={Gated Delta Networks: Improving Mamba2 with Delta Rule},
3 author={Yang, Songlin and Wang, Bailin and Zhang, Yu and Shen, Yikang and Keutzer, Kurt},
4 booktitle={ICLR},
5 year={2025}
6}
78@inproceedings{lin2025forgetting,
9 title={Forgetting Transformer: Softmax Attention with a Forget Gate},
10 author={Lin, Zhixuan and others},
11 booktitle={ICLR},
12 year={2025}
13}
1415@inproceedings{sun2024learning,
16 title={Learning to (Learn at Test Time): RNNs with Expressive Hidden States},
17 author={Sun, Yu and others},
18 booktitle={ICML},
19 year={2024}
20}
2122@article{allal2025smollm2,
23 title={SmolLM2: When Smol Goes Big -- Data-Centric Training of a Small Language Model},
24 author={Allal, Loubna Ben and others},
25 journal={arXiv preprint arXiv:2502.02737},
26 year={2025}
27}