Update README.md
Browse files
README.md
CHANGED
|
@@ -89,6 +89,22 @@ VLLM_USE_FLASHINFER_SAMPLER=0 vllm serve /path/to/Hy3-1M \
|
|
| 89 |
`--kv-cache-dtype fp8` halves KV memory (recommended for long context). On Hopper/Ada or with a
|
| 90 |
FlashInfer build that supports your GPU, you can drop the two workaround flags.
|
| 91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
## Long context (YaRN)
|
| 93 |
|
| 94 |
The base model is `rope_type: "default"` with `max_position_embeddings: 262144`. To go beyond,
|
|
|
|
| 89 |
`--kv-cache-dtype fp8` halves KV memory (recommended for long context). On Hopper/Ada or with a
|
| 90 |
FlashInfer build that supports your GPU, you can drop the two workaround flags.
|
| 91 |
|
| 92 |
+
## Inference tuning: MoE top-K (speed vs quality)
|
| 93 |
+
|
| 94 |
+
The number of routed experts per token (`num_experts_per_tok`, native **8**) can be lowered at
|
| 95 |
+
**inference time** (no re-quantization) to trade quality for less expert compute, via vLLM's
|
| 96 |
+
`--hf-overrides '{"num_experts_per_tok": K}'`. Measured on this 4-bit checkpoint (greedy):
|
| 97 |
+
|
| 98 |
+
| top-K | HumanEval | GSM8K | routed-expert FLOPs |
|
| 99 |
+
|---|---|---|---|
|
| 100 |
+
| **8** (native) | **91.5%** | **95.9%** | 100% |
|
| 101 |
+
| **6** | 89.6% (−1.9) | 94.8% (−1.1) | ~75% |
|
| 102 |
+
| **4** | 86.6% (−4.9) | 93.5% (−2.4) | ~50% |
|
| 103 |
+
|
| 104 |
+
Degradation is **graceful** — even top-4 (half the routed-expert compute) stays coherent and
|
| 105 |
+
usable. **top-6** is a sweet spot (~25% less expert compute for ≈1-2 pts). Coding is a bit more
|
| 106 |
+
sensitive to fewer experts than math. (Default = 8; only lower it if you need the speed/energy.)
|
| 107 |
+
|
| 108 |
## Long context (YaRN)
|
| 109 |
|
| 110 |
The base model is `rope_type: "default"` with `max_position_embeddings: 262144`. To go beyond,
|