Hy4-flash
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.
Fine-Tune Hy4-flash
Follow the installation instructions, then review the checked-in recipes and their declared topology below before choosing a local or cluster launcher.
Use the Slurm launcher guide for the multi-node runs.
Choose a Workflow
Configuration
Both recipes train on 64 samples per optimizer step with one sample per GPU. The LoRA recipe reaches that on 16 GPUs
with four accumulated micro-batches (global_batch_size: 64, local_batch_size: 1). LoRA keeps no gradients or
optimizer state for the expert and Engram shards, so a GPU holds one sixteenth of the model at a peak of about
45 GiB allocated.
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.
Launch Requirements
The multi-node launch requirements (NCCL_PXN_DISABLE=1, JIT cache placement, and the compiled cores) are on
the language model card.