declare-lab / delta-mem_qwen3_4b-instruct

huggingface.co
Total runs: 0
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: May 14 2026
text-generation

Introduction of delta-mem_qwen3_4b-instruct

Model Details of delta-mem_qwen3_4b-instruct

δ-mem Qwen3-4B Instruct TSW Adapter

This repository contains the δ-mem TSW adapter for Qwen/Qwen3-4B-Instruct-2507 , as presented in the paper δ-mem: Efficient Online Memory for Large Language Models .

δ-mem is a lightweight online memory mechanism that augments a frozen backbone with a compact associative memory state. It projects context into a low-dimensional space and updates a state matrix via delta-rule learning, allowing for efficient long-term memory utilization without full fine-tuning or context extension.

Model Details
Item Value
Base model Qwen/Qwen3-4B-Instruct-2507
Adapter type Delta-Mem
Variant TSW, Token State Write
Write granularity token
Adapter rank 8
Delta heads q , o
Training setting Qasper multi-source memory training, write length 8192
Repository type Adapter checkpoint, not a merged base model
Usage

To use this adapter, you must first install the $\delta$-mem codebase:

git clone https://github.com/declare-lab/delta-Mem.git
cd delta-Mem
bash scripts/setup_uv_env.sh
Minimal Loading Example
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from deltamem.core import HFDeltaMemConfig, attach_delta_mem, load_delta_mem_adapter

base_model = "Qwen/Qwen3-4B-Instruct-2507"
adapter_dir = "declare-lab/delta-mem_qwen3_4b-instruct"

tokenizer = AutoTokenizer.from_pretrained(base_model)
model = AutoModelForCausalLM.from_pretrained(
    base_model,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)

config = HFDeltaMemConfig.from_pretrained(adapter_dir)
attach_delta_mem(model, config)
load_delta_mem_adapter(model, adapter_dir)
model.eval()
Important Notes

This is not a standard PEFT LoRA adapter and should not be loaded with PeftModel or merged with merge_and_unload() . δ-mem requires its specific runtime memory write/read path. To use this adapter, load the frozen base model, attach the modules, and then load the adapter weights using the provided codebase.

Citation
@misc{lei2026deltamemefficientonlinememory,
      title={$\delta$-mem: Efficient Online Memory for Large Language Models}, 
      author={Jingdi Lei and Di Zhang and Junxian Li and Weida Wang and Kaixuan Fan and Xiang Liu and Qihan Liu and Xiaoteng Ma and Baian Chen and Soujanya Poria},
      year={2026},
      eprint={2605.12357},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2605.12357}, 
}

Runs of declare-lab delta-mem_qwen3_4b-instruct on huggingface.co

0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About delta-mem_qwen3_4b-instruct huggingface.co Model

More delta-mem_qwen3_4b-instruct license Visit here:

https://choosealicense.com/licenses/cc-by-4.0

delta-mem_qwen3_4b-instruct huggingface.co

delta-mem_qwen3_4b-instruct huggingface.co is an AI model on huggingface.co that provides delta-mem_qwen3_4b-instruct's model effect (), which can be used instantly with this declare-lab delta-mem_qwen3_4b-instruct model. huggingface.co supports a free trial of the delta-mem_qwen3_4b-instruct model, and also provides paid use of the delta-mem_qwen3_4b-instruct. Support call delta-mem_qwen3_4b-instruct model through api, including Node.js, Python, http.

delta-mem_qwen3_4b-instruct huggingface.co Url

https://huggingface.co/declare-lab/delta-mem_qwen3_4b-instruct

declare-lab delta-mem_qwen3_4b-instruct online free

delta-mem_qwen3_4b-instruct huggingface.co is an online trial and call api platform, which integrates delta-mem_qwen3_4b-instruct's modeling effects, including api services, and provides a free online trial of delta-mem_qwen3_4b-instruct, you can try delta-mem_qwen3_4b-instruct online for free by clicking the link below.

declare-lab delta-mem_qwen3_4b-instruct online free url in huggingface.co:

https://huggingface.co/declare-lab/delta-mem_qwen3_4b-instruct

delta-mem_qwen3_4b-instruct install

delta-mem_qwen3_4b-instruct is an open source model from GitHub that offers a free installation service, and any user can find delta-mem_qwen3_4b-instruct on GitHub to install. At the same time, huggingface.co provides the effect of delta-mem_qwen3_4b-instruct install, users can directly use delta-mem_qwen3_4b-instruct installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

delta-mem_qwen3_4b-instruct install url in huggingface.co:

https://huggingface.co/declare-lab/delta-mem_qwen3_4b-instruct

Url of delta-mem_qwen3_4b-instruct

delta-mem_qwen3_4b-instruct huggingface.co Url

Provider of delta-mem_qwen3_4b-instruct huggingface.co

declare-lab
ORGANIZATIONS

Other API from declare-lab

huggingface.co

Total runs: 4.1K
Run Growth: 2.7K
Growth Rate: 65.04%
Updated:December 17 2023
huggingface.co

Total runs: 223
Run Growth: -399
Growth Rate: -178.92%
Updated:August 28 2025
huggingface.co

Total runs: 170
Run Growth: -212
Growth Rate: -124.71%
Updated:August 28 2025
huggingface.co

Total runs: 103
Run Growth: 49
Growth Rate: 47.57%
Updated:January 28 2025
huggingface.co

Total runs: 88
Run Growth: 24
Growth Rate: 27.27%
Updated:January 18 2026
huggingface.co

Total runs: 87
Run Growth: -13
Growth Rate: -14.94%
Updated:August 01 2025
huggingface.co

Total runs: 51
Run Growth: -4
Growth Rate: -7.84%
Updated:January 18 2026
huggingface.co

Total runs: 49
Run Growth: 0
Growth Rate: 0.00%
Updated:December 11 2025
huggingface.co

Total runs: 17
Run Growth: 1
Growth Rate: 5.88%
Updated:October 24 2022