Text Generation
Transformers
Safetensors
English
qwen3_5_moe
image-text-to-text
quantized
auto-round
w8a16
Mixture of Experts
code
coding
agent
agentic-coding
conversational
8-bit precision
Instructions to use jpbwin/KAT-Coder-V2.5-Dev-int8-AutoRound with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jpbwin/KAT-Coder-V2.5-Dev-int8-AutoRound with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jpbwin/KAT-Coder-V2.5-Dev-int8-AutoRound") 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 AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("jpbwin/KAT-Coder-V2.5-Dev-int8-AutoRound") model = AutoModelForMultimodalLM.from_pretrained("jpbwin/KAT-Coder-V2.5-Dev-int8-AutoRound", 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jpbwin/KAT-Coder-V2.5-Dev-int8-AutoRound with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jpbwin/KAT-Coder-V2.5-Dev-int8-AutoRound" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jpbwin/KAT-Coder-V2.5-Dev-int8-AutoRound", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jpbwin/KAT-Coder-V2.5-Dev-int8-AutoRound
- SGLang
How to use jpbwin/KAT-Coder-V2.5-Dev-int8-AutoRound 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 "jpbwin/KAT-Coder-V2.5-Dev-int8-AutoRound" \ --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": "jpbwin/KAT-Coder-V2.5-Dev-int8-AutoRound", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "jpbwin/KAT-Coder-V2.5-Dev-int8-AutoRound" \ --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": "jpbwin/KAT-Coder-V2.5-Dev-int8-AutoRound", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jpbwin/KAT-Coder-V2.5-Dev-int8-AutoRound with Docker Model Runner:
docker model run hf.co/jpbwin/KAT-Coder-V2.5-Dev-int8-AutoRound
| tags: | |
| - quantized | |
| - auto-round | |
| - w8a16 | |
| - moe | |
| - code | |
| - coding | |
| - agent | |
| - agentic-coding | |
| license: apache-2.0 | |
| language: | |
| - en | |
| library_name: transformers | |
| pipeline_tag: text-generation | |
| base_model: Kwaipilot/KAT-Coder-V2.5-Dev | |
| base_model_relation: quantized | |
| # KAT-Coder-V2.5-Dev W8A128 with AutoRound int8 | |
| Weight-only 8-bit quant of [KAT-Coder-V2.5-Dev](https://huggingface.co/Kwaipilot/KAT-Coder-V2.5-Dev) using AutoRound v0.15.0, quantized at int8 against a python-focused sampleset. | |
| ## Under the hood | |
| 256-expert MoE on Qwen3.5. 40 layers, 30 use linear attention and 10 use full attention (every 4th). Shared expert gates kept at FP16. | |
| Quantization is symmetric INT8, group size 128. Calibrated on 384 samples over 400 iterations with sequence length 4096 instead of the default 2048. | |
| | Dataset | Config | KL ↓ | Top-1 match | Top-1 in ref top-5 | Tokens | | |
| |---|---|---|---|---|---| | |
| | Wikitext-103 | 4 × 4096 | 0.00470 | 96.84% | 99.97% | 16,336 | | |
| | Wikitext-103 | 2 × 8192 | 0.00437 | 97.35% | 99.98% | 16,360 | | |
| | code-search-net (6 lang) | 4 × 4096 | 0.00443 | 98.18% | 99.99% | 16,336 | | |
| | code-search-net (6 lang) | 2 × 8192 | 0.00433 | 98.28% | 100.00% | 16,360 | | |
| ## Hardware | |
| Fits on two 3090s with headroom. This quant was created largely to fit this into two 24gb cards while maintaining speed. On my machine, this retains enough space for 3 `max-num-seqs` at full context. Tinker as you see fit to get the number of parallel slots you'd like to serve. | |
| ## Inference | |
| vLLM V1 engine: | |
| ```bash | |
| PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True \ | |
| vllm serve \ | |
| jpbwin/KAT-Coder-V2.5-Dev-int8-AutoRound \ | |
| --port 5001 \ | |
| --tensor-parallel-size 2 \ | |
| --gpu-memory-utilization 0.975 \ | |
| --max-num-seqs 3 \ | |
| --enable-chunked-prefill \ | |
| --enable-prefix-caching | |
| ``` | |
| ## Notes | |
| I had to alter the auto-round library **hella** in order to get this to work end to end, but in the end, vanilla VLLM serves this just fine :) | |
| Upstream PRs to auto-round to come, it seems to do a lot of double work and underutilizes gpu capability when quantizing some models. | |
| ## License | |
| Apache 2.0 | |