Update metadata: add pipeline tag and library name, remove arxiv tag
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,102 +1,103 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
-
|
| 9 |
-
-
|
| 10 |
-
-
|
| 11 |
-
-
|
| 12 |
-
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
[](https://huggingface.co/SpeedAI-Lab/DAMI/blob/main/LICENSE)
|
| 20 |
+
[](https://arxiv.org/abs/2610.41994)
|
| 21 |
+
[](https://github.com/SpeedAI-Lab/DAMI)
|
| 22 |
+
[](https://huggingface.co/SpeedAI-Lab/DAMI)
|
| 23 |
+
|
| 24 |
+
</div>
|
| 25 |
+
|
| 26 |
+
Zhangchi Feng · Harry Jiang · Yangyifei Luo · Ray Zhang · Richong Zhang
|
| 27 |
+
|
| 28 |
+
[Project page](https://speedai.com/research/dami) · [Code, evaluation data and scripts](https://cnb.cool/speed-ai/research/DAMI)
|
| 29 |
+
|
| 30 |
+
DAMI allocates memory timescales across heads and input responses across layers to improve long-context retrieval. This repository contains the 15 paper checkpoints: five architectures (GDN, KDA, GDN2, Mamba-2, RWKV-7) with three initialization conditions (Random, PoST, DAMI). Each model has approximately 100M parameters and was trained for approximately 5B tokens with a 4096-token training context.
|
| 31 |
+
|
| 32 |
+
## Checkpoints
|
| 33 |
+
|
| 34 |
+
All checkpoints are stored under `checkpoints/`, using the directory names below. Each directory contains the full model weights (`model.safetensors`), `config.json`, `generation_config.json`, `tokenizer.json`, and `tokenizer_config.json`.
|
| 35 |
+
|
| 36 |
+
| Architecture | Random | PoST | DAMI |
|
| 37 |
+
| --- | --- | --- | --- |
|
| 38 |
+
| GDN | `main_gdn_random` | `main_gdn_PoST` | `main_gdn_DAMI` |
|
| 39 |
+
| KDA | `main_kda_random` | `main_kda_PoST` | `main_kda_DAMI` |
|
| 40 |
+
| GDN2 | `main_gdn2_random` | `main_gdn2_PoST` | `main_gdn2_DAMI` |
|
| 41 |
+
| Mamba-2 | `main_mamba2_random` | `main_mamba2_PoST` | `main_mamba2_DAMI` |
|
| 42 |
+
| RWKV-7 | `main_rwkv7_random` | `main_rwkv7_PoST` | `main_rwkv7_DAMI` |
|
| 43 |
+
|
| 44 |
+
## Download and evaluation
|
| 45 |
+
|
| 46 |
+
Clone the code repository and install its dependencies as described in its README. From the code repository root, download the checkpoints:
|
| 47 |
+
|
| 48 |
+
```python
|
| 49 |
+
from huggingface_hub import snapshot_download
|
| 50 |
+
|
| 51 |
+
snapshot_download(
|
| 52 |
+
repo_id="SpeedAI-Lab/DAMI",
|
| 53 |
+
local_dir=".",
|
| 54 |
+
allow_patterns=["checkpoints/**"],
|
| 55 |
+
)
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
To download only GDN + DAMI, use `allow_patterns=["checkpoints/main_gdn_DAMI/*"]`. Access to this repository requires authentication while it is private.
|
| 59 |
+
|
| 60 |
+
Run all 15 checkpoints on the fixed RULER evaluation data in Linux/WSL with CUDA:
|
| 61 |
+
|
| 62 |
+
```bash
|
| 63 |
+
python evaluate_ruler.py --preflight --all --models-root checkpoints
|
| 64 |
+
python evaluate_ruler.py --all --models-root checkpoints \
|
| 65 |
+
--output-dir outputs/ruler-retest --skip-done
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
For a single checkpoint, replace `--all` with `--architecture gdn --initialization dami`. The evaluator includes the architecture-specific FLA and RWKV adaptations required by these checkpoints; use the provided loading path for evaluation.
|
| 69 |
+
|
| 70 |
+
The code repository includes 5,500 fixed samples across 11 RULER task/length settings and 82,500 original predictions. Evaluation uses greedy decoding with up to 128 new tokens. Scores use case-insensitive answer containment; the average weights all 11 settings equally.
|
| 71 |
+
|
| 72 |
+
## RULER results
|
| 73 |
+
|
| 74 |
+
Average accuracy (%), as reported in the paper:
|
| 75 |
+
|
| 76 |
+
| Architecture | Random | PoST | DAMI |
|
| 77 |
+
| --- | ---: | ---: | ---: |
|
| 78 |
+
| GDN | 30.42 | 33.49 | 44.36 |
|
| 79 |
+
| KDA | 26.38 | 33.67 | 43.09 |
|
| 80 |
+
| GDN2 | 30.27 | 33.47 | 43.71 |
|
| 81 |
+
| Mamba-2 | 9.95 | 13.73 | 24.42 |
|
| 82 |
+
| RWKV-7 | 23.87 | 20.69 | 29.16 |
|
| 83 |
+
|
| 84 |
+
## Citation
|
| 85 |
+
|
| 86 |
+
```bibtex
|
| 87 |
+
@article{feng2026dami,
|
| 88 |
+
title={DAMI: Dual-Axis Memory Initialization for Enhanced Long-Context Retrieval in Gated Linear Attention},
|
| 89 |
+
author={Feng, Zhangchi and Jiang, Harry and Luo, Yangyifei and Zhang, Ray and Zhang, Richong},
|
| 90 |
+
journal={arXiv preprint arXiv:2610.41994},
|
| 91 |
+
year={2026}
|
| 92 |
+
}
|
| 93 |
+
```
|
| 94 |
+
|
| 95 |
+
## Acknowledgement
|
| 96 |
+
|
| 97 |
+
We thank the authors and developers of [FLA](https://github.com/fla-org/flash-linear-attention), [RWKV](https://github.com/BlinkDL/RWKV-LM), [GatedDeltaNet](https://github.com/NVlabs/GatedDeltaNet), [GatedDeltaNet-2](https://github.com/NVlabs/GatedDeltaNet-2), [Kimi-Linear](https://github.com/MoonshotAI/Kimi-Linear), and [Mamba](https://github.com/state-spaces/mamba) for their contributions to the architectures and implementations used in this work. We also thank [Transformers](https://github.com/huggingface/transformers) and [FLAME](https://github.com/fla-org/flame) for their training infrastructure.
|
| 98 |
+
|
| 99 |
+
Our retrieval evaluation uses [RULER](https://github.com/NVIDIA/RULER). Benchmark attribution and data notices are provided in [data/ruler/NOTICE.md](https://github.com/SpeedAI-Lab/DAMI/blob/main/data/ruler/NOTICE.md). We thank the authors and developers for making their work available. Please cite the corresponding papers when using these resources.
|
| 100 |
+
|
| 101 |
+
## License
|
| 102 |
+
|
| 103 |
+
These checkpoints are released under the MIT License. See the LICENSE file. Benchmark attribution and data notices are provided in the code repository.
|