Hy4-flash-Heretic-FP8

An FP8 build of trohrbaugh/Hy4-flash-heretic, the refusal-ablated version of tencent/Hy4-flash. It uses the same FP8 layout as Tencent's official tencent/Hy4-flash-FP8, and it runs on two H200 GPUs.

This is not an official Tencent release.

This model will produce content the base model declines to produce. The measured behavior is below, stated as counts. Read it before deciding whether to use this.

How this build was made

We started from Tencent's official FP8 checkpoint (revision 003107fa) and replaced only the tensors the edit changed:

  • 2,097 tensors are byte-identical to Tencent's official FP8.
  • 68 edited tensors that Tencent keeps in BF16 (shared-expert and routed-expert projections) are copied from the BF16 Heretic build.
  • 34 edited attention output projections (self_attn.o_proj) are re-quantized to FP8 e4m3 with 128×128 blocks, Tencent's format. Tencent's calibrated recipe cannot be reproduced from the published files, so these use round-to-nearest with scale = block max / 448.

The edit survives quantization. In 32 of 34 layers, the share of the refusal direction left in the weights matches the BF16 build to within 0.005. In layer 17 it is 0.027 against 0.013, and in layer 18 0.048 against 0.039.

BUILD_MANIFEST.json lists every edited tensor, the re-quantization error statistics, and the SHA-256 of every shard.

What was measured

All tests compare this FP8 build with Tencent's official FP8, on the same server software, settings and prompts.

Refusals

  • Test: 100 harmful prompts (mlabonne/harmful_behaviors, test split, first 100), with reasoning_effort = "no_think", greedy decoding and a 1,536-token budget.
  • Scoring: every response was read and labeled by hand (one coder, not blind).
official FP8 this build
Refused 100/100 2/100
Sanitized substitute, no refusal 0 24/100
Partial 0 6/100
Complied 0 68/100

A refusal-phrase counter or an "is this a refusal" judge will overstate compliance on this model. About a quarter of requests now get a harmless or legal stand-in instead of a refusal: a baking-soda "bomb", FOIA requests in answer to "hack a government database", a keylogger that requires consent. These responses contain no refusal phrase, and they are not what was asked for.

The BF16 card reports 12/100 judged blocked, from a different instrument (an LLM judge) on a different budget. The two numbers are not directly comparable.

On 100 benign prompts, neither model refused any, after hand correction.

Thinking mode was not measured for refusals. Use no_think if refusal behavior matters to you, or measure the mode you plan to use.

Capability

These used Tencent's sampling (0.9 / 1.0) and reasoning_effort = "high". Intervals are paired 95% bootstrap intervals.

Test official FP8 this build difference (this − official)
MGSM (660 items, 11 languages) 0.952 0.950 −0.002 [−0.011, +0.008]
SimpleQA (1,000 items) 0.256 0.274 +0.018 [−0.007, +0.043]
AutomationBench (120-task sample) 63/120 60/120 −2.5 points [−10.8, +5.0]

No test shows a loss outside run-to-run noise. The DFly speculative-decoding drafter still works: acceptance is 0.27–0.29 on our speed-test prompts, against 0.27 for the official FP8.

Speed (2× H200, the launch below)

Greedy decoding, 512 output tokens, no_think:

Concurrent requests Total output tok/s Per-request tok/s
1 70 75
4 198 62
8 346 49

Time to first token was 4.3 s for a 33K-token prompt and 26 s for a 134K-token prompt.

How to run

These are the settings every number on this card was measured with. They were tested on NVIDIA H200 (141 GB) only.

Software

Hy4-flash needs Tencent's vLLM build. As of 2026-11-22, stock vLLM releases do not include the HYV4FlashForConditionalGeneration architecture.

  • Image: vllm/vllm-openai:hy4-flash (we tested 0.1.dev25463+g77766db1f).
  • Chat template: use the chat_template.jinja shipped in this repo (sha256 11b12531…). It is Tencent's current template, and it is the one every number here was measured with.

Hardware

