Commit ·
9cbcf1a
0
Parent(s):
Integral DeltaNet checkpoints
Browse filesFiles changed (21)
- .gitattributesAdded+36
- README.mdAdded+82
- assets/integral_deltanet.pngAdded
- configs/models/gdn2-1.3b.yamlAdded+30
- configs/models/gdn2-340m.yamlAdded+29
- configs/models/integral-gdn2-1.3b.yamlAdded+50
- configs/models/integral-gdn2-340m.yamlAdded+49
- configs/models/integral-kda-1.3b.yamlAdded+52
- configs/models/integral-kda-340m.yamlAdded+51
- configs/models/kda-1.3b.yamlAdded+32
- configs/models/kda-340m.yamlAdded+31
- configs/training/1.3b.yamlAdded+33
- configs/training/340m.yamlAdded+33
- gdn2-1.3b.ptAdded+3
- gdn2-340m.ptAdded+3
- integral-gdn2-1.3b.ptAdded+3
- integral-gdn2-340m.ptAdded+3
- integral-kda-1.3b.ptAdded+3
- integral-kda-340m.ptAdded+3
- kda-1.3b.ptAdded+3
- kda-340m.ptAdded+3
123456789101112131415161718192021222324252627282930313233343536*.7z filter=lfs diff=lfs merge=lfs -text*.arrow filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.bz2 filter=lfs diff=lfs merge=lfs -text*.ckpt filter=lfs diff=lfs merge=lfs -text*.ftz filter=lfs diff=lfs merge=lfs -text*.gz filter=lfs diff=lfs merge=lfs -text*.h5 filter=lfs diff=lfs merge=lfs -text*.joblib filter=lfs diff=lfs merge=lfs -text*.lfs.* filter=lfs diff=lfs merge=lfs -text*.mlmodel filter=lfs diff=lfs merge=lfs -text*.model filter=lfs diff=lfs merge=lfs -text*.msgpack filter=lfs diff=lfs merge=lfs -text*.npy filter=lfs diff=lfs merge=lfs -text*.npz filter=lfs diff=lfs merge=lfs -text*.onnx filter=lfs diff=lfs merge=lfs -text*.ot filter=lfs diff=lfs merge=lfs -text*.parquet filter=lfs diff=lfs merge=lfs -text*.pb filter=lfs diff=lfs merge=lfs -text*.pickle filter=lfs diff=lfs merge=lfs -text*.pkl filter=lfs diff=lfs merge=lfs -text*.pt filter=lfs diff=lfs merge=lfs -text*.pth filter=lfs diff=lfs merge=lfs -text*.rar filter=lfs diff=lfs merge=lfs -text*.safetensors filter=lfs diff=lfs merge=lfs -textsaved_model/**/* filter=lfs diff=lfs merge=lfs -text*.tar.* filter=lfs diff=lfs merge=lfs -text*.tar filter=lfs diff=lfs merge=lfs -text*.tflite filter=lfs diff=lfs merge=lfs -text*.tgz filter=lfs diff=lfs merge=lfs -text*.wasm filter=lfs diff=lfs merge=lfs -text*.xz filter=lfs diff=lfs merge=lfs -text*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textassets/integral_deltanet.png filter=lfs diff=lfs merge=lfs -text12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182---license: mitpipeline_tag: text-generationdatasets: - HuggingFaceFW/fineweb-edulanguage: - entags: - linear-attention - deltanet---
# Integral DeltaNet: Improved Linear Attention with Adaptive Memory Integration
Official checkpoints of **Integral DeltaNet: Improved Linear Attention withAdaptive Memory Integration**.
[Junsoo Oh](https://junsoo424.github.io/), [Jihun Yun](https://abcdxyzpqrst.github.io/),[Junhyuck Kim](https://jhyuckkim.github.io/), [Hanbaek Lyu](https://www.hanbaeklyu.com/)
Code: [junsoo424/Integral-DeltaNet](https://github.com/junsoo424/Integral-DeltaNet)
<p align="center"> <img src="https://huggingface.co/jsjs424/Integral-DeltaNet/resolve/main/assets/integral_deltanet.png" width="85%" alt="Integral DeltaNet: an integral state accumulates a weighted history of delta states, and a gated readout combines both"></p>
Linear attention compresses the past into a fixed-size state, which causesmemory collisions. Delta-rule updates and gating reduce them, but they can alsodiscard information that a later query still needs. Integral DeltaNet uses twostates operating at different timescales: a fast **delta state** \\(S_t\\),updated using an expressive linear-attention rule such as KDA or GDN-2, and aslow **integral state** \\(X_t\\), which maintains a channel-wise weightedhistory of past delta states. The model adaptively combines the two states atreadout:
$$X_t = S_t\,\mathrm{Diag}(\lambda_t) + X_{t-1}\,\mathrm{Diag}(1-\lambda_t), \qquad o_t = S_t(\gamma_t \odot q_t) + X_t\big((1-\gamma_t) \odot q_t\big)$$
Here \\(o_t\\) is the layer output for the query \\(q_t\\). The integrationrate \\(\lambda_t\\) and the readout gate \\(\gamma_t\\) are per-channel gatescomputed from the input.
## Checkpoints
| Model | 340M (15B tokens) | 1.3B (100B tokens) ||---|---|---|| Integral KDA | `integral-kda-340m.pt` | `integral-kda-1.3b.pt` || Integral GDN-2 | `integral-gdn2-340m.pt` | `integral-gdn2-1.3b.pt` || KDA | `kda-340m.pt` | `kda-1.3b.pt` || GDN-2 | `gdn2-340m.pt` | `gdn2-1.3b.pt` |
All models are trained from scratch on FineWeb-Edu with the Llama 2 tokenizerand a 4K context. Each Integral model matches its backbone in non-embeddingparameters.
- `configs/models/<name>.yaml`: the architecture of `<name>.pt`. The same config is stored in the file under `"model_config"`.- `configs/training/340m.yaml`, `configs/training/1.3b.yaml`: the training recipes (AdamW, 0.5M-token batches, cosine decay from 4e-4 to 4e-5, 8 GPUs).
Each file holds bf16 weights. Load one with the code from GitHub:
```pythonimport torchfrom huggingface_hub import hf_hub_downloadfrom integral_deltanet.model import CausalLM
payload = torch.load(hf_hub_download("jsjs424/Integral-DeltaNet", "integral-kda-1.3b.pt"), map_location="cpu", weights_only=True)model = CausalLM(payload["model_config"])model.load_state_dict(payload["model"])```
## Citation
```bibtex@article{oh2026integral, title = {Integral DeltaNet: Improved Linear Attention with Adaptive Memory Integration}, author = {Oh, Junsoo and Yun, Jihun and Kim, Junhyuck and Lyu, Hanbaek}, journal = {arXiv preprint}, year = {2026}}```123456789101112131415161718192021222324252627282930# GDN-2 1.3B: 18 layers x 2304, trained on 100B FineWeb-Edu tokens.# Weights: gdn2-1.3b.pt. Training recipe: configs/training/1.3b.yaml.
# Backbonemodel_type: gdn2scale: 1.3bvocab_size: 32000hidden_size: 2304num_hidden_layers: 18intermediate_size: 6208norm_eps: 1.0e-05reference_shape: true # the GDN-2 reference 1.3B shape: 16 x 128 heads on a 2304-wide model
# Token mixer (GDN-2)num_heads: 16head_dim: 128expand_v: 1num_v_heads: nullattn_mode: chunkuse_short_conv: trueconv_size: 4allow_neg_eigval: falseoutput_gate: paper_swish_rmsnorm
# Kernels and runtime (speed and memory only; the weights do not depend on them)gradient_checkpointing: true
# Parameter counts, checked when the model is builtexpected_body_parameters: 1302640416expected_parameters: 14500964161234567891011121314151617181920212223242526272829# GDN-2 340M: 12 layers x 1536, trained on 15B FineWeb-Edu tokens.# Weights: gdn2-340m.pt. Training recipe: configs/training/340m.yaml.
# Backbonemodel_type: gdn2scale: 340mvocab_size: 32000hidden_size: 1536num_hidden_layers: 12intermediate_size: 2896norm_eps: 1.0e-05
# Token mixer (GDN-2)num_heads: 12head_dim: 128expand_v: 1num_v_heads: nullattn_mode: chunkuse_short_conv: trueconv_size: 4allow_neg_eigval: falseoutput_gate: paper_swish_rmsnorm
# Kernels and runtime (speed and memory only; the weights do not depend on them)gradient_checkpointing: true
# Parameter counts, checked when the model is builtexpected_body_parameters: 339741840expected_parameters: 4380458401234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950# Integral GDN-2 1.3B: 18 layers x 2304, trained on 100B FineWeb-Edu tokens.# Weights: integral-gdn2-1.3b.pt. Training recipe: configs/training/1.3b.yaml.
# Backbonemodel_type: gdn2scale: 1.3bvocab_size: 32000hidden_size: 2304num_hidden_layers: 18intermediate_size: 6048norm_eps: 1.0e-05reference_shape: true # the GDN-2 reference 1.3B shape: 16 x 128 heads on a 2304-wide model
# Token mixer (GDN-2)num_heads: 16head_dim: 128expand_v: 1num_v_heads: nullattn_mode: chunkuse_short_conv: trueconv_size: 4allow_neg_eigval: falseoutput_gate: paper_swish_rmsnorm
# Integral DeltaNet layermixer_implementation: integralintegration_readout_gate: trueintegration_gate_coupling: independentintegration_gamma_gate: channelintegration_lambda_gate: channelintegration_gamma_rank: 128integration_gate_mode: learnedintegration_gate_bias_init: timescaleintegration_chi_min: 4.0integration_tau_gamma: 1024.0integration_tau_lambda: 1024.0
# Kernels and runtime (speed and memory only; the weights do not depend on them)chunk_size: 32kernel_implementation: tritoncompile_precompute: falseallow_approximate_fusions: falsefuse_qkv_conv: truefuse_preprocess: falsefuse_decay_gate: falsegradient_checkpointing: true
# Parameter counts, checked when the model is builtexpected_body_parameters: 1302861600expected_parameters: 145031760012345678910111213141516171819202122232425262728293031323334353637383940414243444546474849# Integral GDN-2 340M: 12 layers x 1536, trained on 15B FineWeb-Edu tokens.# Weights: integral-gdn2-340m.pt. Training recipe: configs/training/340m.yaml.
# Backbonemodel_type: gdn2scale: 340mvocab_size: 32000hidden_size: 1536num_hidden_layers: 12intermediate_size: 2728norm_eps: 1.0e-05
# Token mixer (GDN-2)num_heads: 12head_dim: 128expand_v: 1num_v_heads: nullattn_mode: chunkuse_short_conv: trueconv_size: 4allow_neg_eigval: falseoutput_gate: paper_swish_rmsnorm
# Integral DeltaNet layermixer_implementation: integralintegration_readout_gate: trueintegration_gate_coupling: independentintegration_gamma_gate: channelintegration_lambda_gate: channelintegration_gamma_rank: 128integration_gate_mode: learnedintegration_gate_bias_init: timescaleintegration_chi_min: 4.0integration_tau_gamma: 1024.0integration_tau_lambda: 1024.0
# Kernels and runtime (speed and memory only; the weights do not depend on them)chunk_size: 16kernel_implementation: autocompile_precompute: trueallow_approximate_fusions: truefuse_qkv_conv: truefuse_preprocess: falsefuse_decay_gate: truegradient_checkpointing: true
# Parameter counts, checked when the model is builtexpected_body_parameters: 339926160expected_parameters: 43823016012345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152# Integral KDA 1.3B: 18 layers x 2304, trained on 100B FineWeb-Edu tokens.# Weights: integral-kda-1.3b.pt. Training recipe: configs/training/1.3b.yaml.
# Backbonemodel_type: kdascale: 1.3bvocab_size: 32000hidden_size: 2304num_hidden_layers: 18intermediate_size: 7408norm_eps: 1.0e-05reference_shape: true # the GDN-2 reference 1.3B shape: 16 x 128 heads on a 2304-wide model
# Token mixer (KDA)num_heads: 16head_dim: 128expand_v: 1num_v_heads: nullattn_mode: chunkuse_short_conv: trueconv_size: 4allow_neg_eigval: falseoutput_gate: builtin_sigmoid_rmsnormsafe_gate: falselower_bound: null
# Integral DeltaNet layermixer_implementation: integralintegration_readout_gate: trueintegration_gate_coupling: independentintegration_gamma_gate: channelintegration_lambda_gate: channelintegration_gamma_rank: 128integration_gate_mode: learnedintegration_gate_bias_init: timescaleintegration_chi_min: 4.0integration_tau_gamma: 1024.0integration_tau_lambda: 1024.0
# Kernels and runtime (speed and memory only; the weights do not depend on them)chunk_size: 32kernel_implementation: tritoncompile_precompute: falseallow_approximate_fusions: falsefuse_qkv_conv: truefuse_preprocess: falsefuse_decay_gate: falsegradient_checkpointing: true
# Parameter counts, checked when the model is builtexpected_body_parameters: 1302861600expected_parameters: 1450317600123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051# Integral KDA 340M: 12 layers x 1536, trained on 15B FineWeb-Edu tokens.# Weights: integral-kda-340m.pt. Training recipe: configs/training/340m.yaml.
# Backbonemodel_type: kdascale: 340mvocab_size: 32000hidden_size: 1536num_hidden_layers: 12intermediate_size: 3744norm_eps: 1.0e-05
# Token mixer (KDA)num_heads: 12head_dim: 128expand_v: 1num_v_heads: nullattn_mode: chunkuse_short_conv: trueconv_size: 4allow_neg_eigval: falseoutput_gate: builtin_sigmoid_rmsnormsafe_gate: falselower_bound: null
# Integral DeltaNet layermixer_implementation: integralintegration_readout_gate: trueintegration_gate_coupling: independentintegration_gamma_gate: channelintegration_lambda_gate: channelintegration_gamma_rank: 128integration_gate_mode: learnedintegration_gate_bias_init: timescaleintegration_chi_min: 4.0integration_tau_gamma: 1024.0integration_tau_lambda: 1024.0
# Kernels and runtime (speed and memory only; the weights do not depend on them)chunk_size: 16kernel_implementation: autocompile_precompute: trueallow_approximate_fusions: truefuse_qkv_conv: truefuse_preprocess: falsefuse_decay_gate: truegradient_checkpointing: true
# Parameter counts, checked when the model is builtexpected_body_parameters: 339704976expected_parameters: 4380089761234567891011121314151617181920212223242526272829303132# KDA 1.3B: 18 layers x 2304, trained on 100B FineWeb-Edu tokens.# Weights: kda-1.3b.pt. Training recipe: configs/training/1.3b.yaml.
# Backbonemodel_type: kdascale: 1.3bvocab_size: 32000hidden_size: 2304num_hidden_layers: 18intermediate_size: 7568norm_eps: 1.0e-05reference_shape: true # the GDN-2 reference 1.3B shape: 16 x 128 heads on a 2304-wide model
# Token mixer (KDA)num_heads: 16head_dim: 128expand_v: 1num_v_heads: nullattn_mode: chunkuse_short_conv: trueconv_size: 4allow_neg_eigval: falseoutput_gate: builtin_sigmoid_rmsnormsafe_gate: falselower_bound: null
# Kernels and runtime (speed and memory only; the weights do not depend on them)gradient_checkpointing: true
# Parameter counts, checked when the model is builtexpected_body_parameters: 1302640416expected_parameters: 145009641612345678910111213141516171819202122232425262728293031# KDA 340M: 12 layers x 1536, trained on 15B FineWeb-Edu tokens.# Weights: kda-340m.pt. Training recipe: configs/training/340m.yaml.
# Backbonemodel_type: kdascale: 340mvocab_size: 32000hidden_size: 1536num_hidden_layers: 12intermediate_size: 3920norm_eps: 1.0e-05
# Token mixer (KDA)num_heads: 12head_dim: 128expand_v: 1num_v_heads: nullattn_mode: chunkuse_short_conv: trueconv_size: 4allow_neg_eigval: falseoutput_gate: builtin_sigmoid_rmsnormsafe_gate: falselower_bound: null
# Kernels and runtime (speed and memory only; the weights do not depend on them)gradient_checkpointing: true
# Parameter counts, checked when the model is builtexpected_body_parameters: 339963024expected_parameters: 438267024123456789101112131415161718192021222324252627282930313233# Training recipe for the 1.3B models: 100B tokens, 8 GPUs, 0.5M-token batches.data: dataset: HuggingFaceFW/fineweb-edu dataset_config: sample-100BT tokenizer: meta-llama/Llama-2-7b-hf sequence_length: 4096 shuffle_buffer: 10000 document_separator: bos # <s> before every document
optimization: target_tokens: 100000000000 max_steps: 190735 warmup_steps: 1907 peak_lr: 0.0004 min_lr: 0.00004 betas: [0.9, 0.95] eps: 1.0e-8 weight_decay: 0.1 max_grad_norm: 1.0
runtime: precision: bf16 expected_world_size: 8 micro_batch_size: 4 gradient_accumulation_steps: 4 global_batch_tokens: 524288 num_workers: 0 seed: 42 log_every: 10
checkpoint: save_every: 1000 keep_last: 2123456789101112131415161718192021222324252627282930313233# Training recipe for the 340M models: 15B tokens, 8 GPUs, 0.5M-token batches.data: dataset: HuggingFaceFW/fineweb-edu dataset_config: sample-100BT tokenizer: meta-llama/Llama-2-7b-hf sequence_length: 4096 shuffle_buffer: 10000 document_separator: bos # <s> before every document
optimization: target_tokens: 15000000000 max_steps: 28610 warmup_steps: 954 peak_lr: 0.0004 min_lr: 0.00004 betas: [0.9, 0.95] eps: 1.0e-8 weight_decay: 0.1 max_grad_norm: 1.0
runtime: precision: bf16 expected_world_size: 8 micro_batch_size: 8 gradient_accumulation_steps: 2 global_batch_tokens: 524288 num_workers: 0 seed: 42 log_every: 10
checkpoint: save_every: 1000 keep_last: 2123version https://git-lfs.github.com/spec/v1oid sha256:814b9d9de4ab9ef65d3d34da4c66da3f36e6c70007db98612b5840a6d44f5109size 2900318026123version https://git-lfs.github.com/spec/v1oid sha256:cb4a9f619fd381017248d4db3a4b8e6b4de64bb6ed482cba3da984f1f067e695size 876175806123version https://git-lfs.github.com/spec/v1oid sha256:1cdb6217b06b0cebef004f73121ccd02a284ee39d8d5e8d80ac48f1bce5af113size 2900820831123version https://git-lfs.github.com/spec/v1oid sha256:a29b77a2b0aae7f0a986c0d6104eed78d3d7728ce1a1fb4bb05c13c9c418e957size 876584999123version https://git-lfs.github.com/spec/v1oid sha256:d7eb85e69ea85762ed30f3037aa1e6883113df7e7be9cc319c1210449bfdba5dsize 2900814370123version https://git-lfs.github.com/spec/v1oid sha256:fa9e7ab0ba7b64591c1c01fb52204e12a7e23b85dc4e90d119ce0a430836c897size 876138342123version https://git-lfs.github.com/spec/v1oid sha256:22d40182fd06d5f5d80b42eaccfacb4f7b62cb6534138345c0bd13c4945bedb2size 2900311953123version https://git-lfs.github.com/spec/v1oid sha256:7b37a7d0f74137939840faf5efa91158e8b75c399fa359ea9d8e84dfc1c199c0size 876614165.gitattributesAdded+36
README.mdAdded+82
assets/integral_deltanet.pngAdded

Large File Pointer Details
- SHA256: 9620100708a16f8845cacbb8eded850a21ef0be8f8dbf6f6cef0ad103c04f5cf
- Pointer size: 131 Bytes
- Size of remote file: 105 kB
configs/models/gdn2-1.3b.yamlAdded+30
configs/models/gdn2-340m.yamlAdded+29
configs/models/integral-gdn2-1.3b.yamlAdded+50
configs/models/integral-gdn2-340m.yamlAdded+49
configs/models/integral-kda-1.3b.yamlAdded+52
configs/models/integral-kda-340m.yamlAdded+51
configs/models/kda-1.3b.yamlAdded+32
configs/models/kda-340m.yamlAdded+31
configs/training/1.3b.yamlAdded+33
configs/training/340m.yamlAdded+33
gdn2-1.3b.ptAdded+3
gdn2-340m.ptAdded+3
integral-gdn2-1.3b.ptAdded+3
integral-gdn2-340m.ptAdded+3
integral-kda-1.3b.ptAdded+3
integral-kda-340m.ptAdded+3
kda-1.3b.ptAdded+3
kda-340m.ptAdded+3