Views
No views yet
LlamaAttention layers replaced by HarmonicBlock, a
hierarchical state-space module. This removes TinyLlama's RoPE positional limit
(max_position_embeddings=2048): the unmodified model degrades catastrophically past
2K tokens, Hallamonic does not.Phase 2, full fine-tune, step 5000) from the
Harmonic paper: arxiv.org/abs/2606.24650.
See Omibranch/Harmonic for code and the
small-scale (7M-112M param) Harmonic results this architecture is based on.| Dataset | Seq len | Hallamonic (bpt) | TinyLlama (bpt) | Δ |
|---|---|---|---|---|
| WikiText-103 | 1,024 | 0.43 | 2.84 | +2.41 |
| WikiText-103 | 8,192 | 0.48 | 10.56 | +10.08 |
| Lambada (clean) | 1,024 | 0.44 | 4.29 | +3.86 |
| Lambada (clean) | 8,192 | 0.45 | 9.89 | +9.44 |
| fineweb-edu held-out | 1,024 | 0.36 | 3.37 | +3.00 |
| fineweb-edu held-out | 8,192 | 0.36 | 10.82 | +10.45 |
TinyLlama/TinyLlama-1.1B-Chat-v1.0 (892M params frozen: FFN + embeddings)d_state=128, compress ratio K=4)transformers model class. Load it with
the code in the Harmonic repo:1git clone https://github.com/Omibranch/Harmonic
2cd Harmonic/hallamonic1from huggingface_hub import snapshot_download
2from model import load_hallamonic
3
4ckpt = snapshot_download("Omibranch/harmonic-checkpoints-phase2-final")
5model, tokenizer = load_hallamonic(ckpt, device="cuda")
6model.eval()
7
8input_ids = tokenizer.encode("The theory of relativity states that", return_tensors="pt").to("cuda")
9out = model.generate(input_ids, max_new_tokens=150, do_sample=True, temperature=0.8, top_p=0.9)
10print(tokenizer.decode(out[0], skip_special_tokens=True))1@software{harmonic2026,
2 title = {Harmonic: Hierarchical State Space Models},
3 author = {Omibranch and {Harmonic Labs}},
4 year = {2026},
5 publisher = {Zenodo},
6 doi = {10.5281/zenodo.20381713},
7 url = {https://github.com/Omibranch/Harmonic}
8}