Image-Text-to-Text
Transformers
Safetensors
English
Chinese
hy_v3_vl
embodied-ai
vision-language-model
robotics
spatial-reasoning
multimodal
Mixture of Experts
vllm
conversational
custom_code
Instructions to use tencent/Hy-Embodied-VLM-1.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tencent/Hy-Embodied-VLM-1.0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="tencent/Hy-Embodied-VLM-1.0", trust_remote_code=True) 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)# Load model directly from transformers import AutoModelForImageTextToText model = AutoModelForImageTextToText.from_pretrained("tencent/Hy-Embodied-VLM-1.0", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tencent/Hy-Embodied-VLM-1.0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tencent/Hy-Embodied-VLM-1.0" # 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/Hy-Embodied-VLM-1.0", "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/Hy-Embodied-VLM-1.0
- SGLang
How to use tencent/Hy-Embodied-VLM-1.0 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/Hy-Embodied-VLM-1.0" \ --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/Hy-Embodied-VLM-1.0", "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/Hy-Embodied-VLM-1.0" \ --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/Hy-Embodied-VLM-1.0", "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/Hy-Embodied-VLM-1.0 with Docker Model Runner:
docker model run hf.co/tencent/Hy-Embodied-VLM-1.0
| { | |
| "architectures": [ | |
| "HYV3VLForConditionalGeneration" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "attention_head_dim": 128, | |
| "bos_token_id": 120000, | |
| "eod_token_id": 120020, | |
| "eos_token_id": 120025, | |
| "expert_hidden_dim": 768, | |
| "first_k_dense_replace": 1, | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 2048, | |
| "image_start_token_id": 120118, | |
| "image_end_token_id": 120119, | |
| "image_token_id": 120120, | |
| "image_newline_token_id": 120121, | |
| "video_token_id": 120683, | |
| "video_start_token_id": 120122, | |
| "video_end_token_id": 120123, | |
| "initializer_range": 0.006, | |
| "intermediate_size": 6912, | |
| "max_position_embeddings": 32768, | |
| "mlp_bias": false, | |
| "model_type": "hy_v3_vl", | |
| "moe_router_enable_expert_bias": true, | |
| "moe_router_use_sigmoid": true, | |
| "n_group": null, | |
| "norm_topk_prob": true, | |
| "num_attention_heads": 32, | |
| "num_experts": 128, | |
| "num_experts_per_tok": 8, | |
| "num_hidden_layers": 48, | |
| "num_key_value_heads": 4, | |
| "num_shared_experts": 1, | |
| "org_vocab_size": 120818, | |
| "pad_id": 120002, | |
| "pad_token_id": 120002, | |
| "qk_norm": true, | |
| "rms_norm_eps": 1e-05, | |
| "rope_scaling": { | |
| "rope_type": "default", | |
| "mrope_interleaved": true, | |
| "mrope_section": [ | |
| 24, | |
| 20, | |
| 20 | |
| ] | |
| }, | |
| "rope_theta": 11158840, | |
| "route_norm": true, | |
| "router_scaling_factor": 2.826, | |
| "tie_word_embeddings": false, | |
| "transformers_version": "4.57.0", | |
| "use_cache": true, | |
| "use_grouped_mm": false, | |
| "vision_config": { | |
| "add_patchemb_bias": true, | |
| "attention_dropout": 0.0, | |
| "cat_extra_token": 0, | |
| "hidden_act": "gelu", | |
| "hidden_dropout": 0.0, | |
| "hidden_size": 1152, | |
| "img_max_token_num": 4096, | |
| "intermediate_size": 4304, | |
| "interpolate_mode": "bilinear", | |
| "max_image_size": 2048, | |
| "max_vit_seq_len": 16384, | |
| "num_attention_heads": 16, | |
| "num_channels": 3, | |
| "num_hidden_layers": 27, | |
| "out_hidden_size": 2048, | |
| "patch_size": 16, | |
| "rms_norm_eps": 1e-05, | |
| "temporal_patch_size": 1, | |
| "spatial_patch_size": 1, | |
| "spatial_merge_size": 2, | |
| "perceive_post_norm": false, | |
| "video_spatial_compression": false, | |
| "video_temporal_compression": false | |
| }, | |
| "vocab_size": 120818, | |
| "auto_map": { | |
| "AutoConfig": "configuration_hy_v3_vl.HYV3VLConfig", | |
| "AutoModel": "modeling_hy_v3_vl.HYV3VLModel", | |
| "AutoModelForCausalLM": "modeling_hy_v3_vl.HYV3VLForCausalLM", | |
| "AutoModelForImageTextToText": "modeling_hy_v3_vl.HYV3VLForConditionalGeneration", | |
| "AutoImageProcessor": "image_processing_hunyuan_vl.HunYuanVLImageProcessor", | |
| "AutoProcessor": "processing_hy_v3_vl.HYV3VLProcessor", | |
| "AutoVideoProcessor": "video_processing_hy_v3_vl.HYV3VLVideoProcessor" | |
| } | |
| } |