Measure one-request throughput in single and dual Strata profiles
This commit is contained in:
1 parent
c4192fb862
commit
e7b5bd276b
6 files changed
+310
No files matched your search
@@ -0,0 +1,18 @@
|
||||
# Strata IQ3: one request, single vs dual profile
|
||||
|
||||
User-authorized comparison started only after endpoint.active_requests=0 twice, two seconds apart. Same synthetic German backup-text prompt, temperature0, seed42, reasoningnone, top_p1/top_k0, max_tokens512. Both profiles context262144 per request; difference slots1 vs2. Same IQ3 weights, resident experts, layer16, GPU order3060/5080, manual reserve1024each; production43GiB. No service restart or changes to profiles/config.
|
||||
|
||||
| Profile | Run | Output tok/s | Output tokens | Prompt tokens | Cached tokens | Draft / accepted | Peak active requests |
|
||||
|---|---:|---:|---:|---:|---:|---:|---:|
|
||||
| flash-next-strata-iq3 | 1 | 62.9 | 512 | 95 | 0 | 300 / 183 | 1 |
|
||||
| flash-next-strata-iq3 | 2 | 75.2 | 512 | 95 | 88 | 277 / 168 | 1 |
|
||||
| flash-next-strata-iq3 | 3 | 79.2 | 512 | 95 | 88 | 308 / 192 | 1 |
|
||||
| flash-next-strata-iq3-dual | 1 | 54.3 | 512 | 95 | 0 | 327 / 195 | 1 |
|
||||
| flash-next-strata-iq3-dual | 2 | 62.9 | 512 | 95 | 88 | 303 / 179 | 1 |
|
||||
| flash-next-strata-iq3-dual | 3 | 66.0 | 512 | 95 | 88 | 311 / 181 | 1 |
|
||||
|
||||
Median output: single75.2tok/s, dual with one request62.9tok/s; dual16.36% lower. First runs62.9vs54.3; followups75.2/79.2vs62.9/66.0. All six runs512output tokens, uncontended=true. Backend timing, not client wall-time estimate.
|
||||
|
||||
Three sequential runs per profile, not a statistically robust/randomized benchmark. First run cold prompt cache; next two reuse the same prompt. Adaptive expert cache and model path may warm across runs. This is a small-prompt/single-request comparison, not a full262K context or concurrent-throughput test. Higher cache pressure is a plausible explanation, not an isolated causal measurement. No generated answer text saved.
|
||||
|
||||
Previously active flash-next-strata-iq3-dual restored through regular Deck completion endpoint; HTTP200 confirmed in restore.json, finalstatus complete. No private inputs, logs, weights or secrets read into artifacts. Public source + synthetic metrics stored in Git; no new runtime dependency or native restore change.
|
||||
@@ -0,0 +1,59 @@
|
||||
"""Idle-only synthetic one-request comparison. Never reads production logs/chats."""
|
||||
import concurrent.futures,json,statistics,subprocess,time,urllib.request,urllib.error
|
||||
from pathlib import Path
|
||||
ROOT=Path('/opt/athena-deck-dev/strata-dual-prepared-20261013/single-speed')
|
||||
ROOT.mkdir(exist_ok=True)
|
||||
x=json.loads(subprocess.check_output(['docker','inspect','athena-voxcpm2-web']))[0]
|
||||
p=next(m['Source'] for m in x['Mounts'] if m['Destination']=='/data')
|
||||
token=json.loads((Path(p)/'deck-connection.json').read_text())['token']
|
||||
HEADERS={'Authorization':'Bearer '+token,'Content-Type':'application/json'}
|
||||
def status():
|
||||
req=urllib.request.Request('http://127.0.0.1:8108/api/v1/status',headers=HEADERS)
|
||||
return json.load(urllib.request.urlopen(req,timeout=10))['endpoint']['active_requests']
|
||||
def save_status(phase,**extra):
|
||||
tmp=ROOT/'status.tmp';tmp.write_text(json.dumps(dict(phase=phase,**extra)));tmp.replace(ROOT/'status.json')
|
||||
def wait_idle():
|
||||
while True:
|
||||
n=status()
|
||||
if n==0:
|
||||
time.sleep(2)
|
||||
if status()==0:return
|
||||
save_status('waiting_for_idle',active_requests=n);time.sleep(5)
|
||||
|
||||
def generate(model,text,max_tokens=512):
|
||||
body=dict(model=model,messages=[dict(role='user',content=text)],max_tokens=max_tokens,reasoning_effort='none',temperature=0,seed=42,top_p=1,top_k=0)
|
||||
req=urllib.request.Request('http://127.0.0.1:8120/v1/chat/completions',data=json.dumps(body).encode(),headers=HEADERS)
|
||||
start=time.monotonic()
|
||||
with urllib.request.urlopen(req,timeout=300) as r:
|
||||
data=json.load(r)
|
||||
return dict(model=model,http_status=r.status,wall_seconds=round(time.monotonic()-start,3),usage=data.get('usage'),backend_timings=data.get('backend_timings') or data.get('timings'),finish_reason=(data.get('choices') or [{}])[0].get('finish_reason'))
|
||||
|
||||
wait_idle()
|
||||
config=json.loads(Path('/opt/athena-deck-dev/runtime/state/strata-worker/worker.json').read_text())
|
||||
previous=config['model_name'];save_status('started',previous_model=previous)
|
||||
prompt='Schreibe einen sachlichen deutschen Fachtext mit mindestens 900 Wörtern über die Planung einer zuverlässigen Datensicherung für ein privates Heimnetz. Erkläre vollständige und inkrementelle Sicherungen, Aufbewahrung, Wiederherstellungsprüfungen und den Umgang mit Fehlern. Schreibe direkt den Text, ohne Einleitung über deine Vorgehensweise und ohne Rückfragen.'
|
||||
rows=[]
|
||||
try:
|
||||
for model in ('flash-next-strata-iq3','flash-next-strata-iq3-dual'):
|
||||
wait_idle();save_status('loading',model=model)
|
||||
load=generate(model,'Antworte mit OK.',1)
|
||||
for run in range(1,4):
|
||||
wait_idle();save_status('measuring',model=model,run=run,completed=len(rows))
|
||||
with concurrent.futures.ThreadPoolExecutor(max_workers=1) as pool:
|
||||
job=pool.submit(generate,model,prompt);peak=0
|
||||
while not job.done():
|
||||
peak=max(peak,status());time.sleep(.25)
|
||||
row=job.result()
|
||||
row.update(run=run,peak_active_requests=peak,uncontended=peak<=1);rows.append(row)
|
||||
(ROOT/'results.json').write_text(json.dumps(rows,indent=2))
|
||||
summary={}
|
||||
for model in ('flash-next-strata-iq3','flash-next-strata-iq3-dual'):
|
||||
valid=[r for r in rows if r['model']==model and r['uncontended'] and r.get('backend_timings') and r['usage']['completion_tokens']>=256]
|
||||
rates=[r['backend_timings']['predicted_per_second'] for r in valid]
|
||||
summary[model]=dict(valid_runs=len(valid),output_tok_s=rates,median_output_tok_s=statistics.median(rates) if rates else None)
|
||||
(ROOT/'summary.json').write_text(json.dumps(dict(previous_model=previous,summary=summary),indent=2));print(json.dumps({'summary':summary}),flush=True)
|
||||
finally:
|
||||
wait_idle();save_status('restoring',model=previous,completed=len(rows))
|
||||
restored=generate(previous,'Antworte mit OK.',1)
|
||||
(ROOT/'restore.json').write_text(json.dumps(restored,indent=2));save_status('complete',completed=len(rows),restored_model=previous,http_status=restored['http_status'])
|
||||
print(json.dumps({'restored_model':previous,'http_status':restored['http_status']}),flush=True)
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"model": "flash-next-strata-iq3-dual",
|
||||
"http_status": 200,
|
||||
"wall_seconds": 0.445,
|
||||
"usage": {
|
||||
"prompt_tokens": 18,
|
||||
"completion_tokens": 1,
|
||||
"total_tokens": 19,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 0,
|
||||
"prompt_n": 18,
|
||||
"prompt_ms": 359.3,
|
||||
"prompt_per_token_ms": 19.961,
|
||||
"prompt_per_second": 50.1,
|
||||
"predicted_n": 1,
|
||||
"predicted_ms": 36.7,
|
||||
"predicted_per_token_ms": 36.7,
|
||||
"predicted_per_second": 27.2,
|
||||
"draft_n": 0,
|
||||
"draft_n_accepted": 0
|
||||
},
|
||||
"finish_reason": "length"
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
[
|
||||
{
|
||||
"model": "flash-next-strata-iq3",
|
||||
"http_status": 200,
|
||||
"wall_seconds": 10.171,
|
||||
"usage": {
|
||||
"prompt_tokens": 95,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 607,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 0,
|
||||
"prompt_n": 95,
|
||||
"prompt_ms": 1930.4,
|
||||
"prompt_per_token_ms": 20.32,
|
||||
"prompt_per_second": 49.2,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 8142.2,
|
||||
"predicted_per_token_ms": 15.903,
|
||||
"predicted_per_second": 62.9,
|
||||
"draft_n": 300,
|
||||
"draft_n_accepted": 183
|
||||
},
|
||||
"finish_reason": "length",
|
||||
"run": 1,
|
||||
"peak_active_requests": 1,
|
||||
"uncontended": true
|
||||
},
|
||||
{
|
||||
"model": "flash-next-strata-iq3",
|
||||
"http_status": 200,
|
||||
"wall_seconds": 6.979,
|
||||
"usage": {
|
||||
"prompt_tokens": 95,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 607,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 88
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 88,
|
||||
"prompt_n": 7,
|
||||
"prompt_ms": 77.3,
|
||||
"prompt_per_token_ms": 11.043,
|
||||
"prompt_per_second": 90.6,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 6808.4,
|
||||
"predicted_per_token_ms": 13.298,
|
||||
"predicted_per_second": 75.2,
|
||||
"draft_n": 277,
|
||||
"draft_n_accepted": 168
|
||||
},
|
||||
"finish_reason": "length",
|
||||
"run": 2,
|
||||
"peak_active_requests": 1,
|
||||
"uncontended": true
|
||||
},
|
||||
{
|
||||
"model": "flash-next-strata-iq3",
|
||||
"http_status": 200,
|
||||
"wall_seconds": 6.635,
|
||||
"usage": {
|
||||
"prompt_tokens": 95,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 607,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 88
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 88,
|
||||
"prompt_n": 7,
|
||||
"prompt_ms": 72.7,
|
||||
"prompt_per_token_ms": 10.386,
|
||||
"prompt_per_second": 96.3,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 6465.5,
|
||||
"predicted_per_token_ms": 12.628,
|
||||
"predicted_per_second": 79.2,
|
||||
"draft_n": 308,
|
||||
"draft_n_accepted": 192
|
||||
},
|
||||
"finish_reason": "length",
|
||||
"run": 3,
|
||||
"peak_active_requests": 1,
|
||||
"uncontended": true
|
||||
},
|
||||
{
|
||||
"model": "flash-next-strata-iq3-dual",
|
||||
"http_status": 200,
|
||||
"wall_seconds": 11.68,
|
||||
"usage": {
|
||||
"prompt_tokens": 95,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 607,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 0,
|
||||
"prompt_n": 95,
|
||||
"prompt_ms": 2068.2,
|
||||
"prompt_per_token_ms": 21.771,
|
||||
"prompt_per_second": 45.9,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 9423.2,
|
||||
"predicted_per_token_ms": 18.405,
|
||||
"predicted_per_second": 54.3,
|
||||
"draft_n": 327,
|
||||
"draft_n_accepted": 195
|
||||
},
|
||||
"finish_reason": "length",
|
||||
"run": 1,
|
||||
"peak_active_requests": 1,
|
||||
"uncontended": true
|
||||
},
|
||||
{
|
||||
"model": "flash-next-strata-iq3-dual",
|
||||
"http_status": 200,
|
||||
"wall_seconds": 8.377,
|
||||
"usage": {
|
||||
"prompt_tokens": 95,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 607,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 88
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 88,
|
||||
"prompt_n": 7,
|
||||
"prompt_ms": 107.0,
|
||||
"prompt_per_token_ms": 15.286,
|
||||
"prompt_per_second": 65.4,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 8142.5,
|
||||
"predicted_per_token_ms": 15.903,
|
||||
"predicted_per_second": 62.9,
|
||||
"draft_n": 303,
|
||||
"draft_n_accepted": 179
|
||||
},
|
||||
"finish_reason": "length",
|
||||
"run": 2,
|
||||
"peak_active_requests": 1,
|
||||
"uncontended": true
|
||||
},
|
||||
{
|
||||
"model": "flash-next-strata-iq3-dual",
|
||||
"http_status": 200,
|
||||
"wall_seconds": 7.961,
|
||||
"usage": {
|
||||
"prompt_tokens": 95,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 607,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 88
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 88,
|
||||
"prompt_n": 7,
|
||||
"prompt_ms": 105.2,
|
||||
"prompt_per_token_ms": 15.029,
|
||||
"prompt_per_second": 66.5,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 7761.2,
|
||||
"predicted_per_token_ms": 15.159,
|
||||
"predicted_per_second": 66.0,
|
||||
"draft_n": 311,
|
||||
"draft_n_accepted": 181
|
||||
},
|
||||
"finish_reason": "length",
|
||||
"run": 3,
|
||||
"peak_active_requests": 1,
|
||||
"uncontended": true
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1 @@
|
||||
{"phase": "complete", "completed": 6, "restored_model": "flash-next-strata-iq3-dual", "http_status": 200}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"previous_model": "flash-next-strata-iq3-dual",
|
||||
"summary": {
|
||||
"flash-next-strata-iq3": {
|
||||
"valid_runs": 3,
|
||||
"output_tok_s": [
|
||||
62.9,
|
||||
75.2,
|
||||
79.2
|
||||
],
|
||||
"median_output_tok_s": 75.2
|
||||
},
|
||||
"flash-next-strata-iq3-dual": {
|
||||
"valid_runs": 3,
|
||||
"output_tok_s": [
|
||||
54.3,
|
||||
62.9,
|
||||
66.0
|
||||
],
|
||||
"median_output_tok_s": 62.9
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user