Text Generation
Transformers
Safetensors
qwen3
memory-decoder
parametric-memory
long-term-memory
memorydecoder-at-scale
olmo
law
text-generation-inference
Instructions to use Rubin-Wei/MemoryDecoder-OLMo-1.7B-law with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Rubin-Wei/MemoryDecoder-OLMo-1.7B-law with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Rubin-Wei/MemoryDecoder-OLMo-1.7B-law")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Rubin-Wei/MemoryDecoder-OLMo-1.7B-law") model = AutoModelForCausalLM.from_pretrained("Rubin-Wei/MemoryDecoder-OLMo-1.7B-law", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Rubin-Wei/MemoryDecoder-OLMo-1.7B-law with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Rubin-Wei/MemoryDecoder-OLMo-1.7B-law" # 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-OLMo-1.7B-law", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Rubin-Wei/MemoryDecoder-OLMo-1.7B-law
- SGLang
How to use Rubin-Wei/MemoryDecoder-OLMo-1.7B-law 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-OLMo-1.7B-law" \ --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-OLMo-1.7B-law", "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-OLMo-1.7B-law" \ --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-OLMo-1.7B-law", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Rubin-Wei/MemoryDecoder-OLMo-1.7B-law with Docker Model Runner:
docker model run hf.co/Rubin-Wei/MemoryDecoder-OLMo-1.7B-law
Add model card with project links and citation
Browse files
README.md
CHANGED
|
@@ -14,6 +14,14 @@ datasets:
|
|
| 14 |
---
|
| 15 |
# MemoryDecoder-OLMo-1.7B-law
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
This repository contains the **1.7B law Memory Decoder** released
|
| 18 |
with [Memory Decoder at Scale](https://arxiv.org/abs/2607.27919). It is a pretrained parametric long-term
|
| 19 |
memory that can be swapped into a compatible frozen language-model backbone.
|
|
@@ -35,11 +43,10 @@ and vocabularies.
|
|
| 35 |
| Intended backbone | Frozen OLMo-family model with the matching tokenizer/vocabulary |
|
| 36 |
| Release contents | Inference weights, configuration, and tokenizer files |
|
| 37 |
|
| 38 |
-
Optimizer states and training-resume artifacts are not part of this release.
|
| 39 |
-
|
| 40 |
## Usage
|
| 41 |
|
| 42 |
-
Install the matching environment from
|
|
|
|
| 43 |
set `MODEL_PATH` to a compatible frozen backbone and `MEMDEC_PATH` to this
|
| 44 |
repository:
|
| 45 |
|
|
@@ -59,14 +66,6 @@ domain. Its outputs depend on the backbone, prompt, and interpolation settings.
|
|
| 59 |
Domain specialization does not guarantee factual correctness or safety, and the
|
| 60 |
model may inherit biases and errors from its training sources.
|
| 61 |
|
| 62 |
-
## Links
|
| 63 |
-
|
| 64 |
-
- [Project page](https://rubin-wei.github.io/memory-decoder-at-scale/)
|
| 65 |
-
- [GitHub repository](https://github.com/LUMIA-Group/MemoryDecoder-at-Scale)
|
| 66 |
-
- [Paper](https://arxiv.org/abs/2607.27919)
|
| 67 |
-
- [Model and data collection](https://huggingface.co/collections/Rubin-Wei/memorydecoder-at-scale)
|
| 68 |
-
- [Released domain data](https://huggingface.co/datasets/Rubin-Wei/MemoryDecoder-at-Scale-domain-data/tree/main/law)
|
| 69 |
-
|
| 70 |
## Citation
|
| 71 |
|
| 72 |
If you use this checkpoint, please cite:
|
|
|
|
| 14 |
---
|
| 15 |
# MemoryDecoder-OLMo-1.7B-law
|
| 16 |
|
| 17 |
+
## Resources
|
| 18 |
+
|
| 19 |
+
- [Project Page: Memory Decoder at Scale](https://rubin-wei.github.io/memory-decoder-at-scale/)
|
| 20 |
+
- [GitHub Repository: LUMIA-Group/MemoryDecoder-at-Scale](https://github.com/LUMIA-Group/MemoryDecoder-at-Scale)
|
| 21 |
+
- [Paper: Memory Decoder at Scale: A Pretrained, Parametric Long-Term Memory](https://arxiv.org/abs/2607.27919)
|
| 22 |
+
- [Hugging Face Collection: MemoryDecoder-at-Scale](https://huggingface.co/collections/Rubin-Wei/memorydecoder-at-scale)
|
| 23 |
+
- [Dataset: MemoryDecoder-at-Scale Domain Data (Law)](https://huggingface.co/datasets/Rubin-Wei/MemoryDecoder-at-Scale-domain-data/tree/main/law)
|
| 24 |
+
|
| 25 |
This repository contains the **1.7B law Memory Decoder** released
|
| 26 |
with [Memory Decoder at Scale](https://arxiv.org/abs/2607.27919). It is a pretrained parametric long-term
|
| 27 |
memory that can be swapped into a compatible frozen language-model backbone.
|
|
|
|
| 43 |
| Intended backbone | Frozen OLMo-family model with the matching tokenizer/vocabulary |
|
| 44 |
| Release contents | Inference weights, configuration, and tokenizer files |
|
| 45 |
|
|
|
|
|
|
|
| 46 |
## Usage
|
| 47 |
|
| 48 |
+
Install the matching environment from
|
| 49 |
+
[LUMIA-Group/MemoryDecoder-at-Scale](https://github.com/LUMIA-Group/MemoryDecoder-at-Scale), then
|
| 50 |
set `MODEL_PATH` to a compatible frozen backbone and `MEMDEC_PATH` to this
|
| 51 |
repository:
|
| 52 |
|
|
|
|
| 66 |
Domain specialization does not guarantee factual correctness or safety, and the
|
| 67 |
model may inherit biases and errors from its training sources.
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
## Citation
|
| 70 |
|
| 71 |
If you use this checkpoint, please cite:
|