Skip to main content

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), ()

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


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.5.tar.gz (190.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ultra_mem-0.0.5-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file ultra_mem-0.0.5.tar.gz.

File metadata

  • Download URL: ultra_mem-0.0.5.tar.gz
  • Upload date:
  • Size: 190.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for ultra_mem-0.0.5.tar.gz
Algorithm Hash digest
SHA256 0c71c92fc90c752ba45728c5c9fba16b69bebdaf1693d5a0ddf4f5cf4bc1fe82
MD5 f9a031ce08908edb09ddbd6ec381080b
BLAKE2b-256 03c2449e920c636c112ed6c86f8f58c477fb23b57baffe313608ea49af28341b

See more details on using hashes here.

File details

Details for the file ultra_mem-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: ultra_mem-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for ultra_mem-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c9ac772b83489b615d2af5b83fc248d0bd853331bf9ff6d5bb971d26d3fd5f17
MD5 da789e88c831aaf78b5af2751022c675
BLAKE2b-256 7e77f4ccdb38502c096923e74844cdb0a8309d6d8e0dd2a0f164e2c399e69b1a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page