Image-Text-to-Text
MLX
Safetensors
kimi_vl
agent
video
screenspot
long-context
conversational
custom_code
4-bit precision
Instructions to use internetoftim/Kimi-VL-A3B-Instruct-mlx-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use internetoftim/Kimi-VL-A3B-Instruct-mlx-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("internetoftim/Kimi-VL-A3B-Instruct-mlx-4bit") config = load_config("internetoftim/Kimi-VL-A3B-Instruct-mlx-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
| { | |
| "architectures": [ | |
| "KimiVLForConditionalGeneration" | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "configuration_kimi_vl.KimiVLConfig", | |
| "AutoModel": "modeling_kimi_vl.KimiVLForConditionalGeneration", | |
| "AutoModelForCausalLM": "modeling_kimi_vl.KimiVLForConditionalGeneration" | |
| }, | |
| "do_sample": true, | |
| "eos_token_id": [ | |
| 163585 | |
| ], | |
| "generation_config": { | |
| "bos_token_id": 163584, | |
| "pad_token_id": 163838, | |
| "eos_token_id": [ | |
| 163585 | |
| ], | |
| "do_sample": true, | |
| "temperature": 0.2 | |
| }, | |
| "ignore_index": -100, | |
| "media_placeholder_token_id": 163605, | |
| "model_type": "kimi_vl", | |
| "quantization": { | |
| "group_size": 64, | |
| "bits": 4, | |
| "mode": "affine" | |
| }, | |
| "quantization_config": { | |
| "group_size": 64, | |
| "bits": 4, | |
| "mode": "affine" | |
| }, | |
| "temperature": 0.2, | |
| "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 | |
| }, | |
| "tie_word_embeddings": false, | |
| "transformers_version": "4.50.3", | |
| "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" | |
| }, | |
| "vocab_size": 163840 | |
| } |