Image-Text-to-Text
Transformers
Safetensors
kimi_k25
feature-extraction
auto-round
conversational
custom_code
8-bit precision
compressed-tensors
Instructions to use INCModel/Kimi-K2.5-MXFP4-AutoRound with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use INCModel/Kimi-K2.5-MXFP4-AutoRound with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="INCModel/Kimi-K2.5-MXFP4-AutoRound", 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("INCModel/Kimi-K2.5-MXFP4-AutoRound", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use INCModel/Kimi-K2.5-MXFP4-AutoRound with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "INCModel/Kimi-K2.5-MXFP4-AutoRound" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "INCModel/Kimi-K2.5-MXFP4-AutoRound", "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/INCModel/Kimi-K2.5-MXFP4-AutoRound
- SGLang
How to use INCModel/Kimi-K2.5-MXFP4-AutoRound 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 "INCModel/Kimi-K2.5-MXFP4-AutoRound" \ --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": "INCModel/Kimi-K2.5-MXFP4-AutoRound", "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 "INCModel/Kimi-K2.5-MXFP4-AutoRound" \ --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": "INCModel/Kimi-K2.5-MXFP4-AutoRound", "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 INCModel/Kimi-K2.5-MXFP4-AutoRound with Docker Model Runner:
docker model run hf.co/INCModel/Kimi-K2.5-MXFP4-AutoRound
| tags: | |
| - auto-round | |
| license: other | |
| license_name: modified-mit | |
| library_name: transformers | |
| pipeline_tag: image-text-to-text | |
| base_model: | |
| - moonshotai/Kimi-K2.5 | |
| ## Model Details | |
| This model is a MXFP4 model of [moonshotai/Kimi-K2.5](https://huggingface.co/moonshotai/Kimi-K2.5) generated by [intel/auto-round](https://github.com/intel/auto-round) with RTN mode. Please follow the license of the original model. | |
| ## vllm Infernece Example | |
| ~~~bash | |
| vllm serve INCModel/Kimi-K2.5-MXFP4-AutoRound -tp 8 --mm-encoder-tp-mode data --trust-remote-code --tool-call-parser kimi_k2 --reasoning-parser kimi_k2 --served-model-name kimi --max-model-len 4096 | |
| ~~~ | |
| ~~~bash | |
| curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d ' { | |
| "model": "kimi", | |
| "messages": [ | |
| {"role": "system", "content": "You are a helpful assistant."}, | |
| {"role": "user", "content": "Write code to fine-tune an LLM."} | |
| ], | |
| "temperature": 1, | |
| "max_tokens": 2048 | |
| } ' | |
| ~~~ | |
| ## Generate the Model | |
| This pr is required https://github.com/intel/auto-round/pull/1642 | |
| RTN version | |
| ~~~bash | |
| auto-round /workspace/models/moonshotai/Kimi-K2.5 --iters 0 --disable_opt_rtn --scheme mxfp4 --format llm_compressor --output_dir /workspace/models/moonshotai/Kimi-K2.5-MXFP4 | |
| # the automatic saved preprocessor_config.json doesn't work, copy it. | |
| cp /workspace/models/moonshotai/Kimi-K2.5/preprocessor_config.json /workspace/models/moonshotai/Kimi-K2.5-MXFP4/Kimi-K2.5-mxfp-w4g32/preprocessor_config.json | |
| ~~~ | |
| ## Ethical Considerations and Limitations | |
| The model can produce factually incorrect output, and should not be relied on to produce factually accurate information. Because of the limitations of the pretrained model and the finetuning datasets, it is possible that this model could generate lewd, biased or otherwise offensive outputs. | |
| Therefore, before deploying any applications of the model, developers should perform safety testing. | |
| ## Caveats and Recommendations | |
| Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. | |
| Here are a couple of useful links to learn more about Intel's AI software: | |
| - [Intel Neural Compressor](https://github.com/intel/neural-compressor) | |
| ## Disclaimer | |
| The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. Please consult an attorney before using this model for commercial purposes. | |
| ## Cite | |
| @article{cheng2023optimize, title={Optimize weight rounding via signed gradient descent for the quantization of llms}, author={Cheng, Wenhua and Zhang, Weiwei and Shen, Haihao and Cai, Yiyang and He, Xin and Lv, Kaokao and Liu, Yi}, journal={arXiv preprint arXiv:2309.05516}, year={2023} } | |
| [arxiv](https://arxiv.org/abs/2309.05516) [github](https://github.com/intel/auto-round) |