File size: 2,098 Bytes
27994e7
 
 
 
 
 
2b5b995
 
 
 
27994e7
 
 
 
 
8c2c382
2b5b995
27994e7
 
155a827
27994e7
bc088f7
27994e7
 
 
 
 
 
 
bc088f7
 
 
 
 
 
27994e7
 
 
 
 
 
 
 
 
 
 
 
f17afe1
27994e7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
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