Instructions to use apetersson/Hy4-flash-oQh4-BF16-Engram with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use apetersson/Hy4-flash-oQh4-BF16-Engram 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("apetersson/Hy4-flash-oQh4-BF16-Engram") 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
- LM Studio
- Pi
How to use apetersson/Hy4-flash-oQh4-BF16-Engram with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "apetersson/Hy4-flash-oQh4-BF16-Engram"
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": "apetersson/Hy4-flash-oQh4-BF16-Engram" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use apetersson/Hy4-flash-oQh4-BF16-Engram with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "apetersson/Hy4-flash-oQh4-BF16-Engram"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "apetersson/Hy4-flash-oQh4-BF16-Engram" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8080/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "apetersson/Hy4-flash-oQh4-BF16-Engram", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use apetersson/Hy4-flash-oQh4-BF16-Engram 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 "apetersson/Hy4-flash-oQh4-BF16-Engram"
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 apetersson/Hy4-flash-oQh4-BF16-Engram
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use apetersson/Hy4-flash-oQh4-BF16-Engram with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "apetersson/Hy4-flash-oQh4-BF16-Engram"
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 "apetersson/Hy4-flash-oQh4-BF16-Engram" \ --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"
Hy4-flash oQh4 with BF16 Engram
An oQh4 quantisation of Hy4-flash with SSD offloading for the four original BF16 Engram tables. The experts stay in memory. The weights occupy approximately 200.26 GiB on disk. No separate Engram download or staging command is required.
Load with oMLX
Use stock oMLX 0.8.3 or later. The 0.8.3 release includes Hy4 SSD N-gram Offload (PR #5475); no fork or custom build is required.
Download this revision to a fresh local SSD directory, select the model in oMLX, and enable SSD N-gram Offload. Keep expert offload disabled to keep the experts in memory. Do not mix shards from the old layout with this snapshot.
hf download apetersson/Hy4-flash-oQh4-BF16-Engram --local-dir Hy4-flash-oQh4-inline-BF16-Engram
Validation and limits
On a 256 GiB Apple Silicon Mac, the pre-merge loader generated an answer ending in “Paris” with all four disk-backed readers attached (layers 2, 12, 22, 32; 118.02 GiB of BF16 payload). Peak sampled process RSS was 82.66 GiB with no sampled system swap growth above baseline. One direct-loader text smoke; not a packaged-app, HTTP, MTP, vision, speed or 128 GiB fit test.
- Downloads last month
- 395
4-bit
Model tree for apetersson/Hy4-flash-oQh4-BF16-Engram
Base model
tencent/Hy4-flash