Instructions to use moonshotai/Kimi-VL-A3B-Thinking-2506 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use moonshotai/Kimi-VL-A3B-Thinking-2506 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="moonshotai/Kimi-VL-A3B-Thinking-2506", 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 AutoModel model = AutoModel.from_pretrained("moonshotai/Kimi-VL-A3B-Thinking-2506", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use moonshotai/Kimi-VL-A3B-Thinking-2506 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "moonshotai/Kimi-VL-A3B-Thinking-2506" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "moonshotai/Kimi-VL-A3B-Thinking-2506", "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/moonshotai/Kimi-VL-A3B-Thinking-2506
- SGLang
How to use moonshotai/Kimi-VL-A3B-Thinking-2506 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 "moonshotai/Kimi-VL-A3B-Thinking-2506" \ --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": "moonshotai/Kimi-VL-A3B-Thinking-2506", "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 "moonshotai/Kimi-VL-A3B-Thinking-2506" \ --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": "moonshotai/Kimi-VL-A3B-Thinking-2506", "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 moonshotai/Kimi-VL-A3B-Thinking-2506 with Docker Model Runner:
docker model run hf.co/moonshotai/Kimi-VL-A3B-Thinking-2506
Please Support Pipeline Parallism
(APIServer pid=35) NotImplementedError: Pipeline parallelism is not supported for this model. Supported models implement the SupportsPP interface.
I am trying to host this on vLLM with Pipeline Parallelism as I have 2 GPUs on 2 different nodes. But looks like its not support for this model. I have loaded some other models and pipeline parallelism is working well.
stack trace:
(APIServer pid=35) File "/usr/lib/python3.12/contextlib.py", line 210, in aenter
(APIServer pid=35) return await anext(self.gen)
(APIServer pid=35) ^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=35) File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/api_server.py", line 204, in build_async_engine_client_from_engine_args
(APIServer pid=35) vllm_config = engine_args.create_engine_config(usage_context=usage_context)
(APIServer pid=35) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(APIServer pid=35) File "/usr/local/lib/python3.12/dist-packages/vllm/engine/arg_utils.py", line 1335, in create_engine_config
(APIServer pid=35) config = VllmConfig(
(APIServer pid=35) ^^^^^^^^^^^
(APIServer pid=35) File "/usr/local/lib/python3.12/dist-packages/pydantic/_internal/_dataclasses.py", line 120, in init
(APIServer pid=35) s.pydantic_validator.validate_python(ArgsKwargs(args, kwargs), self_instance=s)
(APIServer pid=35) File "/usr/local/lib/python3.12/dist-packages/vllm/config/init.py", line 3998, in post_init
(APIServer pid=35) self.model_config.verify_with_parallel_config(self.parallel_config)
(APIServer pid=35) File "/usr/local/lib/python3.12/dist-packages/vllm/config/init.py", line 1318, in verify_with_parallel_config
(APIServer pid=35) raise NotImplementedError(
(APIServer pid=35) NotImplementedError: Pipeline parallelism is not supported for this model. Supported models implement the SupportsPP interface.
it seems to me the model supports pipeline parallel, maybe you just need to add a SupportsPP interface. Feel free to open a PR in vLLM.
Thank you!
It has been added in https://github.com/vllm-project/vllm/commit/fda9537c5e61ea8226fa7e5b60912deda97a8aab