Image-Text-to-Text
Transformers
Safetensors
kimi_k3
feature-extraction
int4
vllm
llm-compressor
compressed-tensors
conversational
custom_code
Instructions to use RedHatAI/Kimi-K3-INT4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RedHatAI/Kimi-K3-INT4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="RedHatAI/Kimi-K3-INT4", 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("RedHatAI/Kimi-K3-INT4", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use RedHatAI/Kimi-K3-INT4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RedHatAI/Kimi-K3-INT4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RedHatAI/Kimi-K3-INT4", "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/RedHatAI/Kimi-K3-INT4
- SGLang
How to use RedHatAI/Kimi-K3-INT4 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 "RedHatAI/Kimi-K3-INT4" \ --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": "RedHatAI/Kimi-K3-INT4", "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 "RedHatAI/Kimi-K3-INT4" \ --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": "RedHatAI/Kimi-K3-INT4", "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 RedHatAI/Kimi-K3-INT4 with Docker Model Runner:
docker model run hf.co/RedHatAI/Kimi-K3-INT4
Update README.md
Browse files
README.md
CHANGED
|
@@ -130,13 +130,13 @@ This model was evaluated on 100-sample smoke subsets of MATH-500 and GPQA Diamon
|
|
| 130 |
<tbody>
|
| 131 |
<tr>
|
| 132 |
<td rowspan="2"><b>Reasoning</b></td>
|
| 133 |
-
<td>MATH-500 (0-shot, pass@1
|
| 134 |
<td>90.00%</td>
|
| 135 |
<td>87.00%</td>
|
| 136 |
<td>96.67%</td>
|
| 137 |
</tr>
|
| 138 |
<tr>
|
| 139 |
-
<td>GPQA Diamond (0-shot, pass@1
|
| 140 |
<td>91.00%</td>
|
| 141 |
<td>92.00%</td>
|
| 142 |
<td>101.10%</td>
|
|
@@ -178,16 +178,6 @@ model_parameters:
|
|
| 178 |
timeout: 14400
|
| 179 |
```
|
| 180 |
|
| 181 |
-
Run the tasks:
|
| 182 |
-
|
| 183 |
-
```bash
|
| 184 |
-
lighteval endpoint litellm litellm_config.yaml 'math_500|0' \
|
| 185 |
-
--output-dir results/math_500 --save-details --max-samples 100
|
| 186 |
-
|
| 187 |
-
lighteval endpoint litellm litellm_config.yaml 'gpqa:diamond|0' \
|
| 188 |
-
--output-dir results/gpqa_diamond --save-details --max-samples 100
|
| 189 |
-
```
|
| 190 |
-
|
| 191 |
## License
|
| 192 |
|
| 193 |
The model is provided under the [Kimi K3 license](https://huggingface.co/moonshotai/Kimi-K3/blob/main/LICENSE). Review the original model license and terms before use or redistribution.
|
|
|
|
| 130 |
<tbody>
|
| 131 |
<tr>
|
| 132 |
<td rowspan="2"><b>Reasoning</b></td>
|
| 133 |
+
<td>MATH-500 (0-shot, pass@1</td>
|
| 134 |
<td>90.00%</td>
|
| 135 |
<td>87.00%</td>
|
| 136 |
<td>96.67%</td>
|
| 137 |
</tr>
|
| 138 |
<tr>
|
| 139 |
+
<td>GPQA Diamond (0-shot, pass@1)</td>
|
| 140 |
<td>91.00%</td>
|
| 141 |
<td>92.00%</td>
|
| 142 |
<td>101.10%</td>
|
|
|
|
| 178 |
timeout: 14400
|
| 179 |
```
|
| 180 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 181 |
## License
|
| 182 |
|
| 183 |
The model is provided under the [Kimi K3 license](https://huggingface.co/moonshotai/Kimi-K3/blob/main/LICENSE). Review the original model license and terms before use or redistribution.
|