Tencent's Hy-Memory-30B-A3B: A small model that writes long-term memory for AI
Tencent Hunyuan has released Hy-Memory-30B-A3B, a model with about 3B active parameters built to decide what AI assistants remember long term. It replaces the general-purpose model in memory frameworks such as Mem0 or MemOS. In Tencent's own tests, it even beats Claude Opus 5.

What this is about
Tencent Hunyuan has released Hy-Memory-30B-A3B on Hugging Face, a model under the Apache 2.0 license. It isn't a general-purpose chatbot. It's a specialist for the long-term memory of AI systems. Such memory systems store information from conversations outside the model, in a kind of notebook (memory bank), so an assistant can later recall preferences or facts. The model takes over the "write path": it decides which information to keep, how exactly to word it, and how new clues change the existing memory.
Hy-Memory has 30.1B parameters (roughly speaking, the tunable values learned during training), of which only about 3B are active per token. That's the Mixture-of-Experts design, where only some of the sub-networks compute at any one time. It saves compute. The model understands English and Chinese.
What it's for
According to Tencent, the model is a drop-in replacement for the general-purpose language model in the Mem0, MemOS and Hy-Memory frameworks (with the Chat, Working and Coding scenarios). It also transfers to an unseen framework: EverMemOS was not part of the training. In the model card's example, it extracts explicit facts and preferences from a conversation (such as name, city, programming language, vegetarian diet) as short, self-contained sentences in JSON format, without inventing anything. The "no_think" mode switches off longer reasoning.
Two-stage training
Both training stages run in the same frameworks the model is later used in:
- Memory On-Policy Distillation (OPD): A teacher model gives dense feedback on memory states that the student model wrote itself. Distillation means a smaller model learns from a larger one.
- Attributed Memory Reinforcement Learning: In reinforcement learning, the resulting memory stores are scored, and the reward is attributed to individual text segments (chunks). The best memory state from one run is passed on as the starting point for the next window.
Results (developer-reported)
Only the memory writer was tested. Framework version, prompts, retrieval, answer model and judge model were held fixed. To save compute, Tencent used fixed 20-percent samples of each benchmark. Six scores are averaged per framework: LoCoMo, LongMemEval, PersonaMem-v2, Travel SPS, Shopping PS and Code Memory Bench.
| Writer model | Mem0 | Hy-Mem. | MemOS | EverMem. | Average |
|---|---|---|---|---|---|
| Hy-Memory-30B-A3B | 54.02 | 60.55 | 50.51 | 56.89 | 55.49 |
| Claude Opus 5 | 53.43 | 60.53 | 50.50 | 54.04 | 54.62 |
| DeepSeek V4.1 Flash | 49.73 | 60.20 | 49.17 | 55.47 | 53.64 |
| Hy3 | 45.99 | 58.06 | 50.19 | 52.30 | 51.63 |
| Qwen3.6-35B-A3B | 47.51 | 55.87 | 47.36 | 50.75 | 50.37 |
| Hy3-A3B Base | 40.20 | 50.39 | 49.05 | 50.98 | 47.66 |
| Qwen3-30B-A3B | 39.81 | 45.67 | 45.44 | 46.57 | 44.37 |
Hy-Memory leads on average, though sometimes only narrowly: on the Hy-Memory framework and MemOS, the gap to Claude Opus 5 is about 0.02 and 0.01 points. The individual tables show a mixed picture. Opus 5 is clearly better on LoCoMo with Mem0 (69.47 versus 59.54), for example, while Hy-Memory wins on LongMemEval with Mem0 (73.00 versus 66.00) and Travel SPS (54.51 versus 42.98). Against its base model Hy3-A3B Base, the average rises from 47.66 to 55.49, and against Qwen3-30B-A3B from 44.37 to 55.49. The jump on the unseen EverMemOS in Code Memory Bench stands out (63.19 versus 49.53 for Opus 5).
What you need to try it
The source gives no hardware figures. As an estimate, a 30B model needs about 18–20 GB of VRAM at 4-bit quantization and around 60 GB at full precision. The source lists no GGUF version. The quickstart runs on vLLM (tested with v0.31.0) with --served-model-name hy-memory and an OpenAI-compatible API. Plan for about 60 GB of disk space for the weights. Without a GGUF conversion, running it on a Mac or CPU is impractical.
Our take
Memory is a core problem for personal AI assistants. A small, open specialist model that can replace expensive API models as the writer is practically interesting, and just 3B active parameters make always-on operation cheaper. Still, caution is warranted. All results come from Tencent itself, on 20-percent samples, with small margins that could be noise at such sample sizes. Only the write path is tested. Quality in real long-running use, privacy for stored personal facts, and robustness outside the tested frameworks all remain open questions. If you run Mem0, MemOS or similar systems, it's worth comparing it in your own scenario.
Sources
- Hugging Face Trending huggingface.co
- Google News (TW) news.google.com
Try it yourself: Hy-Memory-30B-A3B
Explained step by step, no prior knowledge needed – on your own computer or free in your browser.
What can I do with it?
The model extracts facts and preferences from conversations and stores them as short memory entries. It serves as the writer model in frameworks such as Mem0, MemOS or EverMemOS, not as a general-purpose chatbot.
Who is it worth it for?
Interesting for developers building assistants with long-term memory who want to cut the cost of large API models. It isn't meant for regular chat users.
What your computer needs
Which variant is right for me?
Many models come in several sizes or "quantizations." These are compressed versions: smaller and faster, but slightly less accurate. Rule of thumb: pick the largest variant whose memory requirement fits in your VRAM (video memory). The scripts below choose this for you automatically.
| Variant | Download | Needs approx. | Compatible graphics cards |
|---|---|---|---|
Q4_K_M Default |
18 GB | 22 GB | e.g. RTX 3090, RTX 4090, Tesla P40 |
Q5_K_M |
21 GB | 25 GB | e.g. RTX 5090 |
Q6_K |
25 GB | 28 GB | e.g. RTX 5090 |
Q8_0 |
32 GB | 36 GB | e.g. 2× RTX 3090/4090 or RTX A6000 |
Only the Transformers weights are available (30.1B parameters, about 3B active). A single consumer card needs 4-bit quantization at around 20 GB of VRAM. The source mentions no ready-made GGUF files.
- The quickstart uses vLLM (tested with v0.31.0) with an OpenAI-compatible API.
- Estimated needs: 4-bit about 18–20 GB of VRAM, full precision around 60 GB.
- With only ~3B active parameters, generation is relatively fast, but memory must hold all experts.
- No GGUF in the source, so CPU or Mac use requires your own conversion.
How do I find out what my computer has?
- Windows: Press Ctrl + Shift + Esc → Task Manager → Performance tab → click GPU on the left. At the bottom you'll see Dedicated GPU memory (that's your VRAM). You'll find system memory under Memory.
- Mac: Apple menu at the top left → About This Mac. You'll see your chip (e.g. M2) and memory (e.g. 16 GB). On Apple chips, graphics and processor share this memory.
- Linux: Type
nvidia-smiin the terminal (shows your graphics card and its memory) andfree -hfor system memory.
Guide
Google Colab (in your browser, no installation)
Google Colab is a free service from Google. It gives you a computer with a graphics card in your browser for a few hours. All you need is a Google account. For this model: Colab Pro only – needs the L4 GPU (22.5 GB); the free T4 is too small.
- Download the notebook. Click the button and save the file.
- Open Colab. Go to colab.research.google.com and sign in with your Google account.
- Upload the notebook. In the window that appears, click Upload on the left (or choose File → Upload notebook at the top) and select the file
colab.ipynb. - Turn on the GPU. In the top menu, go to Runtime → Change runtime type → under Hardware accelerator, select T4 GPU (with Colab Pro: L4 or A100) → Save.
- Start everything. Runtime → Run all (keyboard shortcut Ctrl + F9). If you see the warning “This notebook was not authored by Google,” click Run anyway.
- Wait. The cells run one after another. A green checkmark appears to the left of each cell when it's done. Installation and download take about 10 minutes here.
- Try it out. The result appears below the last cell. To test something else, change the text in the cell and run it again with Shift + Enter. The last cell starts a proper chat with an input field.
- Clean up. When you're done: Runtime → Disconnect and delete runtime. This saves your free quota.
Good to know: The free GPU is limited (usually a few hours per day). After about 90 minutes of inactivity, Colab disconnects, and you'll have to start everything over.
Windows 10 / 11
The easiest way is Ollama, a free program that launches AI models with a single command.
- Update your graphics driver (NVIDIA cards only): Install the NVIDIA app or the latest driver. For AMD cards, use the latest Adrenalin driver.
- Install Ollama. Download the file OllamaSetup.exe from ollama.com/download/windows, double-click it, and choose Install. Afterward, a small llama icon appears in the taskbar at the bottom right.
- Open a terminal window. Press the Windows key, type PowerShell and press Enter. A blue or black window opens.
- Start the model. Copy this command ("Copy" button), paste it into the window with a right-click, and press Enter:
The first time, Ollama downloads the model (18 GB (about 24 min at 100 Mbit/s)). After that, it's instant.ollama run hf.co/rapatsky/Hy-Memory-30B-A3B-GGUF:Q4_K_M - Start typing. Once
>>> Send a messageappears, type your question and press Enter. Type/byeto end the chat.
Not enough memory? Pick a smaller variant from the table above, e.g. ollama run hf.co/rapatsky/Hy-Memory-30B-A3B-GGUF:Q4_K_M.
Prefer automatic? A script that picks the right variant for you
- Download both files into the same folder: try_windows.ps1 demo.py
- Open the folder in File Explorer, right-click an empty spot and choose Open in Terminal.
- Paste this command and press Enter:
powershell -ExecutionPolicy Bypass -File try_windows.ps1
If needed, the script installs Ollama via winget, measures your VRAM (video memory) and downloads the matching variant.
macOS
Macs with an Apple chip (M1 to M5) are ideal. Older Intel Macs are very slow.
- Install Ollama. Download it from ollama.com/download/mac, open the file, and drag Ollama into your Applications folder. Launch Ollama once – a llama appears in the menu bar at the top.
- Open Terminal. Press Cmd + Space, type Terminal, and press Enter.
- Start the model. Paste the command (Cmd + V) and press Enter:
The first time, the model is downloaded (18 GB (about 24 min at 100 Mbit/s)).ollama run hf.co/rapatsky/Hy-Memory-30B-A3B-GGUF:Q4_K_M - Start typing. Type your question and press Enter. Quit with
/bye.
Linux
- Check your GPU.
nvidia-smishould show your card. If it doesn't, install the driver on Ubuntu and restart:sudo ubuntu-drivers install - Install Ollama:
curl -fsSL https://ollama.com/install.sh | sh - Start the model:
Exit withollama run hf.co/rapatsky/Hy-Memory-30B-A3B-GGUF:Q4_K_M/bye. Useollama psto check whether the model is running on the GPU. - Or let it pick the right variant automatically:
bash try_linux.sh # mit Python/transformers statt Ollama: MODE=hf bash try_linux.sh
Try it
My name is Lena, I live in Cologne, I work as a teacher and I don't eat meat. Extract memory entries from this.I prefer short answers with Python examples and like using Linux best. Which facts should you remember?I used to like coffee, but now I only drink tea. Update the entry accordingly.
If something goes wrong
Start with --served-model-name hy-memory so the example code (model="hy-memory") works.
Use a recent vLLM version; the architecture (hy_v3) is new.
Set no_think mode via chat_template_kwargs reasoning_effort if you want short outputs.
The model is built for writing memory; results as a general-purpose chatbot are not documented.
“out of memory,” a crash, or your computer freezes
The model is too big for your VRAM (video memory). Pick a smaller variant from the table above and close other programs, especially games and browsers with lots of tabs.
It runs, but extremely slowly
Your CPU is probably doing the work instead of your graphics card. In Ollama, the PROCESSOR column of ollama ps shows how much runs on the GPU. If it says "100% CPU", update your graphics driver or pick a smaller variant that fits entirely into VRAM (video memory).
“ollama” or “python” is not found
Close the terminal window and open it again so it recognizes the newly installed program. For Python on Windows: reinstall it and check Add python.exe to PATH.
Windows: "Running scripts is disabled on this system"
Run the script with exactly the command above: powershell -ExecutionPolicy Bypass -File try_windows.ps1. This allows execution for this one time only.
Error message when loading the model (version, "trust_remote_code", unknown architecture)
Brand-new models often need the latest software version. With Ollama: update Ollama. With Python: pip install -U transformers in the activated environment. The Model Card usually lists the exact version.
Tokenstrom generates the scripts and notebook automatically. Please take a quick look before running them – they're plain, readable text. Mind the model's license: apache-2.0.
Ask the AI assistant
Questions about this article, installation or background? Our assistant knows this page and runs on our own machine, not in someone else's cloud.
The Assistant is an AI (Gemma 4) and can make mistakes – please check important details against the source. Questions are used only to generate an answer and are deleted after one hour. Please don't enter any personal data.
Comments
What do you think? Already tried it? Write it here, no sign-up needed.
Comments are public. Links aren't allowed, and we delete abusive posts. You can delete your own comment at any time in this browser. Learn more in the Privacy Policy.