UltraMem
Project description
UltraMem
Implementation of UltraMem, improved Product Key Memory design, from Bytedance AI labs
Install
$ pip install ultra-mem
Usage
import torch
from ultra_mem import UltraMem
ultra_mem = UltraMem(dim = 512)
tokens = torch.randn(1, 1024, 512)
out, aux_loss = ultra_mem(tokens) # (1, 1024, 512), ()
Char-level LM
$ uv run train.py
Citations
@misc{huang2025ultrasparsememorynetwork,
title = {Ultra-Sparse Memory Network},
author = {Zihao Huang and Qiyang Min and Hongzhi Huang and Defa Zhu and Yutao Zeng and Ran Guo and Xun Zhou},
year = {2025},
eprint = {2411.12364},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2411.12364},
}
@inproceedings{anonymous2025continual,
title = {Continual Learning via Sparse Memory Finetuning},
author = {Anonymous},
booktitle = {Submitted to The Fourteenth International Conference on Learning Representations},
year = {2025},
url = {https://openreview.net/forum?id=LGo7U1m24L},
note = {under review}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ultra_mem-0.1.0.tar.gz
(36.8 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ultra_mem-0.1.0.tar.gz.
File metadata
- Download URL: ultra_mem-0.1.0.tar.gz
- Upload date:
- Size: 36.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e086e0c8384b778afa7715ad8b8b98de638125b51757243e967f5ddf9337c1e
|
|
| MD5 |
2c3bb5952f0a2ff47bcb2416203206e2
|
|
| BLAKE2b-256 |
688d91fa32e6f8c487c1a5f3cc031f6ed778317bdce3a9eb556e49c5a2563f17
|
File details
Details for the file ultra_mem-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ultra_mem-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
098d3de2c8747219026fcbe4431dc6e32da4b67ccf026cebdad89fd9ab14c1ef
|
|
| MD5 |
3a943e97b672fce6a3b3fecbd4f3d6b2
|
|
| BLAKE2b-256 |
ac332a30d4baab5231495c32f3cb3504bf7e28cc684bf9d0a895e3a28fa2aae8
|