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.0.9.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.0.9.tar.gz.
File metadata
- Download URL: ultra_mem-0.0.9.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 |
1ce72f6f690f3f215c168bb52093d057c55e064cbf719ac44cd3509273c9beea
|
|
| MD5 |
6890505486d235d6e671488869c15482
|
|
| BLAKE2b-256 |
1f0d25abc94882efcfad078a048261600d9413962341e3df8115f29178f2b7ea
|
File details
Details for the file ultra_mem-0.0.9-py3-none-any.whl.
File metadata
- Download URL: ultra_mem-0.0.9-py3-none-any.whl
- Upload date:
- Size: 6.7 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 |
aa948d6f836ce10c2567e9c52229138285e4955e95e08f93d73a08624dd84553
|
|
| MD5 |
ab4c063bead382d2161edc4cffc7df5e
|
|
| BLAKE2b-256 |
7b267547a2e57aee33f0b1549b32471549f76a418285537ee942ce1c9930f583
|