Views
No views yet
| Architecture | Model Class | Parameters | Distinct Features |
|---|---|---|---|
| Qwen3.5 (Transformer) | TransformerLM | 50.79M | 3:1 Gated DeltaNet / Gated Attention, Zero-Centered RMSNorm, Partial RoPE (0.25), Multi-Token Prediction (MTP) Head |
| HRM-Text | HRMLM | 49.02M | Dual-timescale H2L3 Recurrence, MagicNorm parameterless RMSNorm, PrefixLM masking, Warmup TBPTT ($2 \rightarrow 5$) |
| Mamba SSM | MambaLM | 49.47M | Selective State Space Model, dt_rank=32, S4D $A_{\text{log}}$, specialized log-uniform $\Delta$ initialization |
| Hybrid Mamba-Transformer | HybridMambaTransformerLM | 52.04M | Interleaved 2:1 Mamba to Qwen3.5 Attention, Unified SwiGLU FFN, Idempotent Depth-Scaling |
├── models/ # PyTorch architecture implementations
│ ├── transformer_lm.py # Qwen3.5 3:1 DeltaNet + Attention + MTP
│ ├── hrm_lm.py # HRM-Text H2L3 recurrence
│ ├── mamba_lm.py # Mamba selective SSM
│ └── hybrid_lm.py # Hybrid Mamba + Qwen attention
├── tokenizer/ # Amharic subword tokenizer
│ ├── vocab.txt
│ └── config.json
├── checkpoints/ # Best model weights for each architecture
│ ├── transformer/best_model.pt
│ ├── hrm/best_model.pt
│ ├── mamba/best_model.pt
│ └── hybrid/best_model.pt
└── analysis/ # Comparative benchmark results & plots
├── report.md
├── results_table.tex
├── loss_curves.png
├── throughput_scaling.png
└── pareto_frontier.png1import torch
2from models import create_model
3
4# Load model architecture
5model = create_model("transformer", vocab_size=3919)
6
7# Load checkpoint
8checkpoint = torch.load("checkpoints/transformer/best_model.pt", map_location="cpu")
9model.load_state_dict(checkpoint["model_state"], strict=False)
10model.eval()
11
12# Generate tokens
13tokens = torch.tensor([[2, 45, 128, 902]], dtype=torch.long)
14with torch.no_grad():
15 logits, _ = model(tokens)
16 next_token = torch.argmax(logits[:, -1, :], dim=-1)
17print("Next token ID:", next_token.item())