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.7.tar.gz (190.8 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.7-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ultra_mem-0.0.7.tar.gz
  • Upload date:
  • Size: 190.8 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.7.tar.gz
Algorithm Hash digest
SHA256 649fd6af8631d1c5684f8c38f251c9867deb58558fab8725adf43a0290509980
MD5 5bdef16c0fa721456c2c28b4a4ff7af4
BLAKE2b-256 e63c256e8be1a95e537e1e5a84d2193af0aab913787da700c7df3bfee80e039d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ultra_mem-0.0.7-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

Hashes for ultra_mem-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 4f0a7cf55a4a4b2de69c63db97f9d0c81e8f167c4c463c20b718e7cd6c535c50
MD5 6aa32aeb0e7b6b44e37a774811972769
BLAKE2b-256 49fb8db32731e5e79189e1176b85b8ba172e74d60a52715f2c0ae90a56ee7454

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