π G-SSM mNIAH Solver (Official Checkpoint)
This repository contains a Geodesic State Space Model (G-SSM) optimized for the Multi-Needle-in-a-Haystack (mNIAH) retrieval task.
π Highlights
- Architecture: Geodesic State Space Model (G-SSM).
- Parameters: 8,109 (PyTorch verified).
- Scalability: Verified 100% accuracy up to 32,000 tokens context.
- Inference Efficiency: Constant $O(1)$ VRAM.
π‘ Technical Note on $K$: This model is trained for exactly $K=2$ needles. Its deterministic behavior (no hallucination of state changes) is a direct result of geodesic integration. Variable $K$ support is a matter of training curriculum, not architectural limitation.
π¬ Scientific Significance
This model solves the Multi-Needle retrieval task using only 8,109 parameters, demonstrating that long-term dependencies can be integrated into a physical state through geodetic flow rather than quadratic self-attention. This represents a ~100x parameter reduction compared to Transformer baselines solving similar context lengths.
π» Technical Usage (Inference)
To run inference locally, you need the GFN Framework installed.
1. Install GFN Framework
pip install gfn
2. Clone this repository
git lfs install
git clone https://huggingface.co/DepthMuun/gfn-gssm-mniah-k2
cd gfn-gssm-mniah-k2
3. Run Inference Script
Use the included inference.py script to test sequence retrieval:
python inference.py
Python API Example
As shown in inference.py, use the gssm high-level API:
import torch
from gfn import gssm
# Load model (automatically detects config.json)
model = gssm.load("mniah_model_final.pt", device="cpu")
model.eval()
# Sequence test
# Model returns (logits, state, info)
logits, _, _ = model(sequence)
# Geometric decoding logic is detailed in inference.py
π Citation
If you use this work, please cite:
@article{sturtz2026geometry,
title={Geometric Flow Networks: A Physics-Informed Paradigm for Sequential Intelligence},
author={StΓΌrtz, JoaquΓn},
journal={Zenodo Preprints},
year={2026},
doi={10.5281/zenodo.19141133},
url={https://doi.org/10.5281/zenodo.19141133}
}
π Resources
- Interactive Demo: Hugging Face Space
- Framework Source: GitHub: DepthMuun/gfn
- Official Paper: Zenodo
- Downloads last month
- 73
Evaluation results
- Accuracy on synthetic-needle-haystackself-reported100.000