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.8.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.8.tar.gz.
File metadata
- Download URL: ultra_mem-0.0.8.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 |
53bf4b098c3396870812d1ba2eb2cf000806e469e4a3249bc74506e281336f29
|
|
| MD5 |
64b4ca9a33229bb349f290b3e81f3fac
|
|
| BLAKE2b-256 |
cc58da45923de160c4869be6b7158e621c25e5443da06595dd5cebd04ebd5143
|
File details
Details for the file ultra_mem-0.0.8-py3-none-any.whl.
File metadata
- Download URL: ultra_mem-0.0.8-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 |
dca365eded18e51c75c8aa10366c6c5065cba057d1df0df210efbfa77290429a
|
|
| MD5 |
ae15d3f8f60d84851c7206fd04aa6829
|
|
| BLAKE2b-256 |
c28a0a7ad6ca1acb78c5d3a1b89e44521ef9d04fc8042fae7e7dccb52d5321ae
|