Image-Text-to-Text
Transformers
Safetensors
kimi_vl
feature-extraction
agent
video
screenspot
long-context
conversational
custom_code
Eval Results
Instructions to use moonshotai/Kimi-VL-A3B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use moonshotai/Kimi-VL-A3B-Instruct 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-Instruct", 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("moonshotai/Kimi-VL-A3B-Instruct", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use moonshotai/Kimi-VL-A3B-Instruct 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-Instruct" # 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-Instruct", "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-Instruct
- SGLang
How to use moonshotai/Kimi-VL-A3B-Instruct 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-Instruct" \ --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-Instruct", "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-Instruct" \ --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-Instruct", "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-Instruct with Docker Model Runner:
docker model run hf.co/moonshotai/Kimi-VL-A3B-Instruct
Commit History
-
Make model compatible with Transformers v5 (#34)
Verified signature- Make model compatible with Transformers v5 (7ace13de4d2bd13c951c6c969632d5322eb1c299) Co-authored-by: Harry Mellor <hmellor@users.noreply.huggingface.co>398eede
-
Fix the AttributeError: 'KimiVLForConditionalGeneration' object has no attribute '_supports_sdpa' issue after bumping to transformers==4.54.0 (#29)
Verified signature- Fix the AttributeError: 'KimiVLForConditionalGeneration' object has no attribute '_supports_sdpa' issue after bumping to transformers==4.54.0 (b9478eca74c82bf4e1802ab4e820651e42883326) Co-authored-by: He <hebiao064@users.noreply.huggingface.co>4f50fd8
-
remove-img-test-validation (#28)
Verified signature- remove image text order check (8e9d1353d731ee674fb4dbdc63fdb673c55043f5)6d46156
-
Update README.md
Verified signaturecc64525
-
update generation_config.json (#23)
Verified signature- update generation config (b69f8db56aa96ffab33948cebb51785d0c57ace7)7a3c132 -
revert the temperature to 0.2 (#22)
Verified signature- update temperature (fd57b5a7d4dff137ecf9f665ee697a5bf917c001)b0b86ff -
set do_sample as true (#21)
Verified signature- set do_sample as true (7b0537e23d4a64c9aefe373d8216938c7c45dbb4)0157cd8 -
add generation_config.config (#19)
Verified signature- add generation_config.json (f8b03cbb6ba89325301f52a82dc1198c762a1b52)b6e11f3 -
remove log from tokenizer (#18)
Verified signature- remove log from tokenizer (704cff53c1103702626e95d61c41bf608fea096d)bd66f6c
-
Update README.md
Verified signaturea2143f9 -
Update README.md
Verified signature5012bd6
-
support training (#15)
Verified signature- support training (14b9a5a2f890b44c26c24662b5b11e910b944276) - set alpha (31d002cc97edebee30491753d129169f342e6745)b39889c -
tokenizer can decode tensor for vllm test (#14)
Verified signature- tokenizer can decode tensor for vllm test (da9637b13c17a1c828afd4c8d010df0fd081fd19)4dea07c -
Add library_name metadata (#13)
Verified signature- Add library_name metadata (f96697db51fa5ac1e2861a2439d1ca9b3dc777a4) Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>b13cf2f
-
fix GenerationMixin ImportError in transformers main branch (#12)
Verified signature- fix GenerationMixin ImportError in transformers main branch (4ba2441d1ca881cf9cb3e687184d490d7687c1ca) - revert (2109fd69a52f3ff0aaf75c2f13b932a566bd1190)4299772
-
Update README.md
Verified signature49a5b66 -
Update README.md
Verified signature5fbf663 -
Update README.md
Verified signature9540842
-
can set attn_implemention (#8)
Verified signature- can set attn_implementation (9e6c3226b877a6be05e385279d56fcf26a0f9fab) - add sdpa back (7718375747c38ef6a6e957a615edd4b3df495282) - add blank (d869dc5ea79e62a0697c986a0fdeab12860c65bf)725901f -
Update README.md
Verified signaturea98910a -
support infer in cpu device (#4)
Verified signature- make vit work with cpu device (73cd0c73d98c27f82cc525c1cc5f48118ea3c686) - fix import (9d09fe5da66ed112c3a7e066bce23e8aacee3fe3)9e0cbfa
-
upload
zhouzaida704b5c8 -
initial commit
Unverified signaturee347507