Skip to navigation

Hy4-flash is a vision-language Mixture-of-Experts model from Tencent. Its 42-layer decoder carries four hyper-connection streams, multi-head latent attention that alternates between sparse layers (a compressed indexer keeps 2,048 keys per query) and sliding-window layers (512 tokens), a latent MoE with 512 routed experts (16 active) plus one shared expert on layers 1-41, and Engram n-gram memory on four layers. The Hugging Face configuration declares the HYV4FlashForConditionalGeneration architecture.

Set up NeMo AutoModel with the latest container or follow the installation instructions.

Fine-Tune Hy4-flash

The text recipe trains on Tulu-3 packed into 131,072-token sequences with context parallelism (CP16) and expert parallelism (EP64) on 8 nodes of 8 H100 GPUs. Conversations are shuffled with a fixed seed before packing, and packed documents never attend to each other. Use the Slurm launcher guide for the multi-node run.

Samples are rendered in the model’s fast-thinking mode (reasoning_effort=no_think), as the official fine-tuning code does for answer-only data. A sample whose assistant turn carries reasoning (reasoning_content or reasoning) is rejected with an error: training on reasoning traces is not supported.

Choose a Workflow

GoalStart Here
Supervised fine-tuning (SFT) on packed 128K sequences, CP16 x EP64Use hy4_flash_tulu3_128k_cp16_ep64_100steps.yaml.
Synthetic throughput workload (--benchmark), 4K sequences, EP64Use hy4_flash_4k_ep64_h100.yaml.
Synthetic throughput workload (--benchmark), 128K sequences, CP16 x EP64Use hy4_flash_128k_cp16_ep64_h100.yaml.
Image-text fine-tuningSee the vision-language model card.

Launch Requirements

  • Set NCCL_PXN_DISABLE=1 (or NCCL_NET_PLUGIN=none NCCL_NET=IB) on multi-node InfiniBand H100 systems. With the container’s default NCCL network plugin and PXN both active, the Engram row-owner all-to-all receives corrupted IDs from ranks on another node and the recipe stops in the table’s received-ID check, as for DeepSeek-V4.1-Flash. See issue #3959. The recipes set it in ci.env_vars.
  • Point the JIT caches at node-local storage (HYBRID_EP_CACHE_DIR, TRITON_CACHE_DIR).
  • The recipes compile the hyper-connection and norm cores (compile_hc, compile_norm), so the first step takes several minutes longer than the following ones. The cores are compiled with options that keep the eager BF16 rounding points, so the compiled norm agrees with the eager one on all but a few elements in a million; LoRA and full fine-tuning start within 1.4e-3 of each other in loss. compile_norm: false gives the eager norm in a process where no model has enabled the compiled core: the core is shared by every Hy4-flash model of a process, so once one model enables it, existing and later instances use it too.

Model Reference

Model Architecture

PropertyValue
TaskText Generation (MoE)
ArchitectureHYV4FlashForConditionalGeneration
Parameters219B total / 11B activated
Hugging Face Organizationtencent

Available Models

ModelHF ID
Hy4-flashtencent/Hy4-flash