Image-Text-to-Text
Transformers
Safetensors
kimi_k25
feature-extraction
compressed-tensors
conversational
custom_code
Eval Results
Instructions to use moonshotai/Kimi-K2.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use moonshotai/Kimi-K2.5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="moonshotai/Kimi-K2.5", 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 AutoProcessor, AutoModel processor = AutoProcessor.from_pretrained("moonshotai/Kimi-K2.5", trust_remote_code=True) model = AutoModel.from_pretrained("moonshotai/Kimi-K2.5", trust_remote_code=True, device_map="auto") 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?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use moonshotai/Kimi-K2.5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "moonshotai/Kimi-K2.5" # 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-K2.5", "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-K2.5
- SGLang
How to use moonshotai/Kimi-K2.5 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-K2.5" \ --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-K2.5", "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-K2.5" \ --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-K2.5", "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-K2.5 with Docker Model Runner:
docker model run hf.co/moonshotai/Kimi-K2.5
Commit History
-
Create .eval_results/apex-agents.yaml
Verified signature067c4ad
-
fix recommended order of multimodal inputs
Verified signature54383e8
-
doc: add link for paper and github repo (#53)
- doc: add link for paper and github repo (5226a044c91157eab28342b04606057af441939d) Co-authored-by: Yu Fan <FuryMartin@users.noreply.huggingface.co>3367c8d
-
Update README.md
Verified signaturec0d6821 -
link to hf paper
Verified signaturedf44e69
-
Updated deployment command to include encoder TP mode
Verified signature2426b45
-
Remove unnecessary deprecated import (#26)
Verified signature- Remove unnecessary deprecated import (84b5da83232fbb9f013a9a1eacbe54a3f121e9bd) Co-authored-by: Harry Mellor <hmellor@users.noreply.huggingface.co>61d22d6
-
Remove default system prompt, fix media_start token and update readme (#20)
Verified signature- remove default system prompt (3a2c18aa8f64e39d29a7974a686e388f7f5f6292) - fix: should be <|media_start|> (729b62b748575b92fee4c44b03c2aca54c447cb9) - fix: should be <|media_start|> (d1bc6a58155f947418c2e48c79978634d0ac925b) - use media_begin because it was in 3rd party code (abb1505cb489130aec852226de64a48a9bbc3458) - fix (2e6b74b356fe2968c1213b798d601da8311482ba) - fix (b9d08095157e03efb215ddac3619641c09176c80) - update README (d03fdeaffc59afeac9082ab5fa0c21362cb7bc7f) - fix format (847724a8eb9d7a931b8978d1a5cf7d73662f9174)6650964 -
docs: fix vLLM tensor parallel flag in deploy guide (#24)
Verified signature- docs: fix vLLM tensor parallel flag in deploy guide (6370771a8cdf0d76bc05a637d80846ef6dc127c1) Co-authored-by: applesilicon <applesilicon@users.noreply.huggingface.co>907b3ee
-
Fix grammar and punctuation errors in README.md (#12)
Verified signature- Fix grammar and punctuation errors in README.md (58556c39bc3ac04f8b8a9f2b50099e6bc5a99a10) Co-authored-by: Suqin Zhang <TomGrc@users.noreply.huggingface.co>8d93622 -
Add compressed-tensors tag (#9)
Verified signature- Add compressed-tensors tag (966dec9b3ccdbbc3ee49f11032f98e10289be246) Co-authored-by: Dipika <dsikka@users.noreply.huggingface.co>911dce1 -
Compatibility with transformers v5 (#11)
Verified signature- Compatibility with transformers v5 (dca5adf0f5841e06cd454b06aec140358788b2ac) Co-authored-by: Pedro Cuenca <pcuenq@users.noreply.huggingface.co>8922bd6
-
Update README.md
Verified signature9659d5d -
Update README.md
Verified signaturea13437f -
Update README.md
Verified signature9196113 -
Update README.md
Verified signature1336cf3 -
Update README.md
Verified signaturea7eaad5 -
Update README.md
Verified signature1a2ecac -
Update README.md
Verified signature7eef118
-
Add files using upload-large-folder tool
70a8ad0 -
initial commit
Verified signature511c492