Text Generation
MLX
Safetensors
hy_v3
hunyuan
hy3
mixture-of-experts
apple-silicon
reasoning
tool-use
quantized
jang
osaurus
conversational
Instructions to use OsaurusAI/Hy3-JANG_2K with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use OsaurusAI/Hy3-JANG_2K 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("OsaurusAI/Hy3-JANG_2K") 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 OsaurusAI/Hy3-JANG_2K with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "OsaurusAI/Hy3-JANG_2K"
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": "OsaurusAI/Hy3-JANG_2K" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use OsaurusAI/Hy3-JANG_2K with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "OsaurusAI/Hy3-JANG_2K"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "OsaurusAI/Hy3-JANG_2K" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OsaurusAI/Hy3-JANG_2K", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use OsaurusAI/Hy3-JANG_2K 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 "OsaurusAI/Hy3-JANG_2K"
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 OsaurusAI/Hy3-JANG_2K
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use OsaurusAI/Hy3-JANG_2K with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "OsaurusAI/Hy3-JANG_2K"
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 "OsaurusAI/Hy3-JANG_2K" \ --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"
File size: 4,668 Bytes
d08384c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | ---
license: other
license_name: tencent-hunyuan-community
library_name: mlx
base_model: tencent/Hy3
base_model_relation: quantized
pipeline_tag: text-generation
tags:
- hunyuan
- hy3
- mixture-of-experts
- mlx
- apple-silicon
- reasoning
- tool-use
- quantized
- jang
- osaurus
quantization_config:
family: jang-affine-mixed
profile: JANG_2K
group_size: 128
routed_avg_bits: 2.33
---
<p align="center"><img src="osaurus-x-banner.png" width="100%" alt="OsaurusAI"/></p>
# Hy3-JANG_2K
Quantized **[tencent/Hy3](https://huggingface.co/tencent/Hy3)** for Apple Silicon MLX / JANG runtimes — a 295B-total / 21B-active text MoE, packed to ~94 GiB. This is the **clean non-MTP** JANG_2K bundle (smallest 2K pack). For the variant that keeps Hy3's native Multi-Token-Prediction head, see `Hy3-JANG_2K-MTP`.
| | |
|---|---|
| Source | [tencent/Hy3](https://huggingface.co/tencent/Hy3) |
| License | `other` — inherits the upstream Tencent Hunyuan Community License |
| Architecture | `hy_v3` (`HYV3ForCausalLM`), text-only |
| Parameters | 295B total / 21B active per token |
| Format | JANG_2K (mixed-affine), routed experts avg **2.33-bit** |
| Bundle size | 101.40 GB (94.44 GiB), 22 shards, 2,876 tensor keys |
| MTP | none (`num_nextn_predict_layers = 0`) — MTP head not included |
| Context | 262,144 tokens |
## What this is
`Hy3-JANG_2K` is a JANG mixed-affine quantization of Tencent's Hy3 dense-MoE, targeting Apple Silicon runtimes (MLX / vMLX). The `2K` profile spends an extra bit on the routed `down_proj` (3-bit vs the 2-bit `gate`/`up`), which cleans up the sampling tail relative to a uniform 2-bit pack. This bundle drops the native MTP layer for the smallest footprint; use `Hy3-JANG_2K-MTP` if you want speculative decoding.
## Quantization (JANG_2K)
| Tensor family | Policy |
|---|---|
| Routed expert `gate_proj` / `up_proj` | affine **2-bit**, group size 128 |
| Routed expert `down_proj` | affine **3-bit**, group size 128 |
| Attention `q/k/v/o` | affine 8-bit |
| Shared expert | affine 8-bit |
| Dense layer-0 MLP | affine 8-bit |
| `embed_tokens` | affine 6-bit |
| `lm_head` | affine 8-bit |
| RMSNorms, router gate, expert bias | 16-bit passthrough |
Routed-expert effective average: **2.33 bit**. AWQ scaling is disabled for this bundle (measured negligible on Hy3).
## Architecture
Hy3 is a **text-only** dense-causal-GQA MoE — not MLA, not SSM, not sliding-window, not a VLM.
- 80 decoder layers, `hidden_size` 4096
- GQA: 64 attention heads / 8 KV heads, `head_dim` 128, QK-norm
- RoPE `default`, `rope_theta` 11,158,840, `max_position_embeddings` 262,144
- MoE: 192 routed experts, top-8, **sigmoid** router + expert-correction bias, `route_norm`, `router_scaling_factor` 2.826, 1 shared expert, `first_k_dense_replace` 1
- No MTP layer in this bundle (`num_nextn_predict_layers = 0`)
- `vocab_size` 120,832
## Reasoning & tool use
- **Reasoning**: `<think>…</think>` tags, `reasoning_effort` (`no_think` / `low` / `high`).
- **Tool calling**: Hunyuan / Tencent XML-style tags (`<tool_calls>`, `<tool_call>`, `<arg_key>`, `<arg_value>`).
- Hy3's tokenizer uses a **`:opensource` special-token dialect** (e.g. `<|hy_eos:opensource|>`, `<think:opensource>`); the bundled `chat_template.jinja` is the upstream template. A compatible runtime must resolve these variant-suffixed tokens at the token→text boundary.
## Runtime support
- **Converted and structurally verified** (index complete, 2,876 tensors / 22 shards, no MTP tensors).
- Runs on the **vMLX Python engine** with Hy3 support: JANG affine loader, GQA KV cache, `<think>` reasoning stream, and Hunyuan tool-call parsing.
Requires a Hy3-aware MLX/JANG runtime. Stock `mlx-lm` / `transformers` will not load the JANG mixed-affine layout as-is.
## Known limitations
- No published quality benchmark yet for this specific pack.
- Very loose sampling (`top_p` 1.0 + `temperature` 0.9) exposes more of the routed-expert tail; a mild `top_p ≤ 0.9` or `min_p` floor is recommended for long-form generation.
## 소개 (Korean)
이 번들은 Tencent의 **Hy3** (295B 총 파라미터 / 21B 활성 MoE, 텍스트 전용)를 Apple Silicon MLX / JANG 런타임용으로 양자화한 모델입니다. JANG_2K 프로파일은 라우팅 전문가의 `down_proj`를 3-bit로, `gate`/`up`을 2-bit로 양자화합니다(평균 2.33-bit). 이 번들은 MTP 헤드를 포함하지 않는 가장 작은 2K 팩이며, 스펙티브 디코딩이 필요하면 `Hy3-JANG_2K-MTP`를 사용하세요. Hy3의 GQA 어텐션과 MoE 라우팅, `:opensource` 특수 토큰 방식을 정확히 구현한 런타임에서만 사용해야 합니다.
|