bench: community results, RX 9070 XT 16 GB on Windows 11, ready-made AMD engine 0.1.35, IQ3_S (#499)
Bench folder ported from PR #499 by homeofe, authorship kept. Trimmed for 0.1.40.2: 2 raw dumps/logs/binaries left out (listed in TRIMMED.md of each folder). Not ported: docs/COMMUNITY_BENCHMARKS.md.
This commit is contained in:
1 parent
707fd49eb4
commit
aebd0f34d7
5 files changed
+398
No files matched your search
@@ -0,0 +1,97 @@
|
||||
# Community results: RX 9070 XT 16 GB on Windows 11, the ready-made AMD engine (0.1.35), IQ3_S
|
||||
|
||||
A run of the release's `strata-windows-x64-hip.zip` on a discrete card. [AMD_HIP.md](../../../docs/AMD_HIP.md#windows)
|
||||
says the ready-made zip "has not run a model on a discrete card yet - please report"; this is that report, measured
|
||||
the way [COMMUNITY_BENCHMARKS.md](../../../docs/COMMUNITY_BENCHMARKS.md) suggests.
|
||||
|
||||
## Machine
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| GPU | AMD Radeon RX 9070 XT, 16 GB (gfx1201), Windows driver version 32.0.31041.3013 |
|
||||
| CPU | AMD Ryzen Threadripper 3960X, 24 cores / 48 threads (AVX2, no AVX-512) |
|
||||
| RAM | 128 GiB, 8x DDR4-3200 (quad channel) |
|
||||
| OS | Windows 11 Pro 10.0.26200 |
|
||||
| Storage | model files on drive F: (local disk) |
|
||||
| PCIe | engine probe: 28.6 GB/s host to device |
|
||||
|
||||
## Software and settings
|
||||
|
||||
- Strata `main` at `d9ab843` (engine 0.1.35), installed with
|
||||
`START-HERE.bat --yes --family qwen --model IQ3_S --no-start --data-dir <folder>\Strata-data`.
|
||||
Setup downloaded the ready-made AMD engine ("ready-made AMD engine 0.1.35 for gfx1100, gfx1101, gfx1102, gfx1200,
|
||||
gfx1201, gfx1030 (ROCm 10.2.0a20260930)"); nothing was compiled.
|
||||
- The engine loaded the bundled HIP runtime from `engine\` (`strata generate: HIP runtime <folder>\Strata\engine\amdhip64_7.dll`),
|
||||
so the #468 placement took effect.
|
||||
- Model: Qwen3.8-Flash-Next GSQ-RCO **IQ3_S** (ISTA-DASLab), both GGUFs, pack and MTP layer prepared by setup.
|
||||
- Config as written by setup: [strata-iq3_s.json](strata-iq3_s.json) (paths shortened to `<folder>`; no API key).
|
||||
Setup picked a **65,536-token context** ("recommended for your GPU"), KV int8, 32,768 KV cells resident in VRAM,
|
||||
`--expert-cache auto`, `--prefill auto`, `--spec 4 --spec-min-p 0.5`, MTP on, hipBLASLt tuning table
|
||||
`tools\hip\gfx1201-hipblaslt-100500.txt`. Images off (not available on Windows AMD yet). No calibration, no speed
|
||||
projection.
|
||||
- Server: `.venv\Scripts\python.exe serve\server.py --engine strata --config strata-iq3_s.json --port 8080`, started
|
||||
fresh for this run, nothing else using it.
|
||||
|
||||
## Workload
|
||||
|
||||
[bench.py](bench.py) (standard library only) against the OpenAI endpoint, streaming, temperature 0,
|
||||
`"reasoning_effort": "none"`. Every request starts with a unique nonce, so no request reuses a cached prefix (the
|
||||
engine log confirms `0 reused` for every measured prompt). One warm-up request (38 prompt tokens, 8 generated), then
|
||||
three runs of each test:
|
||||
|
||||
- **decode**: a short coding prompt (72 tokens), 256 tokens out (all three runs produced the full 256).
|
||||
- **prefill 4K / 32K**: deterministic synthetic Python code, 3,927 / 31,059 prompt tokens, 1 token out.
|
||||
|
||||
Per-run client results: [data/runs.json](data/runs.json). Engine log of the whole session:
|
||||
[data/strata-iq3_s.log](data/strata-iq3_s.log).
|
||||
|
||||
## Results (engine timing lines; median [range] of 3 runs)
|
||||
|
||||
| Test | Prompt tokens (reused) | Prompt read tok/s | Decode tok/s | Drafts accepted | Decode expert cache hits |
|
||||
|---|---:|---:|---:|---:|---:|
|
||||
| decode | 72 (0) | - | **45.2** [37.1-46.4] | 84.5% [84.1-86.3] | 84.6% [67.0-86.2] |
|
||||
| prefill 4K | 3,927 (0) | **370.4** [366.8-370.9] | - | - | - |
|
||||
| prefill 32K | 31,059 (0) | **601.5** [595.4-602.7] | - | - | - |
|
||||
|
||||
- The first decode run (37.1 tok/s, cache hits 67.0%) is the expert cache adapting after the warm-up; runs 2 and 3
|
||||
give 45.2 and 46.4 tok/s at 84.6% / 86.2% hits.
|
||||
- The client-side numbers in `runs.json` agree within 1%: decode 45.2 [37.2-46.5], prefill 367.9 [364.4-368.4] and
|
||||
599.5 [593.4-600.9] tok/s.
|
||||
- Time to first token (client): 10.7 s for the 4K prompt, 51.7-52.3 s for the 32K prompt.
|
||||
- **Short prompts read slowly:** the 72-token decode prompt was read at 14.7 / 22.8 / 21.9 tok/s (engine), so the
|
||||
first token took 3.2-4.9 s (client). On the RTX 2080 Ti machine below the same prompt's first token took 1.6 s.
|
||||
- KV streaming: 99.4% of block reads hit VRAM while decoding, 80.5% (4K) and 73.1-73.3% (32K) during prompt reads.
|
||||
|
||||
## Memory
|
||||
|
||||
- VRAM: expert cache 4,983 slots in 9.48 GiB, MTP draft layer 835 MiB; the server reports "462 MiB of VRAM free with
|
||||
everything loaded". The prompt path borrows 2,385 cache slots (4.50 GiB) while reading. Peak usage not recorded
|
||||
separately.
|
||||
- RAM: expert arena 46.84 GiB, loaded at 3.25 GiB/s. **Windows refused large pages** for it:
|
||||
`large pages refused for 50295996416 B (GetLargePageMinimum=2097152, VirtualAlloc error 1314); using 4 KB pages`.
|
||||
Error 1314 is `ERROR_PRIVILEGE_NOT_HELD`: the account has no "Lock pages in memory" right (the Windows default).
|
||||
The engine continued with 4 KB pages; whether granting the right changes the speed was not tested.
|
||||
|
||||
## Answers to the AMD_HIP.md checklist
|
||||
|
||||
- Card and driver: above.
|
||||
- `strata-device --list-devices` / `--selftest` (with `engine\rocm\bin` on the PATH): the card is listed as device 0,
|
||||
gfx1201, 15.9 GiB, wave32 (engine compiled for gfx1100, gfx1101, gfx1102, gfx1200, gfx1201, gfx1030), HIP runtime
|
||||
`engine\amdhip64_7.dll`, and `strata-device selftest OK`. Full output:
|
||||
[data/strata-device.log](data/strata-device.log).
|
||||
- End of `strata-iq3_s.log` and the speed lines: in [data/strata-iq3_s.log](data/strata-iq3_s.log); the session ran
|
||||
without errors from setup to the last request.
|
||||
|
||||
## Notes
|
||||
|
||||
- **Setup first downloaded the model again.** The Strata folder was a fresh clone with the model files copied into
|
||||
`Strata-data` next to it (with their `.done` marks). `%APPDATA%\Strata\settings.json` still had a `data_dir` from an
|
||||
earlier install on this PC, and setup used that folder instead, so the copied files were not seen and the 54.8 GB
|
||||
IQ3_S download started. `--data-dir <folder>\Strata-data` fixed it ("already downloaded" for both GGUFs). Behaviour
|
||||
as designed (the remembered folder wins), but a check of `Strata-data` next to the Strata folder for complete files
|
||||
before downloading would have avoided the download.
|
||||
- For orientation only, not a like-for-like comparison: the same CPU and RAM with an RTX 2080 Ti 11 GB on Linux
|
||||
(engine 0.1.34, CUDA, 262,144-token context) measured 56.0 tok/s decode and 839 / 783 tok/s prompt reads with the
|
||||
same `bench.py` workload. OS, backend, engine version and context setting all differ, so this does not isolate the
|
||||
card.
|
||||
- Not measured: correctness checks (needle test), contexts above 32K, model load time, power.
|
||||
@@ -0,0 +1,11 @@
|
||||
# Trimmed files
|
||||
|
||||
Ported from PR #499 for 0.1.40.2. Raw dumps, logs and binaries were left out to keep the repository small;
|
||||
the README, summaries, configs and per-run results are unchanged. The files below were in the original PR.
|
||||
|
||||
2 files, 0.0 MB:
|
||||
|
||||
| file | bytes | why |
|
||||
|---|---:|---|
|
||||
| `data/strata-device.log` | 927 | log/raw dump |
|
||||
| `data/strata-iq3_s.log` | 6,735 | log/raw dump |
|
||||
@@ -0,0 +1,150 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Measure any OpenAI-compatible server the same way: decode speed and prompt (prefill) speed.
|
||||
|
||||
Standard library only. Every request starts with a fresh nonce so no server can answer from a prompt cache.
|
||||
|
||||
python3 bench/bench.py --url http://127.0.0.1:8080/v1 --label strata-iq3s --out bench/results/<dir>
|
||||
python3 bench/bench.py --url http://127.0.0.1:8811/v1 --label mimo-stock --extra '{"chat_template_kwargs":{"enable_thinking":false}}'
|
||||
|
||||
Tests:
|
||||
decode short prompt, --decode-tokens tokens out (default 256): tokens/s after the first token
|
||||
prefill-N a ~N-token code prompt, 1 token out: prompt tokens / time to first token
|
||||
"""
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
import random
|
||||
import statistics
|
||||
import sys
|
||||
import time
|
||||
import urllib.request
|
||||
|
||||
DECODE_PROMPT = ("Write a Python function that parses an Apache access log line into a dict with ip, time, method, "
|
||||
"path, status and size. Then explain each regular expression group in two sentences.")
|
||||
|
||||
|
||||
def code_corpus(n_tokens, seed=1234):
|
||||
"""Deterministic synthetic Python code, roughly n_tokens long (about 3.2 characters per token)."""
|
||||
rng = random.Random(seed)
|
||||
words = ["user", "token", "session", "query", "cache", "request", "payload", "config", "record", "result",
|
||||
"handler", "buffer", "index", "limit", "offset", "account", "secret", "path", "status", "retry"]
|
||||
out, size, target = [], 0, int(n_tokens * 3.2)
|
||||
i = 0
|
||||
while size < target:
|
||||
a, b, c = rng.sample(words, 3)
|
||||
block = (f"def {a}_{b}_{i}({c}, {a}=None):\n"
|
||||
f" \"\"\"Return the {b} for {c}.\"\"\"\n"
|
||||
f" if {a} is None:\n"
|
||||
f" {a} = load_{a}({c})\n"
|
||||
f" for k in range({rng.randint(2, 64)}):\n"
|
||||
f" {c} = update_{b}({c}, k, {a})\n"
|
||||
f" return {{'{b}': {c}, 'n': {rng.randint(0, 9999)}}}\n\n")
|
||||
out.append(block)
|
||||
size += len(block)
|
||||
i += 1
|
||||
return "".join(out)
|
||||
|
||||
|
||||
def load_extra(value):
|
||||
if value.startswith("@"):
|
||||
with open(value[1:], encoding="utf-8") as f:
|
||||
return json.load(f)
|
||||
return json.loads(value)
|
||||
|
||||
|
||||
def post_stream(url, key, body, timeout):
|
||||
req = urllib.request.Request(url + "/chat/completions", data=json.dumps(body).encode(), method="POST",
|
||||
headers={"Content-Type": "application/json", "Authorization": f"Bearer {key}"})
|
||||
t0 = time.perf_counter()
|
||||
t_first, n_chunks, usage = None, 0, None
|
||||
with urllib.request.urlopen(req, timeout=timeout) as r:
|
||||
for raw in r:
|
||||
line = raw.decode("utf-8", "replace").strip()
|
||||
if not line.startswith("data:"):
|
||||
continue
|
||||
data = line[5:].strip()
|
||||
if data == "[DONE]":
|
||||
break
|
||||
d = json.loads(data)
|
||||
if d.get("usage"):
|
||||
usage = d["usage"]
|
||||
for ch in d.get("choices") or []:
|
||||
delta = ch.get("delta") or {}
|
||||
if delta.get("content") or delta.get("reasoning_content"):
|
||||
if t_first is None:
|
||||
t_first = time.perf_counter()
|
||||
n_chunks += 1
|
||||
t_end = time.perf_counter()
|
||||
return t0, t_first, t_end, n_chunks, usage
|
||||
|
||||
|
||||
def one(args, model, prompt, max_tokens):
|
||||
nonce = f"[run {time.time_ns()}] "
|
||||
body = {"model": model, "messages": [{"role": "user", "content": nonce + prompt}], "max_tokens": max_tokens,
|
||||
"temperature": 0, "stream": True, "stream_options": {"include_usage": True}}
|
||||
body.update(args.extra)
|
||||
t0, t_first, t_end, n_chunks, usage = post_stream(args.url, args.key, body, args.timeout)
|
||||
if t_first is None:
|
||||
if max_tokens > 1:
|
||||
raise RuntimeError("no tokens came back")
|
||||
# prefill test: the one token may be a template token with no visible text; the request still ends right
|
||||
# after the prompt is read
|
||||
t_first = t_end
|
||||
out_tokens = (usage or {}).get("completion_tokens") or n_chunks
|
||||
prompt_tokens = (usage or {}).get("prompt_tokens")
|
||||
decode_s = t_end - t_first
|
||||
return {"ttft_s": t_first - t0, "total_s": t_end - t0, "prompt_tokens": prompt_tokens,
|
||||
"completion_tokens": out_tokens,
|
||||
"decode_tps": (out_tokens - 1) / decode_s if out_tokens > 1 and decode_s > 0 else None,
|
||||
"prefill_tps": prompt_tokens / (t_first - t0) if prompt_tokens else None}
|
||||
|
||||
|
||||
def main():
|
||||
p = argparse.ArgumentParser()
|
||||
p.add_argument("--url", required=True, help="base URL ending in /v1")
|
||||
p.add_argument("--key", default=os.environ.get("BENCH_API_KEY", "none"))
|
||||
p.add_argument("--model", default=None, help="default: first id from /v1/models")
|
||||
p.add_argument("--label", required=True)
|
||||
p.add_argument("--runs", type=int, default=3)
|
||||
p.add_argument("--decode-tokens", type=int, default=256)
|
||||
p.add_argument("--prefill", default="4096,32768", help="prompt sizes in tokens, comma separated; '' for none")
|
||||
p.add_argument("--extra", type=load_extra, default={},
|
||||
help="JSON merged into every request body, or @file.json (avoids shell quoting, e.g. on Windows)")
|
||||
p.add_argument("--timeout", type=int, default=1800)
|
||||
p.add_argument("--out", default=None, help="directory for <label>.json")
|
||||
p.add_argument("--skip-decode", action="store_true", help="only the prefill tests")
|
||||
args = p.parse_args()
|
||||
|
||||
model = args.model
|
||||
if not model:
|
||||
req = urllib.request.Request(args.url + "/models", headers={"Authorization": f"Bearer {args.key}"})
|
||||
model = json.load(urllib.request.urlopen(req, timeout=60))["data"][0]["id"]
|
||||
|
||||
tests = [] if args.skip_decode else [("decode", DECODE_PROMPT, args.decode_tokens)]
|
||||
tests += [(f"prefill-{n}", "Summarize what this code does.\n\n" + code_corpus(n), 1)
|
||||
for n in (int(x) for x in args.prefill.split(",") if x)]
|
||||
|
||||
print(f"# {args.label}: {model} at {args.url}", file=sys.stderr)
|
||||
one(args, model, "Say hi.", 8) # warm-up, not counted
|
||||
result = {"label": args.label, "model": model, "url": args.url, "extra": args.extra, "runs": args.runs,
|
||||
"date": time.strftime("%Y-%m-%dT%H:%M:%S%z"), "tests": {}}
|
||||
for name, prompt, max_tokens in tests:
|
||||
rows = []
|
||||
for i in range(args.runs):
|
||||
r = one(args, model, prompt, max_tokens)
|
||||
rows.append(r)
|
||||
print(f" {name} run {i + 1}: " + ", ".join(f"{k}={v:.2f}" if isinstance(v, float) else f"{k}={v}"
|
||||
for k, v in r.items()), file=sys.stderr)
|
||||
key = "decode_tps" if name == "decode" else "prefill_tps"
|
||||
vals = [r[key] for r in rows if r[key]]
|
||||
result["tests"][name] = {"median_" + key: statistics.median(vals) if vals else None, "runs": rows}
|
||||
print(f"{args.label}\t{name}\t{key}={result['tests'][name]['median_' + key]:.1f}" if vals else
|
||||
f"{args.label}\t{name}\tno value")
|
||||
if args.out:
|
||||
os.makedirs(args.out, exist_ok=True)
|
||||
with open(os.path.join(args.out, f"{args.label}.json"), "w") as f:
|
||||
json.dump(result, f, indent=2)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,99 @@
|
||||
{
|
||||
"label": "strata-0.1.35-qwen38-flashnext-iq3s",
|
||||
"model": "qwen3.8-flash-next-iq3_s",
|
||||
"url": "http://127.0.0.1:8080/v1",
|
||||
"extra": {
|
||||
"reasoning_effort": "none"
|
||||
},
|
||||
"runs": 3,
|
||||
"date": "2026-10-02T14:23:39+0200",
|
||||
"tests": {
|
||||
"decode": {
|
||||
"median_decode_tps": 45.230109779861856,
|
||||
"runs": [
|
||||
{
|
||||
"ttft_s": 4.9449540000000525,
|
||||
"total_s": 11.800698099999977,
|
||||
"prompt_tokens": 72,
|
||||
"completion_tokens": 256,
|
||||
"decode_tps": 37.19508725537215,
|
||||
"prefill_tps": 14.560297224200516
|
||||
},
|
||||
{
|
||||
"ttft_s": 3.193314600000008,
|
||||
"total_s": 8.831151900000009,
|
||||
"prompt_tokens": 72,
|
||||
"completion_tokens": 256,
|
||||
"decode_tps": 45.230109779861856,
|
||||
"prefill_tps": 22.547105130199142
|
||||
},
|
||||
{
|
||||
"ttft_s": 3.336913099999947,
|
||||
"total_s": 8.820431600000006,
|
||||
"prompt_tokens": 72,
|
||||
"completion_tokens": 256,
|
||||
"decode_tps": 46.50298891122502,
|
||||
"prefill_tps": 21.576827997109408
|
||||
}
|
||||
]
|
||||
},
|
||||
"prefill-4096": {
|
||||
"median_prefill_tps": 367.89020559919277,
|
||||
"runs": [
|
||||
{
|
||||
"ttft_s": 10.776818000000048,
|
||||
"total_s": 10.778558400000065,
|
||||
"prompt_tokens": 3927,
|
||||
"completion_tokens": 1,
|
||||
"decode_tps": null,
|
||||
"prefill_tps": 364.3932745268578
|
||||
},
|
||||
{
|
||||
"ttft_s": 10.674380400000018,
|
||||
"total_s": 10.675752999999986,
|
||||
"prompt_tokens": 3927,
|
||||
"completion_tokens": 1,
|
||||
"decode_tps": null,
|
||||
"prefill_tps": 367.89020559919277
|
||||
},
|
||||
{
|
||||
"ttft_s": 10.659159799999998,
|
||||
"total_s": 10.660433699999999,
|
||||
"prompt_tokens": 3927,
|
||||
"completion_tokens": 1,
|
||||
"decode_tps": null,
|
||||
"prefill_tps": 368.41552933656186
|
||||
}
|
||||
]
|
||||
},
|
||||
"prefill-32768": {
|
||||
"median_prefill_tps": 599.5465232321448,
|
||||
"runs": [
|
||||
{
|
||||
"ttft_s": 51.80415329999994,
|
||||
"total_s": 51.80544879999991,
|
||||
"prompt_tokens": 31059,
|
||||
"completion_tokens": 1,
|
||||
"decode_tps": null,
|
||||
"prefill_tps": 599.5465232321448
|
||||
},
|
||||
{
|
||||
"ttft_s": 52.34226509999996,
|
||||
"total_s": 52.34423529999992,
|
||||
"prompt_tokens": 31059,
|
||||
"completion_tokens": 1,
|
||||
"decode_tps": null,
|
||||
"prefill_tps": 593.3828033743237
|
||||
},
|
||||
{
|
||||
"ttft_s": 51.688018000000056,
|
||||
"total_s": 51.689263900000014,
|
||||
"prompt_tokens": 31059,
|
||||
"completion_tokens": 1,
|
||||
"decode_tps": null,
|
||||
"prefill_tps": 600.893615228194
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"exe": "<folder>\\Strata\\engine\\strata.exe",
|
||||
"args": [
|
||||
"--pack",
|
||||
"<folder>\\Strata-data\\packs\\iq3_s",
|
||||
"--native",
|
||||
"<folder>\\Strata-data\\models\\IQ3_S\\Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00001-of-00002.gguf",
|
||||
"--ple-gguf",
|
||||
"<folder>\\Strata-data\\models\\IQ3_S\\Qwen3.8-Flash-Next-GSQ-RCO-IQ3_S-00002-of-00002.gguf",
|
||||
"--expert-profile",
|
||||
"<folder>\\Strata\\data\\expert-profile.bin",
|
||||
"--expert-cache",
|
||||
"auto",
|
||||
"--prefill",
|
||||
"auto",
|
||||
"--spec",
|
||||
"4",
|
||||
"--spec-min-p",
|
||||
"0.5",
|
||||
"--mtp",
|
||||
"<folder>\\Strata-data\\mtp\\rt",
|
||||
"--max-context",
|
||||
"65536",
|
||||
"--kv",
|
||||
"int8",
|
||||
"--kv-resident",
|
||||
"32768"
|
||||
],
|
||||
"cwd": "<folder>\\Strata",
|
||||
"tokenizer": "<folder>\\Strata-data\\packs\\iq3_s\\tokenizer",
|
||||
"model_name": "qwen3.8-flash-next-iq3_s",
|
||||
"log": "<folder>\\Strata\\strata-iq3_s.log",
|
||||
"lib_dirs": [
|
||||
"<folder>\\Strata\\engine\\rocm\\bin"
|
||||
],
|
||||
"port": 8080,
|
||||
"backend": "hip",
|
||||
"env": {
|
||||
"STRATA_HIPBLASLT_TUNING": "<folder>\\Strata\\tools\\hip\\gfx1201-hipblaslt-100500.txt"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user