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")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("moonshotai/Kimi-K2.5", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- 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/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "moonshotai/Kimi-K2.5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "moonshotai/Kimi-K2.5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "moonshotai/Kimi-K2.5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use moonshotai/Kimi-K2.5 with Docker Model Runner:
docker model run hf.co/moonshotai/Kimi-K2.5
多图输入的占位符或顺序?
#63
by noobimp - opened
Hi,想请问一下,类似MMMU-Pro的多图输入应该如何组织prompt,用< image >占位并按顺序传图片就可以吗?感谢~
hi
我们测试了很多种方式,MMMU-Pro的性能都比较稳定在report分数,方差较低。
- 图片的插入方式:
不建议采取 model judge 的方式!
- 把所有图统一放到最前,后边按照 image1, 2,3,4 来占位
- 把图插入到 placeholder对应的位置
- 测试的prompt:
不建议采取 model judge 的方式,可能会受 judge model 倾向的影响
- 使用MMMU-Pro官方的测试prompt,加对应的regex提取
- 参考MMLU-Pro官方测试prompt,加对应的regex提取
我们测试了很多种方式,MMMU-Pro的性能都比较稳定在report分数,方差较低。
- 图片的插入方式:
不建议采取 model judge 的方式!
- 把所有图统一放到最前,后边按照 image1, 2,3,4 来占位
- 把图插入到 placeholder对应的位置
- 测试的prompt:
不建议采取 model judge 的方式,可能会受 judge model 倾向的影响
- 使用MMMU-Pro官方的测试prompt,加对应的regex提取
- 参考MMLU-Pro官方测试prompt,加对应的regex提取
感谢您的回复,我基本沿用了MMMU-Pro官方的code,按顺序组织图片,先传图再传文本,占位符只用了image,没有标1, 2, 3, 4;按规则抽取&评估答案,性能也基本一致。
再次感谢~
