Run this model with HF Jobs
Run ofthetrees/delta-mem-qwen3-4b-instruct-mlx-adapter on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/ofthetrees/delta-mem-qwen3-4b-instruct-mlx-adapter. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/ofthetrees/delta-mem-qwen3-4b-instruct-mlx-adapter on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/ofthetrees/delta-mem-qwen3-4b-instruct-mlx-adapter. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/ofthetrees/delta-mem-qwen3-4b-instruct-mlx-adapter. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use ofthetrees/delta-mem-qwen3-4b-instruct-mlx-adapter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use ofthetrees/delta-mem-qwen3-4b-instruct-mlx-adapter with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("ofthetrees/delta-mem-qwen3-4b-instruct-mlx-adapter") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use ofthetrees/delta-mem-qwen3-4b-instruct-mlx-adapter with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "ofthetrees/delta-mem-qwen3-4b-instruct-mlx-adapter" --prompt "Once upon a time"
- Atomic Chat
δ-mem Qwen3-4B Instruct MLX Adapter
This repository contains an MLX-converted copy of the public δ-mem TSW adapter for Qwen/Qwen3-4B-Instruct-2507.
δ-mem is an online memory mechanism for frozen LLMs. It adds a compact memory path that writes earlier context into a small online state and reads that state back through attention during later generation. This is an adapter artifact, not a merged base model.
Files
delta_mem_adapter_mlx.npz: MLX-converted adapter weights.delta_mem_config.json: δ-mem adapter configuration copied from the upstream adapter repo.conversion_info.json: provenance for this conversion package.
Provenance
- Paper: https://arxiv.org/abs/2605.12357
- Hugging Face paper page: https://huggingface.co/papers/2605.12357
- Upstream Torch adapter: https://huggingface.co/declare-lab/delta-mem_qwen3_4b-instruct
- Upstream adapter commit:
c46dc31155608e412d44bf56638d5a6f856f2e7e - Base model: https://huggingface.co/Qwen/Qwen3-4B-Instruct-2507
- My MLX Sidecar repo: https://github.com/elimaine/delta-mem-mlx-sidecar
- My Openclaw integrated plugin: https://clawhub.ai/plugins/@elimaine/openclaw-delta-mem-mlx
Runtime
This adapter is intended for the δ-mem MLX sidecar runtime, not stock mlx_lm.load(). Use it with a compatible MLX Qwen3-4B backbone and a δ-mem-aware attention/runtime implementation.
Example environment shape:
DELTA_MEM_RUNTIME=mlx
DELTA_MEM_MODEL_PATH=mlx-community/Qwen3-4B-Instruct-2507-4bit
DELTA_MEM_ADAPTER_DIR=/path/to/this/adapter
DELTA_MEM_MODEL_ID=delta-mem-qwen3-4b-mlx
Important Notes
- This is not a PEFT LoRA adapter.
- This is not a complete MLX model repo.
- The base model remains frozen; the δ-mem runtime attaches the memory modules and loads these adapter weights.
- Exact hidden-fact recall is not guaranteed. The target behavior is attention-shaped session continuity and measurable memory-heavy benchmark deltas.
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}
}
Model tree for ofthetrees/delta-mem-qwen3-4b-instruct-mlx-adapter
Base model
Qwen/Qwen3-4B-Instruct-2507