Image-Text-to-Text
Transformers
Safetensors
English
qwen3_vl_timeple
video
video-temporal-grounding
qwen3-vl
timeple
conversational
Instructions to use KlingTeam/TimePLE with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KlingTeam/TimePLE with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="KlingTeam/TimePLE") 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 Qwen3VLForConditionalGenerationWithTimePLECodec model = Qwen3VLForConditionalGenerationWithTimePLECodec.from_pretrained("KlingTeam/TimePLE", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use KlingTeam/TimePLE with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KlingTeam/TimePLE" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KlingTeam/TimePLE", "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/KlingTeam/TimePLE
- SGLang
How to use KlingTeam/TimePLE 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 "KlingTeam/TimePLE" \ --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": "KlingTeam/TimePLE", "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 "KlingTeam/TimePLE" \ --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": "KlingTeam/TimePLE", "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 KlingTeam/TimePLE with Docker Model Runner:
docker model run hf.co/KlingTeam/TimePLE
| { | |
| "architectures": [ | |
| "Qwen3VLForConditionalGenerationWithTimePLECodec" | |
| ], | |
| "default_video_duration_sec": 1.0, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 151645, | |
| "freeze_language": false, | |
| "freeze_vision": true, | |
| "hidden_size": 4096, | |
| "image_token_id": 151655, | |
| "model_type": "qwen3_vl_timeple", | |
| "pad_token_id": 151643, | |
| "text_config": { | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 151643, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 151645, | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 4096, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 12288, | |
| "max_position_embeddings": 262144, | |
| "model_type": "qwen3_vl_text", | |
| "num_attention_heads": 32, | |
| "num_hidden_layers": 36, | |
| "num_key_value_heads": 8, | |
| "pad_token_id": 151643, | |
| "rms_norm_eps": 1e-06, | |
| "rope_scaling": { | |
| "mrope_interleaved": true, | |
| "mrope_section": [ | |
| 24, | |
| 20, | |
| 20 | |
| ], | |
| "rope_type": "default" | |
| }, | |
| "rope_theta": 5000000, | |
| "use_cache": true, | |
| "vocab_size": 151671 | |
| }, | |
| "tie_word_embeddings": false, | |
| "timespan_token_id": 151670, | |
| "timestamp_token_id": 151669, | |
| "transformers_version": "4.57.1", | |
| "video_token_id": 151656, | |
| "vision_config": { | |
| "deepstack_visual_indexes": [ | |
| 8, | |
| 16, | |
| 24 | |
| ], | |
| "depth": 27, | |
| "dtype": "bfloat16", | |
| "hidden_act": "gelu_pytorch_tanh", | |
| "hidden_size": 1152, | |
| "in_channels": 3, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 4304, | |
| "model_type": "qwen3_vl", | |
| "num_heads": 16, | |
| "num_position_embeddings": 2304, | |
| "out_hidden_size": 4096, | |
| "pad_token_id": 151643, | |
| "patch_size": 16, | |
| "spatial_merge_size": 2, | |
| "temporal_patch_size": 2 | |
| }, | |
| "vision_end_token_id": 151653, | |
| "vision_start_token_id": 151652, | |
| "timeple_codec_config": { | |
| "decoder": { | |
| "activation": "gelu", | |
| "dropout": 0.0, | |
| "duration_adaptive_residual": { | |
| "activation": "gelu", | |
| "dropout": 0.0, | |
| "enabled": true, | |
| "hidden_dims": [ | |
| 256 | |
| ], | |
| "scale": 0.02, | |
| "use_layer_norm": true, | |
| "weight_eps": 0.0001, | |
| "weight_max": 10.0, | |
| "weight_mode": "relative_sqrt_inv" | |
| }, | |
| "trunk_hidden_dims": [ | |
| 2048, | |
| 1024 | |
| ], | |
| "use_layer_norm": true | |
| }, | |
| "encoder": { | |
| "activation": "gelu", | |
| "dropout": 0.0, | |
| "hidden_dims": [ | |
| 512, | |
| 2048 | |
| ], | |
| "use_layer_norm": true | |
| }, | |
| "grid": { | |
| "num_u_bins": 128, | |
| "num_v_bins": 128, | |
| "span_sigma_u": 0.015, | |
| "span_sigma_v": 0.015 | |
| }, | |
| "loss": { | |
| "absolute_long_weight": 1.0, | |
| "absolute_medium_threshold_sec": 30.0, | |
| "absolute_medium_weight": 1.5, | |
| "absolute_short_threshold_sec": 10.0, | |
| "absolute_short_weight": 3.0, | |
| "boundary_weight_eps": 0.0001, | |
| "boundary_weight_max": 10.0, | |
| "boundary_weight_mode": "absolute_bucket", | |
| "boundary_weight_normalize": true, | |
| "lambda_boundary": 0.5, | |
| "lambda_dfl": 1.0, | |
| "lambda_iou": 1.0 | |
| }, | |
| "token_dim": 4096, | |
| "transform": { | |
| "eps": 1e-06, | |
| "tau": 0.0 | |
| } | |
| }, | |
| "timeple_interface_adapter": { | |
| "adapter_type": "mlp_projector", | |
| "projector": { | |
| "input": { | |
| "activation": "gelu", | |
| "anchor_alpha_init": 0.01, | |
| "anchor_alpha_max": 0.02, | |
| "dropout": 0.0, | |
| "hidden_dim": 4096 | |
| }, | |
| "output": { | |
| "activation": "gelu", | |
| "dropout": 0.0, | |
| "hidden_dim": 4096 | |
| } | |
| } | |
| }, | |
| "use_timeple_codec": true, | |
| "use_timeple_interface_adapter": true | |
| } | |