Image-Text-to-Text
Transformers
Safetensors
English
Chinese
qwen3_5_moe
code
agent
agentic-coding
Mixture of Experts
vision-language
nvfp4
fp4
quantized
blackwell
vllm
conversational
8-bit precision
compressed-tensors
Instructions to use beyoru/KAT-Coder-V2.5-Dev-VL-Flash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use beyoru/KAT-Coder-V2.5-Dev-VL-Flash with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="beyoru/KAT-Coder-V2.5-Dev-VL-Flash") 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 AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("beyoru/KAT-Coder-V2.5-Dev-VL-Flash") model = AutoModelForMultimodalLM.from_pretrained("beyoru/KAT-Coder-V2.5-Dev-VL-Flash", device_map="auto") 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?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use beyoru/KAT-Coder-V2.5-Dev-VL-Flash with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "beyoru/KAT-Coder-V2.5-Dev-VL-Flash" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "beyoru/KAT-Coder-V2.5-Dev-VL-Flash", "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/beyoru/KAT-Coder-V2.5-Dev-VL-Flash
- SGLang
How to use beyoru/KAT-Coder-V2.5-Dev-VL-Flash 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 "beyoru/KAT-Coder-V2.5-Dev-VL-Flash" \ --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": "beyoru/KAT-Coder-V2.5-Dev-VL-Flash", "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 "beyoru/KAT-Coder-V2.5-Dev-VL-Flash" \ --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": "beyoru/KAT-Coder-V2.5-Dev-VL-Flash", "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 beyoru/KAT-Coder-V2.5-Dev-VL-Flash with Docker Model Runner:
docker model run hf.co/beyoru/KAT-Coder-V2.5-Dev-VL-Flash
Add docker-compose.vllm.yaml: sample serving config
Browse files- docker-compose.vllm.yaml +49 -0
docker-compose.vllm.yaml
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# vLLM — cau hinh cho beyoru/KAT-Coder-V2.5-Dev-VL-Flash (NVFP4).
|
| 2 |
+
#
|
| 3 |
+
# ⚠️ HAI CANH BAO, doc truoc khi dung:
|
| 4 |
+
#
|
| 5 |
+
# 1. BAT BUOC GPU BLACKWELL (sm100/sm120): B200, B300, RTX PRO 6000 Blackwell,
|
| 6 |
+
# RTX 50-series, DGX Spark. NVFP4 chay weight 4-bit VA activation 4-bit tren
|
| 7 |
+
# FP4 tensor core. KHONG chay tren Hopper (H100/H200), Ada, Ampere.
|
| 8 |
+
# Tren nhung card do hay dung ban bf16: beyoru/KAT-Coder-V2.5-Dev-VL
|
| 9 |
+
#
|
| 10 |
+
# 2. CHUA KIEM CHUNG TREN PHAN CUNG THAT. Checkpoint duoc dung tren Hopper, noi
|
| 11 |
+
# NVFP4 khong chay duoc. Shape weight/scale, quantization_config va cau truc
|
| 12 |
+
# checkpoint da verify TINH; chua sinh mot token nao tren FP4 tensor core that.
|
| 13 |
+
services:
|
| 14 |
+
kat-vl-flash:
|
| 15 |
+
image: vllm/vllm-openai:v0.26.0
|
| 16 |
+
container_name: kat-vl-flash
|
| 17 |
+
ipc: host
|
| 18 |
+
ports:
|
| 19 |
+
- "8000:8000"
|
| 20 |
+
volumes:
|
| 21 |
+
- /path/to/models:/models
|
| 22 |
+
- ${HOME}/.cache/huggingface:/root/.cache/huggingface
|
| 23 |
+
deploy:
|
| 24 |
+
resources:
|
| 25 |
+
reservations:
|
| 26 |
+
devices:
|
| 27 |
+
- driver: nvidia
|
| 28 |
+
device_ids: ["0"]
|
| 29 |
+
capabilities: [gpu]
|
| 30 |
+
command: >
|
| 31 |
+
--model /models/KAT-Coder-V2.5-Dev-VL-Flash
|
| 32 |
+
--served-model-name kat-vl-flash
|
| 33 |
+
--max-model-len 32768
|
| 34 |
+
--gpu-memory-utilization 0.90
|
| 35 |
+
--trust-remote-code
|
| 36 |
+
|
| 37 |
+
# ⛔ DUNG ghim MoE backend. De vLLM tu chon. Tren Blackwell duong nhanh la
|
| 38 |
+
# CUTLASS / FlashInfer-TRTLLM / CuTe-DSL; ep Marlin se tut manh vi Marlin la
|
| 39 |
+
# kernel weight-only (W4A16), khong bao gio cham toi FP4 tensor core.
|
| 40 |
+
#
|
| 41 |
+
# Weight chi 22 GB (giam 68.7% so voi 70.2 GB bf16) nen vua thoai mai mot card
|
| 42 |
+
# Blackwell don. KV cache da co scale fp8 hieu chuan san trong checkpoint.
|
| 43 |
+
#
|
| 44 |
+
# So do do chinh xac (doc duoc tu config.json):
|
| 45 |
+
# NVFP4 W4A4 : toan bo mlp.experts.*.{gate,up,down}_proj + shared_expert (group 16)
|
| 46 |
+
# FP8 W8A8 : self_attn.{q,k,v,o}_proj, linear_attn.{in_proj_qkv,in_proj_z,out_proj}, lm_head
|
| 47 |
+
# BF16 : router mlp.gate, shared_expert_gate, linear_attn.{in_proj_a,in_proj_b,norm},
|
| 48 |
+
# va TOAN BO vision tower (333 tensor)
|
| 49 |
+
# KV cache : fp8 per-tensor static
|