Instructions to use tencent/Hy4-flash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tencent/Hy4-flash with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="tencent/Hy4-flash") 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 AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("tencent/Hy4-flash", device_map="auto") - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tencent/Hy4-flash with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tencent/Hy4-flash" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tencent/Hy4-flash", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/tencent/Hy4-flash
- SGLang
How to use tencent/Hy4-flash with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "tencent/Hy4-flash" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tencent/Hy4-flash", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "tencent/Hy4-flash" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tencent/Hy4-flash", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use tencent/Hy4-flash with Docker Model Runner:
docker model run hf.co/tencent/Hy4-flash
Add evaluation results for Hy4-flash
This PR adds .eval_results/Hy4-flash.yaml with the scores from the model card that map to official benchmarks on the Hub. Once it's merged, they show on the model page and on each benchmark's leaderboard (eval-results docs).
Benchmarks added
- DeepSWE: 64.6 (DeepSWE v1.1, mini-SWE-agent)
- Terminal-Bench 4.0: 19.2 (Claude Code harness, up to 500 turns, 13 h timeout per trial)
- APEX-Agents: 63.1 (APEX-Agents v1.1, pass@1, official Loop harness)
- Humanity's Last Exam: 55.2 (Full set, with tools)
- MMMU-Pro (Standard, 10 options): 75.8
Not added (no registered benchmark on the Hub, or no matching task)
WorkIndex internal suite (PPTGenBench, PPTCoEditBench, PPTFixBench, MdCoEditBench, WordEditBench, ExcelFixBench, AudioVideoBench, BuddyVQA Atlas), ProgramBench, AutomationBench, OSWorld 2.1, ZeroBench; base-model table (MMLU, MMLU-Redux, SuperGPQA, C-Eval, CMMLU, SimpleQA, AGIEval, HellaSwag, PIQA, ARC-C, ...) not added since it describes Hy4-flash-base
Notes
Scores are copied from the published model card (Hy4-flash model card (assets/benchmark.png)). They are self-reported, not verified runs. Please check: the card says "MMMU-Pro" without the setting; I mapped it to Standard (10 options), as in the card's base-model table. Tell me if it is the Vision setting and I will move it.
Docs on how eval results work: https://huggingface.co/docs/hub/eval-results. Leaderboard data guide: https://huggingface.co/docs/hub/leaderboard-data-guide