Instructions to use abenzerps/Hy-Memory-30B-A3B-Quantized with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use abenzerps/Hy-Memory-30B-A3B-Quantized with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("abenzerps/Hy-Memory-30B-A3B-Quantized") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use abenzerps/Hy-Memory-30B-A3B-Quantized with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf abenzerps/Hy-Memory-30B-A3B-Quantized:Q4_K_M # Run inference directly in the terminal: llama cli -hf abenzerps/Hy-Memory-30B-A3B-Quantized:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf abenzerps/Hy-Memory-30B-A3B-Quantized:Q4_K_M # Run inference directly in the terminal: llama cli -hf abenzerps/Hy-Memory-30B-A3B-Quantized:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf abenzerps/Hy-Memory-30B-A3B-Quantized:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf abenzerps/Hy-Memory-30B-A3B-Quantized:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf abenzerps/Hy-Memory-30B-A3B-Quantized:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf abenzerps/Hy-Memory-30B-A3B-Quantized:Q4_K_M
Use Docker
docker model run hf.co/abenzerps/Hy-Memory-30B-A3B-Quantized:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use abenzerps/Hy-Memory-30B-A3B-Quantized with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "abenzerps/Hy-Memory-30B-A3B-Quantized" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abenzerps/Hy-Memory-30B-A3B-Quantized", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/abenzerps/Hy-Memory-30B-A3B-Quantized:Q4_K_M
- Ollama
How to use abenzerps/Hy-Memory-30B-A3B-Quantized with Ollama:
ollama run hf.co/abenzerps/Hy-Memory-30B-A3B-Quantized:Q4_K_M
- Unsloth Desktop
- Pi
How to use abenzerps/Hy-Memory-30B-A3B-Quantized with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "abenzerps/Hy-Memory-30B-A3B-Quantized"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "abenzerps/Hy-Memory-30B-A3B-Quantized" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use abenzerps/Hy-Memory-30B-A3B-Quantized with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "abenzerps/Hy-Memory-30B-A3B-Quantized"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "abenzerps/Hy-Memory-30B-A3B-Quantized" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abenzerps/Hy-Memory-30B-A3B-Quantized", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use abenzerps/Hy-Memory-30B-A3B-Quantized with Docker Model Runner:
docker model run hf.co/abenzerps/Hy-Memory-30B-A3B-Quantized:Q4_K_M
- Lemonade
How to use abenzerps/Hy-Memory-30B-A3B-Quantized with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull abenzerps/Hy-Memory-30B-A3B-Quantized:Q4_K_M
Run and chat with the model
lemonade run user.Hy-Memory-30B-A3B-Quantized-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use abenzerps/Hy-Memory-30B-A3B-Quantized with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "abenzerps/Hy-Memory-30B-A3B-Quantized"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default abenzerps/Hy-Memory-30B-A3B-Quantized
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use abenzerps/Hy-Memory-30B-A3B-Quantized with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "abenzerps/Hy-Memory-30B-A3B-Quantized"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "abenzerps/Hy-Memory-30B-A3B-Quantized" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Hy-Memory-30B-A3B Quantized
GGUF, Safetensors, and MLX quantized formats of tencent/Hy-Memory-30B-A3B for local memory operations and agent execution.
Tencent's Hy-Memory-30B-A3B is a specialized Mixture-of-Experts (MoE) model (30B total parameters, 3B active per token) trained specifically as a high-performance memory writer and agent-memory operator. It excels at session summarization, context compaction, entity memory extraction, and agent memory management.
Benchmark
Quantized Files
| Quantization | File | Size |
|---|---|---|
| FP8 | hy-memory-30b-a3b-fp8.safetensors | 30.58 GB |
| NVFP4 | hy-memory-30b-a3b-NVFP4.safetensors | 17.65 GB |
| MLX 4-bit | hy-memory-30b-a3b-MLX-4bit.safetensors | 17.65 GB |
| MLX 6-bit | hy-memory-30b-a3b-MLX-6bit.safetensors | 25.04 GB |
| MLX 8-bit | hy-memory-30b-a3b-MLX-8bit.safetensors | 32.43 GB |
| Q8_0 | Hy-Memory-30B-A3B-Q8_0.gguf | 31.99 GB |
| Q6_K | Hy-Memory-30B-A3B-Q6_K.gguf | 24.71 GB |
| Q5_K_M | Hy-Memory-30B-A3B-Q5_K_M.gguf | 21.37 GB |
| Q4_K_M | Hy-Memory-30B-A3B-Q4_K_M.gguf | 18.24 GB |
| Q4_0 | Hy-Memory-30B-A3B-Q4_0.gguf | 17.02 GB |
Q4_K_M is recommended for the best balance of size and quality for GGUF. NVFP4 and FP8 offer high performance on supported NVIDIA GPUs, while MLX formats are optimized for Apple Silicon.
Usage
1. llama.cpp / llama-server (GGUF)
Interactive Chat via CLI
Run multi-turn interactive conversation directly in your terminal:
./llama-cli -m Hy-Memory-30B-A3B-Q4_K_M.gguf \
-cnv \
-c 8192 \
-n 512 \
--temp 0.6 \
-t 16
OpenAI-Compatible API Server
Start llama-server to serve OpenAI-compatible /v1/chat/completions endpoints:
./llama-server -m Hy-Memory-30B-A3B-Q4_K_M.gguf \
-c 16384 \
--port 8080
Query via curl:
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"role": "user",
"content": "Extract key entities and memory facts from this text: Alice is a software architect living in Berlin who prefers dark mode and Python."
}
],
"temperature": 0.6
}'
2. Ollama (GGUF)
Create a Modelfile:
FROM ./Hy-Memory-30B-A3B-Q4_K_M.gguf
TEMPLATE """{{- if .System }}<|hy_User|>{{ .System }}
{{ end }}{{- range .Messages }}<|hy_{{ if eq .Role "user" }}User{{ else }}Assistant{{ end }}|>{{ .Content }}{{ if eq .Role "assistant" }}<eos:6124c78e>{{ end }}{{- end }}{{- if .Prompt }}<|hy_User|>{{ .Prompt }}<|hy_Assistant|>{{- end }}"""
PARAMETER stop "<eos:6124c78e>"
PARAMETER stop "<|hy_User|>"
PARAMETER stop "<|hy_Assistant|>"
PARAMETER stop "<|hy_begin▁of▁sentence|>"
PARAMETER temperature 0.6
Build and run:
ollama create hy-memory -f Modelfile
ollama run hy-memory
3. Apple Silicon (MLX Safetensors)
For Apple Silicon Macs, load MLX quantized weights (4-bit, 6-bit, or 8-bit):
import mlx.core as mx
from safetensors.numpy import load_file
# Load MLX-quantized weights
weights = load_file("hy-memory-30b-a3b-MLX-4bit.safetensors")
# Convert to native MLX array dictionary
mlx_model_weights = {k: mx.array(v) for k, v in weights.items()}
print(f"Loaded {len(mlx_model_weights)} MLX tensor parameters successfully.")
4. NVIDIA FP8 & NVFP4 (Safetensors)
Load the quantized weights directly via safetensors for TensorCore-accelerated pipelines (such as comfy-kitchen, vLLM, or custom inference):
import safetensors.torch
import torch
# Load FP8 (torch.float8_e4m3fn with per-tensor scales)
fp8_weights = safetensors.torch.load_file("hy-memory-30b-a3b-fp8.safetensors")
# Load NVFP4 (packed 4-bit with block-wise scales)
nvfp4_weights = safetensors.torch.load_file("hy-memory-30b-a3b-NVFP4.safetensors")
Source and Build
- Source model: tencent/Hy-Memory-30B-A3B
- Architecture: HYV3ForCausalLM (MoE: 128 experts, 8 active per token, 30B total / 3B active)
- Conversion & Quantization: llama.cpp & comfy-kitchen
- License: Apache 2.0
- Checksums: SHA256SUMS
- Downloads last month
- 132
Model tree for abenzerps/Hy-Memory-30B-A3B-Quantized
Base model
tencent/Hy-Memory-30B-A3B