Instructions to use Rubin-Wei/MemoryDecoder-Pythia-6.9B-general with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Rubin-Wei/MemoryDecoder-Pythia-6.9B-general with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Rubin-Wei/MemoryDecoder-Pythia-6.9B-general")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Rubin-Wei/MemoryDecoder-Pythia-6.9B-general") model = AutoModelForCausalLM.from_pretrained("Rubin-Wei/MemoryDecoder-Pythia-6.9B-general", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Rubin-Wei/MemoryDecoder-Pythia-6.9B-general with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Rubin-Wei/MemoryDecoder-Pythia-6.9B-general" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rubin-Wei/MemoryDecoder-Pythia-6.9B-general", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Rubin-Wei/MemoryDecoder-Pythia-6.9B-general
- SGLang
How to use Rubin-Wei/MemoryDecoder-Pythia-6.9B-general with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Rubin-Wei/MemoryDecoder-Pythia-6.9B-general" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rubin-Wei/MemoryDecoder-Pythia-6.9B-general", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Rubin-Wei/MemoryDecoder-Pythia-6.9B-general" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rubin-Wei/MemoryDecoder-Pythia-6.9B-general", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Rubin-Wei/MemoryDecoder-Pythia-6.9B-general with Docker Model Runner:
docker model run hf.co/Rubin-Wei/MemoryDecoder-Pythia-6.9B-general
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Rubin-Wei/MemoryDecoder-Pythia-6.9B-general")
model = AutoModelForCausalLM.from_pretrained("Rubin-Wei/MemoryDecoder-Pythia-6.9B-general", device_map="auto")MemoryDecoder-Pythia-6.9B-general
Resources
- Project Page: Memory Decoder at Scale
- GitHub Repository: LUMIA-Group/MemoryDecoder-at-Scale
- Paper: Memory Decoder at Scale: A Pretrained, Parametric Long-Term Memory
- Hugging Face Collection: MemoryDecoder-at-Scale
This repository contains the 6.9B general Memory Decoder released with Memory Decoder at Scale. It is a pretrained parametric long-term memory designed to be paired with a frozen Pythia-family language model. The general-memory suite was pretrained on 300B tokens and scales memory capacity independently from the backbone.
This checkpoint is a memory component, not a chat- or instruction-tuned model. Use it through the Memory Decoder integration in the released codebase rather than treating it as a standalone assistant.
Model details
| Field | Value |
|---|---|
| Memory size | approximately 6.9B parameters |
| Architecture/tokenizer family | GPT-NeoX / Pythia |
| Memory scope | General |
| Training scale | 300B-token general-memory pretraining suite |
| Intended backbone | Frozen, tokenizer-compatible Pythia model |
| Release contents | Inference weights, configuration, and tokenizer files |
Usage
Install the environments from
LUMIA-Group/MemoryDecoder-at-Scale, then use the
hf-memdec adapter. For example:
cd eval/lm-evaluation-harness
BACKBONE=EleutherAI/pythia-410m-deduped
MEMORY=Rubin-Wei/MemoryDecoder-Pythia-6.9B-general
lm-eval \
--model hf-memdec \
--model_args pretrained=$BACKBONE,memdec_path=$MEMORY \
--tasks arc_easy,piqa,mmlu \
--batch_size 1
The adapter provides the task-specific interpolation settings used for the
released Pythia memories; an explicit lmbda can be supplied as an override.
Intended use and limitations
This checkpoint is intended for research on parametric memory, memory scaling, and evaluation with frozen language-model backbones. Its behavior depends on the selected backbone and interpolation settings. It may reproduce biases or errors present in its training data and should not be treated as an authoritative knowledge source.
Citation
If you use this checkpoint, please cite:
@misc{wei2026memorydecoderscalepretrained,
title={Memory Decoder at Scale: A Pretrained, Parametric Long-Term Memory},
author={Rubin Wei and Jiaqi Cao and Jiarui Wang and Junming Zhang and Qipeng Guo and Bowen Zhou and Zhouhan Lin},
year={2026},
eprint={2607.27919},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2607.27919},
}
- Downloads last month
- 20
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Rubin-Wei/MemoryDecoder-Pythia-6.9B-general")