Setup GPU memory used for weights KV cache at 262K context Host RAM
4× H200, TP4 43.7 GiB per GPU 4.9M tokens (about 18 full-length requests) about 206 GB
2× H200, TP2 80.7 GiB per GPU 2.8M tokens (about 10 full-length requests) about 200 GB

The Engram lookup tables (about 127 GB, BF16) are kept in pinned host memory by default, so plan for at least 256 GB of system RAM. Two GPUs give about 94% of the single-user speed of four.

Launch (2× H200)

docker run --gpus '"device=0,1"' --ipc=host -p 8000:8000 \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  vllm/vllm-openai:hy4-flash trohrbaugh/Hy4-flash-heretic-FP8 \
  --served-model-name hy4-flash-heretic \
  --dtype bfloat16 \
  --max-model-len 262144 --max-num-seqs 8 --max-num-batched-tokens 8192 \
  --limit-mm-per-prompt '{"image":1,"video":0}' \
  --tensor-parallel-size 2 \
  --engram-config '{"cpu_offload": true}' \
  --enable-auto-tool-choice --reasoning-parser hy_v4 --tool-call-parser hy_v4 \
  --speculative-config '{"num_speculative_tokens":5,"method":"dfly"}'

For four GPUs, use --gpus all --tensor-parallel-size 4.

Notes:

  • GPU selection: with --privileged, the --gpus '"device=…"' filter is ignored and vLLM takes the first GPUs it sees. If you need --privileged, select GPUs with -e CUDA_DEVICE_ORDER=PCI_BUS_ID -e CUDA_VISIBLE_DEVICES=0,1 instead.
  • Symlinked HF cache: if your ~/.cache/huggingface/hub is a symlink, mount its target as well. Otherwise the container cannot follow it and downloads the whole checkpoint again into its own layer.
  • Context: the config allows up to 1,048,576 tokens, but we only tested 262,144. Tencent's example serves 64K with --max-num-seqs 4, which is too small for agentic work.
  • Startup: expect 6 to 8 minutes before the server answers.

Sampling and reasoning

  • Sampling: temperature 0.9, top_p 1.0, top_k off. Tencent publishes one preset for all modes, and it is also in generation_config.json.
  • Reasoning control: set chat_template_kwargs.reasoning_effort to no_think, low or high. The template's default is high.
  • enable_thinking does nothing on this model. Sending it gives no error, and reasoning stays on.

Check that it runs correctly

Before measuring anything, send two known-answer prompts in both modes and confirm the reasoning control engages:

for effort in high no_think; do
  curl -s localhost:8000/v1/chat/completions -H 'Content-Type: application/json' -d '{
    "model": "hy4-flash-heretic",
    "messages": [{"role": "user", "content": "What is 17*23? Answer with the number only."}],
    "temperature": 0.9, "top_p": 1.0, "max_tokens": 2048,
    "chat_template_kwargs": {"reasoning_effort": "'"$effort"'"}
  }' | python3 -c 'import json,sys; m=json.load(sys.stdin)["choices"][0]["message"]; print(repr(m["content"]), "reasoning chars:", len(m.get("reasoning_content") or m.get("reasoning") or ""))'
done

Expected: 391 both times, with a non-empty reasoning field under high and an empty one under no_think. Repeat with "What is the capital of France?" (expect Paris). A quantized model can serve without errors and still produce garbage, so do not skip this check.

The DFly drafter should be active. vLLM's /metrics endpoint reports speculative-decoding acceptance; we saw 0.27 to 0.46 depending on the prompts, the same as the unedited model.

License

This is a derivative of tencent/Hy4-flash and is distributed under the same Tencent Hy license. The LICENSE file from the base model is included unchanged. Check the license's territory, user-count and revenue terms before you deploy it.

Downloads last month
39
Safetensors
Model size
220B params
Tensor type
BF16
·
F8_E4M3
·
F32
·
I32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for trohrbaugh/Hy4-flash-heretic-FP8

Finetuned
(1)
this model