Issues / #3178

#3178 Strata Benchmark Report — Swift 1.5 Flash Next (GSQ-RCO IQ3_S) on 0.1.45, with --vision=cpu, 100+ kombinations

closed · @DrLove73 · 0 comentarios · En GitHub

BenchmarksNVIDIA / CUDAModels & quantsDocumentation

Descripción

<!-- Failed to upload "_summary.csv" -->
<!-- Failed to upload "_speed_summary.csv" -->

# Strata Benchmark Report — Swift 1.5 Flash Next (GSQ-RCO IQ3_S) on 0.1.45, with --vision=cpu, 100+ kombinations

**Model family:** Qwen3.8-Flash-Next (Swift 1.5 variant)  
**Quantization:** GSQ-RCO IQ3_S (3-bit)  
**Engine:** Strata 0.1.45 (llama.cpp 3cf0325)  
**Hardware:** RTX PRO 4000 Blackwell (24 GB VRAM), Intel Xeon Gold 6138, 220 GB RAM  
**Dates:** 2026-10-15 (legacy `vision=on`) and 2026-10-19 (Strata 0.1.45 `vision=cpu`)  
**Contexts:** 128K, 256K, 384K, 512K, 1M  
**Total runs:** 100+

## Summary

Strata 0.1.45 with `vision=cpu` is a massive leap for long-context inference. Peak decode is **76.71 tok/s at 256K**. By offloading the vision encoder to the CPU, we free up critical VRAM for the expert cache. This eliminates the VRAM bottleneck at 384K and 1M contexts, resulting in **up to +160% performance gains** on long contexts compared to the older `vision=on` builds. 

## Sweep configuration (and run_id legend)

```
CONTEXTS         = 131072 262144 393216 524288 1048576 (run_id 1,2,3,5,5 respectively)
PARALLEL_VALUES  = 1 (2 for select runs) (run_id 1,2 respectively)
VISION_VALUES    = cpu (0.1.45) / on (legacy) (run_id c,y,n respectively)
KV_VALUES        = int8 q4_0 k8v4 (run_id i,q,k respectively)
PREFILL_VALUES   = 32768 65536 auto (run_id 32, 64, a respectively)
KV_RESIDENT      = 32768 65536 (run_id 32, 64 respectively)
SPEC             = 4
ADAPT_DECAY      = 0.97
ADAPT_SWAPS      = 160
```

## Results — Best config per context (Strata 0.1.45, `vision=cpu`)

| Context | Config (kv, prefill, kvr) | TTFT | Decode | run_id |
|---|---|---|---|---|
| 128K | int8, 32768, 65536 | 55.8 s | **70.72 tok/s** | 1-1-c-i-32-64-4-97-160 |
| 256K | int8, 65536, 65536 | 124.8 s | **76.71 tok/s** | 2-1-c-i-64-64-4-97-160 |
| 384K | int8, 65536, 65536 | 185.9 s | **67.67 tok/s** | 3-1-c-i-64-64-4-97-160 |
| 512K | q4_0, 32768, 65536 | 257.3 s | **70.35 tok/s** | 4-1-c-q-32-64-4-97-160 |
| 1M   | int8, 32768, 65536 | 630.2 s | **54.19 tok/s** | 5-1-c-i-32-64-4-97-160 |

## Version Comparison: Legacy (`vision=on`) vs 0.1.45 (`vision=cpu`)

The jump in performance is most dramatic at contexts above 256K, where VRAM starvation previously crippled the expert cache.

| Context | Old Best (Oct 15) | New Best (Oct 19) | Improvement |
|---|---|---|---|
| 128K | 65.54 tok/s | **70.72 tok/s** | **+7.9%** |
| 256K | 72.94 tok/s | **76.71 tok/s** | **+5.2%** |
| 384K | 38.92 tok/s | **67.67 tok/s** | **+73.8%** |
| 512K | 66.34 tok/s | **70.35 tok/s** | **+6.0%** |
| 1M | 52.06 tok/s (q4_0) | **54.19 tok/s** (int8) | **+4.1%** |

*Note: At 384K, older versions suffered a severe VRAM bottleneck forcing the engine to swap experts. 0.1.45 with `vision=cpu` completely resolves this.*

## Key findings

1. **`vision=cpu` is mandatory for 384K+**. It frees the ~1.5 GB of VRAM previously used by the image encoder, allowing the KV cache to stay resident and the expert cache to function without thrashing.
2. **256K is the absolute sweet spot** at 76.71 tok/s.
3. **1M context is now stable**. In previous builds, 1M required aggressive `q4_0` KV quantization. In 0.1.45, `int8` KV now works flawlessly and is faster (54.19 tok/s) than `q4_0` was before.
4. **KV type scaling**:
   - **128K to 384K**: `kv=int8` is fastest.
   - **512K**: `kv=q4_0` edges out int8 (70.35 vs 66.99) because the smaller footprint leaves more VRAM for experts.
   - **1M**: `kv=int8` is surprisingly optimal again when paired with `vision=cpu`.
5. **Prefill tuning**: `prefill=65536` is better for 256K–384K. `prefill=32768` works better for 512K and 1M.
6. **kv-resident=65536** consistently outperforms 32768 across all contexts.
7. **Quality (NIAH 512K)**: 3/3 pass across all KV types. No quality degradation observed from the vision offload.

## Recommended production configs (Strata 0.1.45)

