Run this model with HF Jobs

Run tiny-random/hy4-fp8 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/tiny-random/hy4-fp8. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/tiny-random/hy4-fp8 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/tiny-random/hy4-fp8. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-text-to-text", model="tiny-random/hy4-fp8")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
pipe(text=messages)
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoProcessor, AutoModelForMultimodalLM

processor = AutoProcessor.from_pretrained("tiny-random/hy4-fp8")
model = AutoModelForMultimodalLM.from_pretrained("tiny-random/hy4-fp8", device_map="auto")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
inputs = processor.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=256)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

This is a randomly initialized tiny model based on tencent/Hy4-FP8 for testing and debugging.

Feature Source This repo
Checkpoint tensor elements 11.58B BF16, 77.35M F32, 762.82B F8_E4M3 38.41M BF16, 86.48K F32, 31.52M F8_E4M3
Safetensors weight files 786.31 GB (245 files) 108.94 MB (model.safetensors)
Architecture / input HYV4-VL FP8; text, image, video Same
Vocabulary rows / tied embeddings 120,832 / false Same
Backbone layers / MLP layout 78 / 1 dense + 77 MoE 10 / 1 dense + MoE
Hidden width / dense MLP width 6,144 / 18,432 128 / 128
Routed experts / top-k / shared experts 256 / 8 / 1 32 / 8 / 1
Expert intermediate size 2,048 256
Q heads; non-RoPE / RoPE / V dimensions 64; 192 / 64 / 256 8; 32 / 64 / 32
Q / KV LoRA rank 2,048 / 512 64 / 512
Indexer heads / dimension / top-k 32 / 128 / 2,048 32 / 128 / 2,048
Indexer layer cadence full at 0, 1, then every 4th layer Same
Independent Hyper-Connections 4 streams; gated pre-branches Same
MLA gating / learned sinks / SwiGLU clamp elementwise / enabled / 10 Same
Vision layers / width / output width 40 / 1,536 / 6,144 4 / 64 / 128
DFly2 draft layers 5 dense MLA layers, fusion and hidden correction Same structure
Quantization compressed-tensors block FP8 (E4M3, F32 128x128 blocks); token matrices/vit/layer-0 attention BF16 Same descriptor and exclusions
Checkpoint precision FP8 E4M3 weights + F32 block scales; F32 iHC/sinks/router bias Same

Block-FP8 on SM90 requires the GEMM reduction dim K % 128 == 0; hidden_size is that dim for the expert gate/up, attention linear_gate and q_a_proj, so this variant uses hidden_size=128 and cannot reuse the BF16 sibling's width. Routed experts are stored per-expert (experts.E.{gate,up,down}_proj.weight[_scale]) as in the source, with 128x128 blocks tiled by ceil. The untied BF16 token matrices dominate the size (~62 MB at hidden 128).

File path Size
model.safetensors 108.9MB

Example usage

SGLang (✅ verified)

Hy4-VL block-FP8 support is in SGLang PR #51672 (git+https://github.com/sgl-project/sglang.git@a0804a2f99719f5666ed2018e5d00a75645de6a8#subdirectory=python), not a released wheel. Install it into a CUDA 13 stack (torch 2.14.1+cu130, flashinfer 0.7.4, sgl-fa3, sgl-flash-mla) and set SGLANG_SKIP_SGL_KERNEL_VERSION_CHECK=1 (Hy4 uses SGLang's bundled triton kernels). On an H20 (driver 535) prepend the extracted cuda-compat-13 libcuda.so.1 to LD_LIBRARY_PATH and LIBRARY_PATH.

sglang serve --model-path tiny-random/hy4-fp8 --tp 2 \
  --dtype bfloat16 --context-length 4096 \
  --reasoning-parser auto --tool-call-parser auto \
  --served-model-name hy4-fp8 --host 0.0.0.0 --port 30000

Images and videos use the prompt's <image> / <video> placeholders. Verify chat, image and video requests against the OpenAI-compatible endpoint.

Creating this repo

Change log

  • 2026-11-22: Initial tiny Hy4 FP8 vision-language checkpoint.

This repo is generated by DeepSeek-V4.1-Flash.

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

Model tree for tiny-random/hy4-fp8

Base model

tencent/Hy4-FP8
Quantized
(2)
this model

Collection including tiny-random/hy4-fp8