Image-Text-to-Text
Transformers
Safetensors
kimi_vl
feature-extraction
agent
video
screenspot
long-context
conversational
custom_code
Instructions to use Harrison1213/Kimi-VL-A3B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Harrison1213/Kimi-VL-A3B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Harrison1213/Kimi-VL-A3B-Instruct", 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("Harrison1213/Kimi-VL-A3B-Instruct", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Harrison1213/Kimi-VL-A3B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Harrison1213/Kimi-VL-A3B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Harrison1213/Kimi-VL-A3B-Instruct", "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/Harrison1213/Kimi-VL-A3B-Instruct
- SGLang
How to use Harrison1213/Kimi-VL-A3B-Instruct 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 "Harrison1213/Kimi-VL-A3B-Instruct" \ --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": "Harrison1213/Kimi-VL-A3B-Instruct", "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 "Harrison1213/Kimi-VL-A3B-Instruct" \ --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": "Harrison1213/Kimi-VL-A3B-Instruct", "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 Harrison1213/Kimi-VL-A3B-Instruct with Docker Model Runner:
docker model run hf.co/Harrison1213/Kimi-VL-A3B-Instruct
File size: 2,005 Bytes
0ca6265 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | {
"architectures": [
"KimiVLForConditionalGeneration"
],
"auto_map": {
"AutoConfig": "configuration_kimi_vl.KimiVLConfig",
"AutoModel": "modeling_kimi_vl.KimiVLForConditionalGeneration",
"AutoModelForCausalLM": "modeling_kimi_vl.KimiVLForConditionalGeneration"
},
"vision_config": {
"model_type": "moonvit",
"patch_size": 14,
"num_attention_heads": 16,
"num_hidden_layers": 27,
"hidden_size": 1152,
"intermediate_size": 4304,
"init_pos_emb_height": 64,
"init_pos_emb_width": 64,
"merge_kernel_size": [
2,
2
],
"torch_dtype": "bfloat16"
},
"text_config": {
"vocab_size": 163840,
"max_position_embeddings": 131072,
"hidden_size": 2048,
"intermediate_size": 11264,
"moe_intermediate_size": 1408,
"num_hidden_layers": 27,
"num_attention_heads": 16,
"n_shared_experts": 2,
"n_routed_experts": 64,
"ep_size": 1,
"routed_scaling_factor": 2.446,
"kv_lora_rank": 512,
"q_lora_rank": null,
"qk_rope_head_dim": 64,
"v_head_dim": 128,
"qk_nope_head_dim": 128,
"topk_method": "noaux_tc",
"n_group": 1,
"topk_group": 1,
"num_experts_per_tok": 6,
"moe_layer_freq": 1,
"first_k_dense_replace": 1,
"norm_topk_prob": true,
"scoring_func": "sigmoid",
"aux_loss_alpha": 0.001,
"seq_aux": true,
"num_key_value_heads": 16,
"hidden_act": "silu",
"initializer_range": 0.02,
"rms_norm_eps": 1e-05,
"pretraining_tp": 1,
"use_cache": true,
"rope_theta": 800000.0,
"rope_scaling": null,
"attention_bias": false,
"attention_dropout": 0.0,
"bos_token_id": 163584,
"pad_token_id": 163839,
"eos_token_id": 163585,
"torch_dtype": "bfloat16",
"tie_word_embeddings": false
},
"ignore_index": -100,
"media_placeholder_token_id": 163605,
"torch_dtype": "bfloat16",
"transformers_version": "4.50.3",
"tie_word_embeddings": false,
"vocab_size": 163840,
"model_type": "kimi_vl"
} |