language:
- en
- zh
- es
- fr
- ja
- ko
- ru
license: other
license_name: tencent-hunyuan
license_link: https://huggingface.co/tencent/Hy4/blob/main/LICENSE
base_model: lyber-ai/Hy4-UNCENSORED-FP8
base_model_relation: quantized
library_name: transformers
pipeline_tag: image-text-to-text
thumbnail: dealign_mascot.png
extra_gated_prompt: |
By requesting access you confirm you are 18+, will use the model solely in
compliance with applicable law in your jurisdiction, and accept full responsibility
for all outputs. Access is granted at the sole discretion of the repository owner.
extra_gated_fields:
Name: text
Affiliation / organization: text
Country: country
Primary use case: text
I confirm I am 18 or older: checkbox
I accept full responsibility for outputs: checkbox
extra_gated_heading: "Request access — manual approval required"
extra_gated_description: "This model is reviewed manually. Fill in the fields below."
extra_gated_button_content: "Request access"
tags: - tencent
- hunyuan
- hy4
- nvfp4
- compressed-tensors
- uncensored
- reasoning
- tool-calling
- moe
- vision
[!NOTE]
Please credit if you build on this. If you redistribute, quantize, fine-tune, serve, benchmark, or write about this model, a line like
"Based onlyber-ai/Hy4-UNCENSORED-NVFP4"
in your model card or write-up means a lot. Thank you.
[!IMPORTANT]
Routed experts in NVFP4, everything else identical toHy4-UNCENSORED-FP8.
461 GB instead of 786 GB, more KV cache per GPU, native FP4 tensor-core MoE on Blackwell. Extended thinking
(no_think/high), tool calling, vision and the built-in DFly2 speculative-decoding drafter are preserved.
Serving needs the two small vLLM loader files inruntime/(mounted into the stock image, see below).
Recommended sampling:temperature=0.9,top_p=1.0(Tencent's recommended setting).
Don't set a tightmax_tokensonhigh: the model can reason for several minutes before answering.
Hy4 — UNCENSORED (NVFP4)
Uncensored release · NVFP4 routed experts · 770B MoE (49B active) · 1M context · Extended thinking · Tools · Vision
What this is
The NVFP4 build of lyber-ai/Hy4-UNCENSORED-FP8 — Tencent's
flagship Hy4 mixture-of-experts model with refusal behavior removed. Only the routed experts (the bulk of the
weights) are stored in NVFP4; attention, shared experts, embeddings, the vision tower and the DFly2 drafter are
byte-identical to the FP8 release.
| FP8 release | This (NVFP4) | |
|---|---|---|
| Routed experts | FP8, 128×128 block scales | NVFP4 — e2m1 values, FP8 (e4m3) scale per 16, FP32 per-tensor scale |
| Expert compute on B300 | FP8 | W4A4 FP4 tensor cores (activations quantized on the fly: e4m3 scale per 16 values + per-token scale — no calibration data involved) |
| Everything else | FP8 / BF16 | identical bytes |
| Checkpoint size | ~786 GB | ~461 GB |
| Format | native FP8 | compressed-tensors mixed-precision |
Internal benchmarks
Capability — MMLU (570-question balanced subset)
570 MMLU questions (10 per subject × all 57 subjects, fixed seed) · same questions, harness and server settings
for every model. no_think: answer-letter log-probability (greedy, one token). reasoning_effort=high: full
generation at temperature=0.9, no output-length cap — every question ran to a final answer (570 / 570 finished,
0 truncated, 0 unparsed).
| Mode | Base (tencent/Hy4-FP8) |
UNCENSORED FP8 | UNCENSORED NVFP4 (this) |
|---|---|---|---|
no_think |
89.65% | 89.12% | 88.77% |
reasoning_effort=high |
93.68% | 90.88% | 90.88% |
NVFP4 matches the FP8 release within run-to-run noise in both modes.
HarmBench-320 — full canonical test set
Evaluation in progress — this section is filled in when the run completes.
Throughput and KV cache (8× B300, TP8, DFly2 on)
vllm/vllm-openai:hy4, official serving flags (below), temperature=0.9, reasoning_effort=high. Single stream:
coding prompts, decode tokens/s after the first token. Concurrent: 64 coding prompts at concurrency 32, aggregate
generated tokens/s. Prefill: cold prompts, prompt tokens / time-to-first-token.
| UNCENSORED FP8 | NVFP4 (this) | |
|---|---|---|
| GPU KV-cache capacity (tokens) | pending | 2,104,384 |
| Single-stream decode (tok/s) | pending | 142 |
| 32 concurrent, aggregate (tok/s) | pending | 1,611 |
| Prefill, 25K-token prompt (tok/s) | pending | 20,894 |
| Prefill, 104K-token prompt (tok/s) | pending | 14,557 |
How to serve
vLLM (recommended, tested)
Tencent's prebuilt Hy4 image (vllm/vllm-openai:hy4) plus two loader files from runtime/, mounted
read-only over the image's copies:
runtime/dfly_config.py— lets the DFly2 drafter run on a target whose routed experts are NVFP4 (the stock check
only lists FP8 / MXFP4 targets).runtime/compressed_tensors_moe.py— withHY4_NVFP4_PER_TOKEN=1, runs the NVFP4 experts W4A4 with a per-token
activation scale computed at runtime (FlashInfer TRT-LLM MoE kernel), so no static activation scales are used.
Without these files the stock image rejects the checkpoint when DFly2 is enabled, and withoutHY4_NVFP4_PER_TOKEN=1 the experts would use placeholder static activation scales — always serve with both.
VP=/usr/local/lib/python3.12/dist-packages/vllm
docker run --gpus all --privileged --ipc=host -p 8000:8000 \
-e VLLM_USE_RUST_FRONTEND=1 \
-e HY4_NVFP4_PER_TOKEN=1 \
-v /path/to/Hy4-UNCENSORED-NVFP4/runtime/dfly_config.py:$VP/models/hy_v4/dfly_config.py:ro \
-v /path/to/Hy4-UNCENSORED-NVFP4/runtime/compressed_tensors_moe.py:$VP/model_executor/layers/quantization/compressed_tensors/compressed_tensors_moe/compressed_tensors_moe.py:ro \
-v /path/to/Hy4-UNCENSORED-NVFP4:/model \
vllm/vllm-openai:hy4 /model \
--dtype bfloat16 \
--tensor-parallel-size 8 \
--max-model-len 1048576 \
--attention-backend FLASHMLA_SPARSE \
--limit-mm-per-prompt '{"image":1,"video":0}' \
--enable-auto-tool-choice \
--reasoning-parser hy_v4 \
--tool-call-parser hy_v4 \
--speculative-config '{"method":"dfly","num_speculative_tokens":5}' \
--served-model-name hy4 \
--port 8000
The load log should show HY4 runtime patch: NVFP4 MoE W4A4 with per-token dynamic activation outer scale andTrtLlmNvFp4ExpertsMonolithic [w=nvfp4, a=nvfp4] for the routed experts. The runtime files were made against thevllm/vllm-openai:hy4 image (vLLM 0.23.1rc1.dev8179); re-check them if you use a different image. The--speculative-config line enables the built-in DFly2 drafter (inside the checkpoint, no separate download). Drop it
to serve without speculative decoding. For sessions near the full 1M context with several users, add CPU KV offload,
e.g. --kv-offloading-size 960 --kv-offloading-backend native.
Hardware requirements
| GPU | Setup | Status |
|---|---|---|
| 8× B300 SXM6 | TP8, full 1M context, DFly2 enabled | ✅ Tested |
The W4A4 NVFP4 MoE kernel needs Blackwell-class GPUs. Other setups have not been tested.
Reasoning + tools
chat_template_kwargs = {"reasoning_effort": "high"} # or "no_think"
reasoning_effort accepts "no_think" or "high" (the two tiers Tencent ships on this model). Tool calling and
image input are preserved from the base model.
Responsible use
You are solely responsible for how you use this model and its outputs.
- Do not use for generating illegal content in your jurisdiction
- Do not use to harm, deceive, or exploit real individuals
- Do not use to generate CSAM or non-consensual intimate content
- Comply with all applicable laws and regulations
License
This model inherits the Tencent Hy License, Version 1.0
from the base model. The modification does not change the license terms.
Credits
- Base model: tencent/Hy4
- Full-precision release: lyber-ai/Hy4-UNCENSORED-FP8
- Released by: Lyber AI × dealign.ai
