Image-Text-to-Text
Transformers
Safetensors
MLX
multilingual
kimi_vl
feature-extraction
internvl
custom_code
conversational
Instructions to use mlx-community/Kimi-VL-A3B-Thinking-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mlx-community/Kimi-VL-A3B-Thinking-4bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="mlx-community/Kimi-VL-A3B-Thinking-4bit", 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("mlx-community/Kimi-VL-A3B-Thinking-4bit", trust_remote_code=True, device_map="auto") - MLX
How to use mlx-community/Kimi-VL-A3B-Thinking-4bit with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("mlx-community/Kimi-VL-A3B-Thinking-4bit") config = load_config("mlx-community/Kimi-VL-A3B-Thinking-4bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- vLLM
How to use mlx-community/Kimi-VL-A3B-Thinking-4bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mlx-community/Kimi-VL-A3B-Thinking-4bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlx-community/Kimi-VL-A3B-Thinking-4bit", "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/mlx-community/Kimi-VL-A3B-Thinking-4bit
- SGLang
How to use mlx-community/Kimi-VL-A3B-Thinking-4bit 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 "mlx-community/Kimi-VL-A3B-Thinking-4bit" \ --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": "mlx-community/Kimi-VL-A3B-Thinking-4bit", "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 "mlx-community/Kimi-VL-A3B-Thinking-4bit" \ --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": "mlx-community/Kimi-VL-A3B-Thinking-4bit", "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 mlx-community/Kimi-VL-A3B-Thinking-4bit with Docker Model Runner:
docker model run hf.co/mlx-community/Kimi-VL-A3B-Thinking-4bit
- Atomic Chat
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,21 +1,18 @@
|
|
| 1 |
---
|
| 2 |
-
license: other
|
| 3 |
-
license_name: qwen
|
| 4 |
-
license_link: https://huggingface.co/Qwen/Qwen2.5-72B-Instruct/blob/main/LICENSE
|
| 5 |
pipeline_tag: image-text-to-text
|
| 6 |
library_name: transformers
|
| 7 |
base_model:
|
| 8 |
-
-
|
| 9 |
-
- Qwen/Qwen2.5-0.5B
|
| 10 |
base_model_relation: merge
|
| 11 |
-
datasets:
|
| 12 |
-
- OpenGVLab/MMPR-v1.2
|
| 13 |
language:
|
| 14 |
- multilingual
|
| 15 |
tags:
|
| 16 |
-
-
|
| 17 |
- custom_code
|
| 18 |
- mlx
|
|
|
|
|
|
|
|
|
|
| 19 |
---
|
| 20 |
|
| 21 |
# mlx-community/Kimi-VL-A3B-Thinking-4bit
|
|
@@ -28,5 +25,5 @@ pip install -U mlx-vlm
|
|
| 28 |
```
|
| 29 |
|
| 30 |
```bash
|
| 31 |
-
python -m mlx_vlm.generate --model mlx-community/Kimi-VL-A3B-Thinking-4bit --max-tokens
|
| 32 |
-
```
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
| 2 |
pipeline_tag: image-text-to-text
|
| 3 |
library_name: transformers
|
| 4 |
base_model:
|
| 5 |
+
- moonshotai/Kimi-VL-A3B-Instruct
|
|
|
|
| 6 |
base_model_relation: merge
|
|
|
|
|
|
|
| 7 |
language:
|
| 8 |
- multilingual
|
| 9 |
tags:
|
| 10 |
+
- kimi
|
| 11 |
- custom_code
|
| 12 |
- mlx
|
| 13 |
+
- multimodal
|
| 14 |
+
- reasoning
|
| 15 |
+
license: mit
|
| 16 |
---
|
| 17 |
|
| 18 |
# mlx-community/Kimi-VL-A3B-Thinking-4bit
|
|
|
|
| 25 |
```
|
| 26 |
|
| 27 |
```bash
|
| 28 |
+
python -m mlx_vlm.generate --model mlx-community/Kimi-VL-A3B-Thinking-4bit --max-tokens 1024 --temperature 0.6 --prompt "Describe this image." --image <path_to_image>
|
| 29 |
+
```
|