| Use case | Context | Config |
|---|---|---|
| Interactive Chat | ≤128K | `kv=int8, prefill=32768, kvr=65536, vision=cpu` |
| Long Analysis | 256K | `kv=int8, prefill=65536, kvr=65536, vision=cpu` |
| Document QA | 512K | `kv=q4_0, prefill=32768, kvr=65536, vision=cpu` |
| Massive Docs | 1M | `kv=int8, prefill=32768, kvr=65536, vision=cpu` |

## Reproducing

```bash
./strata_sweep.sh configs/swift-1.5-iq3_s.conf
```

### Representative Results & Speed Degradation Analysis

| Scenario / Purpose | Date | Context | KV / Prefill / KVR | TTFT (s) | Decode (tok/s) | run_id |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| **128K - New Best** (`vision=cpu`) | Oct 19 | 131,072 | `int8` / `32768` / `65536` | 55.8 | **70.72** | 1-1-c-i-32-64-4-97-160 |
| 128K - New alt (`q4_0` KV) | Oct 19 | 131,072 | `q4_0` / `65536` / `65536` | 61.0 | 67.65 | 1-1-c-q-64-64-4-97-160 |
| 128K - Old Best (`vision=on`) | Oct 15 | 131,072 | `k8v4` / `32768` / `32768` | 58.8 | 65.54 | 1-1-y-k-32768-32-4-97-160 |
| 128K - Batch 2 Penalty | Oct 15 | 131,072 | `int8` / `32768` / `65536` | 59.9 | 53.96 | 1-2-y-i-32768-64-4-97-160 |
| **256K - New Best** (`vision=cpu`) | Oct 19 | 262,144 | `int8` / `65536` / `65536` | 124.8 | **76.71** | 2-1-c-i-64-64-4-97-160 |
| 256K - New alt (Prefill 32K) | Oct 19 | 262,144 | `int8` / `32768` / `65536` | 116.0 | 73.60 | 2-1-c-i-32-64-4-97-160 |
| 256K - New alt (`q4_0` KV) | Oct 19 | 262,144 | `q4_0` / `65536` / `65536` | 135.2 | 74.22 | 2-1-c-q-64-64-4-97-160 |
| 256K - Old Best (`vision=on`) | Oct 15 | 262,144 | `k8v4` / `auto` / `32768` | 155.0 | 72.94 | 2-1-y-k-a-32-4-97-160 |
| 256K - Batch 2 Penalty | Oct 15 | 262,144 | `int8` / `32768` / `65536` | 128.3 | 54.92 | 2-2-y-i-32768-64-4-97-160 |
| **384K - New Best** (`vision=cpu`) | Oct 19 | 393,216 | `int8` / `65536` / `65536` | 185.9 | **67.67** | 3-1-c-i-64-64-4-97-160 |
| 384K - New alt (Prefill 32K) | Oct 19 | 393,216 | `int8` / `32768` / `65536` | 200.9 | 62.55 | 3-1-c-i-32-64-4-97-160 |
| 384K - New alt (`q4_0` KV) | Oct 19 | 393,216 | `q4_0` / `65536` / `65536` | 195.7 | 59.26 | 3-1-c-q-64-64-4-97-160 |
| **512K - New Best** (`vision=cpu`) | Oct 19 | 524,288 | `q4_0` / `32768` / `65536` | 257.3 | **70.35** | 4-1-c-q-32-64-4-97-160 |
| 512K - New alt (`int8` KV) | Oct 19 | 524,288 | `int8` / `65536` / `65536` | 268.0 | 66.99 | 4-1-c-i-64-64-4-97-160 |
| 512K - Old Best (`vision=on`) | Oct 15 | 524,288 | `int8` / `32768` / `32768` | 265.3 | 66.34 | 4-1-y-i-32768-32-4-97-160 |
| 512K - Batch 2 Penalty | Oct 15 | 524,288 | `int8` / `auto` / `65536` | 343.5 | 47.23 | 4-2-y-i-a-64-4-97-160 |
| **1M - New Best** (`vision=cpu`) | Oct 19 | 1,048,576 | `int8` / `32768` / `65536` | 630.2 | **54.19** | 5-1-c-i-32-64-4-97-160 |
| 1M - New alt (`q4_0` KV) | Oct 19 | 1,048,576 | `q4_0` / `65536` / `65536` | 634.1 | 50.41 | 5-1-c-q-64-64-4-97-160 |
| 1M - Old Best (`vision=on`) | Oct 15 | 1,048,576 | `q4_0` / `auto:64` / `32768` | 662.5 | 52.06 | 5-1-y-q-a64-32-4-97-160 |

#### Key Takeaways from Representative Data:
*   **Batch Penalty:** Adding a second parallel slot (`-2-` in run_id) at high context (256K+) causes a severe drop in decode speed (e.g., from 65.64 to 54.92 at 256K), proving that parallel execution starves the expert cache of VRAM.
*   **Vision Offload Impact:** At 384K, the Oct 15 run with `vision=on` suffered a catastrophic drop (38.92 tok/s, not shown in the top block but present in raw data), whereas the new Oct 19 runs with `vision=cpu` hold steady at 67.67 tok/s. 
*   **KV Cache Scaling:** While `int8` is best up to 384K, at 512K the `q4_0` KV becomes the winner (70.35 tok/s) because its smaller memory footprint allows more expert weights to stay in VRAM. At 1M, `int8` retakes the lead when paired with `vision=cpu`.

En el sitio

Enlaces a install, modelos, releases.