Instructions to use Jundot/Hy4-oQ4h-mtp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Jundot/Hy4-oQ4h-mtp with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("Jundot/Hy4-oQ4h-mtp") config = load_config("Jundot/Hy4-oQ4h-mtp") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use Jundot/Hy4-oQ4h-mtp with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Jundot/Hy4-oQ4h-mtp"
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": "Jundot/Hy4-oQ4h-mtp" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use Jundot/Hy4-oQ4h-mtp 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 "Jundot/Hy4-oQ4h-mtp"
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 Jundot/Hy4-oQ4h-mtp
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Jundot/Hy4-oQ4h-mtp with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Jundot/Hy4-oQ4h-mtp"
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 "Jundot/Hy4-oQ4h-mtp" \ --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-oQ4h-mtp
This is an oQh checkpoint. It needs an oMLX version with Hy4 support (jundot/omlx#5463). oMLX 0.8.0 and earlier cannot load it.
This model was quantized using oQ mixed-precision quantization in the oQh format (jundot/omlx#5317).
A mixed-precision MLX checkpoint of tencent/Hy4, the Tencent Hy team's flagship mixture-of-experts model with 770B total parameters and 49B active per token. It uses Gated DeepSeek Sparse Attention with IndexCache and identity Hyper-Connections. It includes the language model, the vision encoder and the built-in DFly2 drafter, which oMLX runs as Lightning MTP. The weights were quantized from the FP8 release tencent/Hy4-FP8. oMLX supports text and image input.
The effective average is 4.633 bits/weight for the language backbone and 4.668 bits/weight for the complete checkpoint.
What oQh changes
oQe already gives high quality and is the recommended setting in oMLX. It uses the standard MLX format, so any MLX engine that supports the model can run it. oQh is built for oMLX to push quality further at low bits.
oQh rotates the expert weights with a Hadamard transform before quantizing them. Rotated weights need fewer scales, and oQh spends the saved space on extra bits where they help most. The file stays the same size as oQe.
Quantization and Bit Distribution
oQ4h starts from the oQ4 budget and spends the bytes saved on group scales on 5-bit codes for the routed-expert down projections in 57 of the 77 MoE layers. Attention, the indexer, the shared expert, the dense first-layer MLP, the token embedding, the output head and the DFly2 drafter stay in 8-bit affine groups. The routers and the vision encoder stay in BF16, and the hyper-connection mixes in FP32.
| Storage format | Logical weights | Share of total | Tensor storage | Effective bits/weight |
|---|---|---|---|---|
| oQh 4-bit, group 128 | 560.493B | 72.375% | 277.314 GiB | 4.25 |
| oQh 5-bit, group 128 | 183.610B | 23.709% | 112.219 GiB | 5.25 |
| Affine 8-bit, group 64 | 28.867B | 3.728% | 28.565 GiB | 8.50 |
| BF16 | 1.433B | 0.185% | 2.669 GiB | 16.00 |
| FP32 | 0.031B | 0.004% | 0.115 GiB | 32.00 |
| Total | 774.434B | 100% | 420.882 GiB | 4.668 |
Storage Breakdown
| Component | Logical weights | Storage |
|---|---|---|
| Language backbone | 769.907B | 445.880 GB / 415.258 GiB |
| Vision encoder | 1.235B | 2.470 GB / 2.301 GiB |
| DFly2 drafter | 3.291B | 3.568 GB / 3.323 GiB |
| Total | 774.434B | 451.919 GB / 420.882 GiB |
License
Tencent Hy License, following the source model. See LICENSE.
- Downloads last month
- 548
4-bit
Model tree for Jundot/Hy4-oQ4h-mtp
Base model
tencent/Hy4