Document dual-slot pipeline and memory-pressure comparison
This commit is contained in:
1 parent
e7b5bd276b
commit
417d06f404
12 files changed
+2674
No files matched your search
@@ -0,0 +1,205 @@
|
||||
# Dual-slot batch-group comparison, 2026-10-14
|
||||
|
||||
Requested by the user after the OpenWebUI background automation was identified
|
||||
as a separate cause of destructive profile switches and lost context caches.
|
||||
OpenWebUI stays stopped. No private chats, prompts or production logs enter
|
||||
this benchmark. Only synthetic requests are generated.
|
||||
|
||||
## Fixed setup
|
||||
|
||||
- Existing Strata 0.1.43.1; commit from the installed `ready.json` is recorded
|
||||
in `metadata.json`. The previously requested version update is separate.
|
||||
- Existing GSQ-RCO IQ3_XXS weights, GPU order RTX 3060 then RTX 5080,
|
||||
layer split 16 and current measured expert-cache tuning unchanged.
|
||||
- Parallel 2, context 262144 per slot; int8 KV, resident KV window 32768.
|
||||
- Same CPU vision encoder as production, enabled even for these text tests.
|
||||
- Own isolated container: 44 GiB cgroup memory, no additional swap,
|
||||
six CPU equivalents, UID 65534, read-only root filesystem and production
|
||||
mounts, no network except its own loopback. Only the experiment directory
|
||||
is writable. Production Deck and CPU STT remain running.
|
||||
- Existing resident-expert mode and 6-GiB headroom retained. Record the
|
||||
*resolved* pinned expert budget in both arms: it is sized automatically
|
||||
from available RAM, so materially different budgets confound a comparison.
|
||||
|
||||
## Arms and measurements
|
||||
|
||||
1. `serial_mtp`: `--batch-mtp --batch-groups 1`, the current configuration.
|
||||
2. `pipeline`: `--batch-mtp --batch-groups auto`. The official engine gives
|
||||
the explicit pipeline precedence and disables batch-MTP in this arm.
|
||||
|
||||
Same deterministic prompts and output limits in both arms. Two repetitions
|
||||
of a short solo request and two concurrent short requests (512 output tokens
|
||||
each). Then two distinct conversations of approximately 64K and 128K tokens
|
||||
each: simultaneous cold requests (256 output tokens), followed by simultaneous
|
||||
cached continuations (512 output tokens). Token counts use the installed
|
||||
tokenizer, not character estimates. These are speed/resource tests, not
|
||||
quality benchmarks or proof that two full 262K windows fit.
|
||||
|
||||
Record backend input/output timing, request wall time and TTFT, usage/cache
|
||||
counts, observed overlapping batch slots, cgroup peak memory, major faults,
|
||||
file-page refaults, memory-limit events, full memory PSI, actual disk reads,
|
||||
CPU utilization and sampled GPU utilization/memory. Aggregate wall-time
|
||||
throughput includes prefill/waiting and must not be confused with the sum of
|
||||
backend decode rates. Solo-path `/slots` reporting is incomplete upstream;
|
||||
zero processing slots is not treated as no computation.
|
||||
|
||||
## Execution and restoration
|
||||
|
||||
Stage `/opt/athena-deck-dev/batch-ab-20261014`, output
|
||||
`/data/experiments/strata-batch-ab-20261014`, own transient service
|
||||
`athena-strata-batch-ab-20261014`, own container of the same name.
|
||||
|
||||
Before launch: API idle verified, original configuration converted into a
|
||||
synthetic test template with its real API credential removed. LLM unloaded
|
||||
through authenticated Deck GUI; both GPUs verified free. No Deck, OpenCode,
|
||||
OpenWebUI or host restart. No production profile changes. Launcher restores
|
||||
the previous Dual profile through the regular API with a minimal synthetic
|
||||
request after its test container exits, unless new production activity is
|
||||
already present. Restoration must be verified from `restore.json` and status.
|
||||
|
||||
The scripts also run on the future native deployment using the same pinned
|
||||
runtime; `benchmark.py` has no Docker dependency. The current `launch.py`
|
||||
uses Docker only to reproduce the existing container limits and read-only
|
||||
mounts. A native launcher must use equivalent systemd resource limits and
|
||||
configured paths; this experiment is not a native fresh-host restore proof.
|
||||
|
||||
Official batching documentation at the tested commit:
|
||||
https://github.com/Niko1221/Strata/blob/a0116b2782a5b82622358c04a06496485d12b2d6/docs/BATCHING.md
|
||||
|
||||
## First series: automatic expert budget
|
||||
|
||||
Completed all 16 cases without an OOM kill or server failure. Individual
|
||||
measurements, not confidence intervals. Saved metrics: `results-auto.json`.
|
||||
|
||||
| Workload | Serial + batch-MTP | Pipeline |
|
||||
| --- | ---: | ---: |
|
||||
| Short solo, backend output token/s (two repeats) | 57.5 / 68.0 | 55.1 / 66.9 |
|
||||
| Two short requests, backend output token/s per request | 35.6–41.0 | 48.8–54.7 |
|
||||
| Two short requests, completion wall time (two repeats) | 15.3 / 14.1 s | 11.4 / 11.0 s |
|
||||
| Two fresh ~64K prompts, total wall time | 181.9 s | 159.4 s |
|
||||
| Their next turns, total wall time | 21.0 s | 90.1 s |
|
||||
| Two fresh ~128K prompts, total wall time | 343.9 s | 338.2 s |
|
||||
| Their next turns, total wall time | 20.6 s | 186.5 s |
|
||||
| Storage read for fresh ~128K pair | 332.6 GiB | 309.2 GiB |
|
||||
| Full cgroup memory PSI during that pair | 30.9% | 32.9% |
|
||||
|
||||
The automatically pinned expert complement differed: 20.56 GiB serial versus
|
||||
16.77 GiB pipeline, despite identical 44-GiB limits and 6-GiB headroom. The
|
||||
second engine's initial cgroup accounted 9.0 GiB versus 2.2 GiB at the first
|
||||
start; its automatic budget reading was lower. Neither engine had a surviving
|
||||
predecessor or duplicated vision process. Thus this series measures the actual
|
||||
two startup outcomes; **do not attribute every difference solely to batching**.
|
||||
No host cache flush was performed.
|
||||
|
||||
Both arms borrowed 4,681 expert GPU-cache slots (~7.26 GiB in total) for prompt
|
||||
processing, with **zero RAM copies** of those borrowed experts. The engine
|
||||
explicitly reported reading these experts from the model files each chunk.
|
||||
Both fresh-128K measurements reached the 44-GiB cgroup limit, with substantial
|
||||
page refaults and approximately one busy CPU core. This reproduces the
|
||||
memory/storage bottleneck independently of OpenWebUI and profile switching.
|
||||
|
||||
The serial continuations reused both conversation prefixes. In both pipeline
|
||||
continuation pairs, one request reused its prefix and the other reused zero
|
||||
tokens (65,807 and ~131K tokens reread). The slow partner also delayed decode
|
||||
of the already cached conversation. Backend decode timings can include this
|
||||
interference; use wall times and cache counts together.
|
||||
|
||||
Installed `serve/server.py`, `StrataEngine.pick_slot`, lines 1647 onward, explicitly
|
||||
handles pipelined slot groups without retaining a pipelined slot as a
|
||||
conversation cache. It prioritizes filling group holes/spreading slots;
|
||||
the non-pipeline branch instead prefers the longest held prompt prefix.
|
||||
The observed cache limitation is therefore supported by both measurements
|
||||
and source, not an assertion of model reasoning failure.
|
||||
|
||||
## Controlled follow-up
|
||||
|
||||
`strata-batch-fixed16-20261014`: same runtime, limits and prompts, one short
|
||||
solo/parallel repetition and the fresh/cached ~64K pair, requesting an explicit
|
||||
`--resident-budget-gib 16` in both arms. This caps pinned experts, not
|
||||
total process RAM. Launched only after the first series completed and its
|
||||
regular restoration was confirmed, then regular GUI unload and GPU-free
|
||||
verification were repeated. No production settings changed.
|
||||
|
||||
**Important correction:** requesting a cap does not guarantee its allocation.
|
||||
Serial actually obtained 16.00 GiB; the second pipeline startup was further
|
||||
clamped to 12.77 GiB. This pair is therefore not a controlled 16-vs-16 result.
|
||||
Record that lower-budget pipeline separately, not as evidence for the flag's
|
||||
isolated effect. The serial 16-GiB run took 201.1 s / 182.1 GiB storage reads
|
||||
for the fresh 64K pair, with 29.8% full PSI; its cached pair took 21.7 s.
|
||||
Compared with the automatic serial run, lowering the pinned budget did not
|
||||
remove the observed bottleneck. Order/cache effects still limit that comparison.
|
||||
|
||||
`strata-batch-fresh16-20261014` repeats **only pipeline** in a fresh isolated
|
||||
container/cgroup with the same requested 16-GiB cap, short requests and same
|
||||
64K fixtures. The resolved allocation must equal the serial arm's 16.00 GiB
|
||||
before treating this as a controlled-budget comparison. Starting each arm in
|
||||
its own cgroup avoids carrying the preceding arm's accounted pages into the
|
||||
next startup's budget decision. No global cache flushing is used, so this does
|
||||
not establish identical physical page-cache state or cold-start I/O.
|
||||
|
||||
The separate pipeline container confirmed **16.00 GiB**, matching serial.
|
||||
The corrected countercheck completed all four cases, without OOM or failure.
|
||||
`results-cap16-sequential.json` contains the serial 16-GiB arm and the explicitly
|
||||
non-comparable pipeline 12.77-GiB arm; `results-cap16-fresh-pipeline.json`
|
||||
contains the valid 16-GiB pipeline arm. `resolved-settings.json` records the
|
||||
allocations and resolved flag semantics.
|
||||
|
||||
| Same 16-GiB expert budget | Serial + batch-MTP | Pipeline |
|
||||
| --- | ---: | ---: |
|
||||
| Short solo, backend output token/s | 54.2 | 56.8 |
|
||||
| Two short requests, backend output token/s per request | 35.2 / 37.7 | 52.4 / 48.8 |
|
||||
| Two short requests, completion wall time | 15.4 s | 11.3 s |
|
||||
| Two fresh ~64K prompts, total wall time | 201.1 s | 162.0 s |
|
||||
| Their next turns, total wall time | 21.7 s | 98.3 s |
|
||||
| Storage read for fresh pair | 182.1 GiB | 138.9 GiB |
|
||||
| Full memory PSI during fresh pair | 29.8% | 29.7% |
|
||||
| Storage read for next turns | 3.7 GiB | 76.2 GiB |
|
||||
| Reused prefix in both next turns? | Yes | No: one request reused zero tokens |
|
||||
|
||||
These remain single, ordered measurements without forced cold physical
|
||||
page-cache state. The similar effect across the automatic-budget series and
|
||||
the corrected-budget series supports the practical conclusion, but does not
|
||||
establish a universal performance ratio for all prompts or hardware.
|
||||
|
||||
### Decision
|
||||
|
||||
Keep production `--batch-mtp --batch-groups 1` for the user's continuing
|
||||
OpenCode conversations. Pipeline improved short concurrent output and cold
|
||||
prefill here, but its missing retained batch conversation cache caused much
|
||||
slower subsequent turns. It did not solve memory pressure. Lowering pinned
|
||||
experts to 16 GiB also did not solve pressure and did not improve the serial
|
||||
workload in the measured startup states. **No production flags or RAM limits
|
||||
were changed.** The parameter is the number of batch groups, not a switch
|
||||
between having one or two user context slots.
|
||||
|
||||
More physical RAM is a plausible way to retain more experts and borrowed
|
||||
prefill experts, but no larger-RAM configuration was tested; do not promise
|
||||
a particular token rate. Increasing a cgroup limit cannot manufacture host
|
||||
RAM, and the 44-GiB limit was not raised. A future runtime update should be
|
||||
tested separately for pipeline conversation-cache behavior before changing
|
||||
the recommended production setting. This test used 0.1.43.1; it is **not**
|
||||
evidence that the pending newer Strata release was installed or benchmarked.
|
||||
|
||||
### Reproduction safeguard
|
||||
|
||||
After the clamped-budget discovery, the saved `benchmark.py` was strengthened
|
||||
to check the resolved expert allocation after startup and abort a requested
|
||||
controlled-budget run if the allocation differs by more than 0.02 GiB. For a
|
||||
future controlled comparison use separate fresh containers/cgroups and
|
||||
`TEST_ARMS=serial_mtp` / `TEST_ARMS=pipeline`, `TEST_RESIDENT_GIB=16`,
|
||||
`TEST_REPETITIONS=1`, `TEST_TARGETS=65536`. The scripts used for the recorded
|
||||
measurements preceded that added assertion; the final equality was separately
|
||||
verified from both engine startup records. No workload or timing code changed.
|
||||
|
||||
## Verified final state
|
||||
|
||||
At approximately 13:02 Europe/Berlin, all three own transient services were
|
||||
inactive and no own test container remained. `restore-final.json` confirms a
|
||||
regular HTTP 200 generation with `flash-next-strata-iq3-dual`. The regular Deck
|
||||
status then confirmed LLM loaded and zero active requests. The native Deck UI
|
||||
showed the original Dual-Slot 2x262K profile active, two free slots and both
|
||||
GPUs occupied by the one production Strata engine. Dashboard screenshot:
|
||||
`restored-dashboard.png`. The one-token restoration probe is not a speed
|
||||
measurement; ignore its dashboard token/s when reading the benchmark tables.
|
||||
Deck, OpenCode, OpenWebUI and host were not restarted. OpenWebUI stayed stopped,
|
||||
CPU STT stayed ready and no TTS policy was changed.
|
||||
@@ -0,0 +1,186 @@
|
||||
"""Isolated, synthetic serial-MTP versus pipelined dual-slot comparison."""
|
||||
import concurrent.futures, copy, json, os, pathlib, random, re, signal
|
||||
import socket, subprocess, threading, time, urllib.request
|
||||
P = pathlib.Path
|
||||
ROOT = P('/experiment')
|
||||
SOURCE = P('/var/lib/deck/strata-runtime/source')
|
||||
MODEL = 'synthetic-batch-ab'
|
||||
KEY = 'synthetic-isolated-batch-test'
|
||||
RESULTS = []
|
||||
|
||||
def save(phase, **extra):
|
||||
ROOT.mkdir(exist_ok=True)
|
||||
p = ROOT/'status.tmp'
|
||||
p.write_text(json.dumps(dict(phase=phase, completed=len(RESULTS), updated=time.time(), **extra)))
|
||||
p.replace(ROOT/'status.json')
|
||||
(ROOT/'results.json').write_text(json.dumps(RESULTS, indent=2))
|
||||
|
||||
def http(base, route, data=None, timeout=900):
|
||||
req = urllib.request.Request(base+route, data=json.dumps(data).encode() if data is not None else None,
|
||||
headers={'Authorization':'Bearer '+KEY, 'Content-Type':'application/json'})
|
||||
return urllib.request.urlopen(req, timeout=timeout)
|
||||
|
||||
def numeric():
|
||||
cg=P('/sys/fs/cgroup')
|
||||
stat=dict((k,int(v)) for k,v in (x.split() for x in (cg/'memory.stat').read_text().splitlines()))
|
||||
events=dict((k,int(v)) for k,v in (x.split() for x in (cg/'memory.events').read_text().splitlines()))
|
||||
io=0; ticks=0
|
||||
for p in P('/proc').glob('[0-9]*'):
|
||||
try:
|
||||
if (p/'comm').read_text().strip()!='strata': continue
|
||||
st=(p/'stat').read_text().rsplit(')',1)[1].split()
|
||||
ticks+=int(st[11])+int(st[12])
|
||||
io+=int(dict(x.split(':') for x in (p/'io').read_text().splitlines())['read_bytes'])
|
||||
except (OSError,ValueError): pass
|
||||
pressure={x.split()[0]:int(re.search(r'total=(\d+)',x).group(1)) for x in (cg/'memory.pressure').read_text().splitlines()}
|
||||
return dict(at=time.monotonic(), memory=int((cg/'memory.current').read_text()), read_bytes=io,
|
||||
cpu_ticks=ticks, refault=stat.get('workingset_refault_file',0), major_fault=stat.get('pgmajfault',0),
|
||||
max_events=events.get('max',0), oom=events.get('oom',0), oom_kill=events.get('oom_kill',0), pressure=pressure)
|
||||
|
||||
class Sampler:
|
||||
def __init__(self,base): self.base=base; self.rows=[]; self.stop=threading.Event()
|
||||
def run(self):
|
||||
while not self.stop.is_set():
|
||||
try:
|
||||
r=numeric()
|
||||
with http(self.base,'/slots',timeout=3) as response:
|
||||
r['processing_slots']=sum(bool(x.get('is_processing')) for x in json.load(response))
|
||||
if len(self.rows)%5==0:
|
||||
raw=subprocess.check_output(['nvidia-smi','--query-gpu=index,utilization.gpu,memory.used','--format=csv,noheader,nounits'],text=True,timeout=8)
|
||||
r['gpus']=[[float(v.strip()) for v in line.split(',')] for line in raw.splitlines()]
|
||||
self.rows.append(r)
|
||||
except (OSError,ValueError): pass
|
||||
self.stop.wait(1)
|
||||
|
||||
def generate(base,messages,limit=512):
|
||||
body=dict(model=MODEL,messages=messages,max_tokens=limit,reasoning_effort='none',
|
||||
temperature=0,top_p=1,top_k=0,seed=42,stream=True,stream_options={'include_usage':True})
|
||||
start=time.monotonic(); first=None; content=''; usage={}; timings={}; finish=None; done=False
|
||||
with http(base,'/v1/chat/completions',body) as response:
|
||||
for line in response:
|
||||
if not line.startswith(b'data:'): continue
|
||||
raw=line[5:].strip()
|
||||
if raw==b'[DONE]': done=True; break
|
||||
v=json.loads(raw)
|
||||
if 'error' in v: raise RuntimeError('Synthetic stream returned an error')
|
||||
usage=v.get('usage') or usage
|
||||
timings=v.get('timings') or v.get('backend_timings') or timings
|
||||
for choice in v.get('choices',[]):
|
||||
text=choice.get('delta',{}).get('content') or ''
|
||||
if text and first is None: first=time.monotonic()
|
||||
content+=text
|
||||
finish=choice.get('finish_reason') or finish
|
||||
if not done: raise RuntimeError('Synthetic stream ended without DONE')
|
||||
return dict(wall_seconds=time.monotonic()-start,ttft_seconds=first-start if first else None,
|
||||
usage=usage,backend_timings=timings,finish_reason=finish,_content=content)
|
||||
|
||||
def fixture(base,target,client):
|
||||
path=ROOT/f'fixture-{target}-{client}.json'
|
||||
if path.exists(): return json.loads(path.read_text())
|
||||
system=f'Messung Kontext {target}, Gespräch {client}. Antworte auf Deutsch. Schreibe mindestens 1200 Wörter über '+('Home-Assistant-Automatisierungen.' if client else 'zuverlässige Datensicherung.')
|
||||
def count(text):
|
||||
with http(base,'/v1/messages/count_tokens',dict(model=MODEL,system=system,messages=[dict(role='user',content=text)]),120) as r:
|
||||
return json.load(r)['input_tokens']
|
||||
rng=random.Random(20261014+client)
|
||||
rows=[f'Datensatz {i:06d}: Standort {rng.randrange(10000):04d}, Messwert {rng.randrange(100000000,999999999)}, Status archiviert.\n' for i in range(target//10+300)]
|
||||
per=(count(''.join(rows[:100]))-count(''))/100
|
||||
n=int((target-count(''))/per)
|
||||
for _ in range(6):
|
||||
text=''.join(rows[:n])+'\nFühre jetzt die ausführliche Schreibaufgabe aus.'
|
||||
actual=count(text); delta=target-actual
|
||||
if abs(delta)<64: break
|
||||
n=max(1,n+int(delta/per))
|
||||
if abs(actual-target)>128: raise RuntimeError('Tokenizer calibration failed')
|
||||
value=[dict(role='system',content=system),dict(role='user',content=text)]
|
||||
path.write_text(json.dumps(value)); return value
|
||||
|
||||
def measure(base,arm,case,messages,limit=512):
|
||||
save('measuring',arm=arm,case=case)
|
||||
before=numeric(); sampler=Sampler(base); thread=threading.Thread(target=sampler.run,daemon=True);thread.start()
|
||||
start=time.monotonic()
|
||||
try:
|
||||
if len(messages)==1: rows=[generate(base,messages[0],limit)]
|
||||
else:
|
||||
barrier=threading.Barrier(len(messages))
|
||||
def one(m): barrier.wait(); return generate(base,m,limit)
|
||||
with concurrent.futures.ThreadPoolExecutor(max_workers=len(messages)) as pool: rows=list(pool.map(one,messages))
|
||||
finally:
|
||||
sampler.stop.set();thread.join(5)
|
||||
elapsed=time.monotonic()-start; after=numeric(); peak=max([before['memory'],after['memory']]+[r['memory'] for r in sampler.rows])
|
||||
res=dict(arm=arm,case=case,requests=len(messages),wall_seconds=elapsed,
|
||||
aggregate_output_tok_s=sum(r['usage'].get('completion_tokens',0) for r in rows)/elapsed,
|
||||
rows=[{k:v for k,v in r.items() if k!='_content'} for r in rows],
|
||||
resources=dict(peak_memory_gib=peak/2**30,read_gib=(after['read_bytes']-before['read_bytes'])/2**30,
|
||||
read_mib_s=(after['read_bytes']-before['read_bytes'])/elapsed/2**20,
|
||||
refaults=after['refault']-before['refault'],major_faults=after['major_fault']-before['major_fault'],
|
||||
limit_events=after['max_events']-before['max_events'],oom_kill_delta=after['oom_kill']-before['oom_kill'],
|
||||
cpu_cores=(after['cpu_ticks']-before['cpu_ticks'])/os.sysconf('SC_CLK_TCK')/elapsed,
|
||||
pressure_full_percent=(after['pressure']['full']-before['pressure']['full'])/elapsed/10000,
|
||||
peak_processing_slots=max([0]+[r.get('processing_slots',0) for r in sampler.rows])))
|
||||
gpu_rows=[g for r in sampler.rows for g in r.get('gpus',[])]
|
||||
res['resources']['gpu_samples']={str(int(i)):dict(mean_utilization=sum(g[1] for g in gpu_rows if g[0]==i)/sum(g[0]==i for g in gpu_rows),peak_memory_mib=max(g[2] for g in gpu_rows if g[0]==i)) for i in {g[0] for g in gpu_rows}}
|
||||
RESULTS.append(res);save('measured',arm=arm,case=case)
|
||||
return rows
|
||||
|
||||
def run():
|
||||
baseline=json.loads(P('/test/base-template.json').read_text())
|
||||
baseline.pop('previous_model',None)
|
||||
for arm,group in [('serial_mtp','1'),('pipeline','auto')]:
|
||||
if arm not in os.environ.get('TEST_ARMS','serial_mtp,pipeline').split(','):continue
|
||||
cfg=copy.deepcopy(baseline); args=cfg['args']
|
||||
if '--batch-groups' in args:
|
||||
i=args.index('--batch-groups');del args[i:i+2]
|
||||
args+=['--batch-groups',group]
|
||||
if os.environ.get('TEST_RESIDENT_GIB'):
|
||||
if '--resident-budget-gib' in args:
|
||||
i=args.index('--resident-budget-gib');del args[i:i+2]
|
||||
args+=['--resident-budget-gib',os.environ['TEST_RESIDENT_GIB']]
|
||||
with socket.socket() as s:s.bind(('127.0.0.1',0));port=s.getsockname()[1]
|
||||
cfg.update(api_key=KEY,port=port,host='127.0.0.1',model_name=MODEL,open_browser=False,log=str(ROOT/f'engine-{arm}.log'))
|
||||
path=ROOT/f'config-{arm}.json';path.write_text(json.dumps(cfg));path.chmod(0o600)
|
||||
base=f'http://127.0.0.1:{port}'; proc=None
|
||||
env=dict(os.environ,**cfg.get('env',{}),PYTHONUNBUFFERED='1',PYTHONDONTWRITEBYTECODE='1')
|
||||
env['LD_LIBRARY_PATH']='/var/lib/deck/strata-runtime/cuda/lib64:/var/lib/deck/strata-runtime/cuda/lib:'+env.get('LD_LIBRARY_PATH','')
|
||||
try:
|
||||
save('loading',arm=arm)
|
||||
with (ROOT/f'server-{arm}.log').open('w') as log:
|
||||
proc=subprocess.Popen([str(SOURCE/'.venv/bin/python'),str(SOURCE/'serve/server.py'),'--engine','strata','--config',str(path),'--host','127.0.0.1','--port',str(port),'--fit-max-tokens'],cwd=SOURCE,env=env,stdout=log,stderr=subprocess.STDOUT,start_new_session=True)
|
||||
end=time.monotonic()+600
|
||||
while time.monotonic()<end:
|
||||
if proc.poll() is not None: raise RuntimeError('Test server exited while loading')
|
||||
try:
|
||||
with http(base,'/health',timeout=3) as r: h=json.load(r)
|
||||
if h.get('status')=='ok' and h.get('loaded',True): break
|
||||
except (OSError,ValueError): pass
|
||||
time.sleep(1)
|
||||
else: raise TimeoutError('Test load deadline')
|
||||
with http(base,'/v1/status') as r: status=json.load(r)
|
||||
if status.get('concurrency',{}).get('serving')!=2: raise RuntimeError('Two slots not confirmed')
|
||||
if os.environ.get('TEST_RESIDENT_GIB'):
|
||||
text=(ROOT/f'engine-{arm}.log').read_text(errors='replace')
|
||||
allocated=re.findall(r'resident RAM mode: ([0-9.]+) GiB of experts in RAM',text)
|
||||
expected=float(os.environ['TEST_RESIDENT_GIB'])
|
||||
if not allocated or abs(float(allocated[-1])-expected)>0.02:
|
||||
raise RuntimeError('Controlled expert budget was clamped; do not compare unequal allocations')
|
||||
for rep in range(int(os.environ.get('TEST_REPETITIONS','2'))):
|
||||
msgs=[[dict(role='system',content=f'Kurzmessung {rep}, Gespräch {i}. Schreibe auf Deutsch.'),dict(role='user',content='Schreibe einen ausführlichen Fachtext mit mindestens 1200 Wörtern über '+('Home Assistant.' if i else 'Datensicherung.'))] for i in range(2)]
|
||||
measure(base,arm,f'solo-short-{rep}',[msgs[0]])
|
||||
msgs[0][0]['content']+=' Parallele Messung.'
|
||||
measure(base,arm,f'parallel-short-{rep}',msgs)
|
||||
for target in map(int,os.environ.get('TEST_TARGETS','65536,131072').split(',')):
|
||||
save('calibrating',arm=arm,target=target)
|
||||
msgs=[fixture(base,target,i) for i in range(2)]
|
||||
first=measure(base,arm,f'parallel-cold-{target}',msgs,256)
|
||||
follow=[m+[dict(role='assistant',content=r['_content']),dict(role='user',content='Führe den Fachtext mit mindestens 1200 weiteren Wörtern fort.')] for m,r in zip(msgs,first)]
|
||||
measure(base,arm,f'parallel-cached-{target}',follow,512)
|
||||
finally:
|
||||
if proc and proc.poll() is None:
|
||||
os.killpg(proc.pid,signal.SIGTERM)
|
||||
try:proc.wait(30)
|
||||
except subprocess.TimeoutExpired:os.killpg(proc.pid,signal.SIGKILL);proc.wait()
|
||||
path.unlink(missing_ok=True)
|
||||
save('complete')
|
||||
|
||||
if __name__=='__main__':
|
||||
try:run()
|
||||
except BaseException as e:save('failed',error_type=type(e).__name__);raise
|
||||
@@ -0,0 +1,53 @@
|
||||
"""Athena host launcher: regular GUI unload first, isolated test, regular API restore."""
|
||||
import json,os,pathlib,subprocess,time,urllib.request
|
||||
P=pathlib.Path
|
||||
STAGE=P('/opt/athena-deck-dev/batch-ab-20261014')
|
||||
RUN=os.environ.get('TEST_RUN','strata-batch-ab-20261014')
|
||||
if RUN not in ('strata-batch-ab-20261014','strata-batch-fixed16-20261014','strata-batch-fresh16-20261014'):
|
||||
raise ValueError('Unknown isolated test directory')
|
||||
OUT=P('/data/experiments')/RUN
|
||||
def credentials():
|
||||
d=json.loads(subprocess.check_output(['docker','inspect','athena-voxcpm2-web']))[0]
|
||||
p=next(P(m['Source']) for m in d['Mounts'] if m['Destination']=='/data')
|
||||
return json.loads((p/'deck-connection.json').read_text())['token']
|
||||
def request(path,data=None):
|
||||
req=urllib.request.Request('http://127.0.0.1:'+('8120' if path.startswith('/v1/') else '8108')+path,
|
||||
data=json.dumps(data).encode() if data is not None else None,
|
||||
headers={'Authorization':'Bearer '+credentials(),'Content-Type':'application/json'})
|
||||
with urllib.request.urlopen(req,timeout=600) as r:return r.status,json.load(r)
|
||||
def mark(phase,**extra):
|
||||
p=OUT/'launcher.tmp';p.write_text(json.dumps(dict(phase=phase,updated=time.time(),**extra)));p.replace(OUT/'launcher-status.json')
|
||||
def main():
|
||||
_,s=request('/api/v1/status')
|
||||
if s['endpoint']['active_requests'] or s['endpoint']['counts']['llm']['loaded']:
|
||||
raise RuntimeError('Regularly unload idle Deck LLM first')
|
||||
g=subprocess.check_output(['nvidia-smi','--query-compute-apps=pid','--format=csv,noheader,nounits'],text=True).strip()
|
||||
if g and 'No running processes' not in g:raise RuntimeError('GPU processes still present; no test started')
|
||||
d=json.loads(subprocess.check_output(['docker','inspect','athena-deck-dev']))[0]
|
||||
args=['docker','run','--rm','--name','athena-'+RUN,'--gpus','all',
|
||||
'--user','65534:65534','--read-only','--cap-drop','ALL','--security-opt','no-new-privileges:true',
|
||||
'--memory','44g','--memory-swap','44g','--cpus','6','--network','none',
|
||||
'--tmpfs','/tmp:rw,nosuid,nodev,size=512m','-e','HOME=/experiment/home',
|
||||
'-e','PYTHONDONTWRITEBYTECODE=1','-e','NVIDIA_DRIVER_CAPABILITIES=compute,utility','--entrypoint','python3']
|
||||
for name in ('TEST_RESIDENT_GIB','TEST_REPETITIONS','TEST_TARGETS','TEST_ARMS'):
|
||||
if name in os.environ:args+=['-e',name+'='+os.environ[name]]
|
||||
for m in d['Mounts']:
|
||||
if m['Type']=='bind' and (m['Destination']=='/var/lib/deck' or 'strata' in m['Destination']):
|
||||
args+=['--mount',f"type=bind,src={m['Source']},dst={m['Destination']},readonly"]
|
||||
args+=['--mount',f'type=bind,src={STAGE},dst=/test,readonly','--mount',f'type=bind,src={OUT},dst=/experiment',d['Config']['Image'],'/test/benchmark.py']
|
||||
try:
|
||||
mark('running')
|
||||
with (OUT/'container-test.log').open('w') as f:r=subprocess.run(args,stdout=f,stderr=subprocess.STDOUT)
|
||||
mark('test_complete' if r.returncode==0 else 'test_failed',exit_code=r.returncode)
|
||||
finally:
|
||||
_,s=request('/api/v1/status');e=s['endpoint']
|
||||
if e['active_requests'] or e['counts']['llm']['loaded']:
|
||||
mark('restore_skipped_new_activity')
|
||||
else:
|
||||
previous=json.loads((STAGE/'base-template.json').read_text())['previous_model']
|
||||
status,_=request('/v1/chat/completions',dict(model=previous,messages=[dict(role='user',content='OK')],max_tokens=1,reasoning_effort='none'))
|
||||
(OUT/'restore.json').write_text(json.dumps(dict(http_status=status,model=previous)))
|
||||
mark('finished',restored=status==200,model=previous)
|
||||
if __name__=='__main__':
|
||||
try:main()
|
||||
except BaseException as e:mark('launcher_failed',error_type=type(e).__name__);raise
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"previous_model": "flash-next-strata-iq3-dual",
|
||||
"memory_limit_gib": 44,
|
||||
"cpu_quota_cores": 6,
|
||||
"arms": [
|
||||
"serial_mtp",
|
||||
"pipeline"
|
||||
],
|
||||
"retained_cpu_vision": true,
|
||||
"runtime": {
|
||||
"commit": "a0116b2782a5b82622358c04a06496485d12b2d6",
|
||||
"cuda": "13.0",
|
||||
"architectures": "86;120",
|
||||
"origin": "native-build"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"runtime_commit": "a0116b2782a5b82622358c04a06496485d12b2d6",
|
||||
"runtime_release": "0.1.43.1",
|
||||
"production_changed": false,
|
||||
"cgroup_memory_limit_gib": 44,
|
||||
"extra_swap": false,
|
||||
"resident_headroom_gib": 6,
|
||||
"auto_allocated_expert_gib": {
|
||||
"serial_mtp": 20.56,
|
||||
"pipeline": 16.77
|
||||
},
|
||||
"requested16_same_container_allocated_gib": {
|
||||
"serial_mtp": 16.0,
|
||||
"pipeline": 12.77
|
||||
},
|
||||
"requested16_fresh_container_allocated_gib": {
|
||||
"pipeline": 16.0
|
||||
},
|
||||
"serial_flags": [
|
||||
"--batch-mtp",
|
||||
"--batch-groups",
|
||||
"1"
|
||||
],
|
||||
"pipeline_flags": [
|
||||
"--batch-mtp",
|
||||
"--batch-groups",
|
||||
"auto"
|
||||
],
|
||||
"pipeline_batch_mtp_resolved": false,
|
||||
"pipeline_solo_mtp_retained": true,
|
||||
"gpu_order": [
|
||||
"RTX3060",
|
||||
"RTX5080"
|
||||
],
|
||||
"layer_split": 16,
|
||||
"parallel": 2,
|
||||
"context_per_slot": 262144,
|
||||
"kv": "int8",
|
||||
"kv_resident": 32768,
|
||||
"prefill_borrowed_expert_slots": 4681,
|
||||
"borrowed_slots_with_ram_copy": 0
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"http_status": 200, "model": "flash-next-strata-iq3-dual"}
|
||||
@@ -0,0 +1 @@
|
||||
{"http_status": 200, "model": "flash-next-strata-iq3-dual"}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 603 KiB |
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,308 @@
|
||||
[
|
||||
{
|
||||
"arm": "pipeline",
|
||||
"case": "solo-short-0",
|
||||
"requests": 1,
|
||||
"wall_seconds": 9.97112546300923,
|
||||
"aggregate_output_tok_s": 51.348265739851726,
|
||||
"rows": [
|
||||
{
|
||||
"wall_seconds": 9.971053838991793,
|
||||
"ttft_seconds": 0.974166186992079,
|
||||
"usage": {
|
||||
"prompt_tokens": 56,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 568,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 0,
|
||||
"prompt_n": 56,
|
||||
"prompt_ms": 949.7,
|
||||
"prompt_per_token_ms": 16.959,
|
||||
"prompt_per_second": 59.0,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 9017.4,
|
||||
"predicted_per_token_ms": 17.612,
|
||||
"predicted_per_second": 56.8,
|
||||
"draft_n": 297,
|
||||
"draft_n_accepted": 202
|
||||
},
|
||||
"finish_reason": "length"
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"peak_memory_gib": 35.47572708129883,
|
||||
"read_gib": 4.09283447265625,
|
||||
"read_mib_s": 420.319904262358,
|
||||
"refaults": 0,
|
||||
"major_faults": 29443,
|
||||
"limit_events": 0,
|
||||
"oom_kill_delta": 0,
|
||||
"cpu_cores": 5.3735157780102645,
|
||||
"pressure_full_percent": 0.0,
|
||||
"peak_processing_slots": 0,
|
||||
"gpu_samples": {
|
||||
"0": {
|
||||
"mean_utilization": 27.5,
|
||||
"peak_memory_mib": 11237.0
|
||||
},
|
||||
"1": {
|
||||
"mean_utilization": 25.0,
|
||||
"peak_memory_mib": 15514.0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"arm": "pipeline",
|
||||
"case": "parallel-short-0",
|
||||
"requests": 2,
|
||||
"wall_seconds": 11.345471530992654,
|
||||
"aggregate_output_tok_s": 90.25627513168743,
|
||||
"rows": [
|
||||
{
|
||||
"wall_seconds": 11.34373594399949,
|
||||
"ttft_seconds": 1.5094251900009112,
|
||||
"usage": {
|
||||
"prompt_tokens": 61,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 573,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 0,
|
||||
"prompt_n": 61,
|
||||
"prompt_ms": 605.6,
|
||||
"prompt_per_token_ms": 9.928,
|
||||
"prompt_per_second": 100.7,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 9773.2,
|
||||
"predicted_per_token_ms": 19.088,
|
||||
"predicted_per_second": 52.4,
|
||||
"draft_n": 0,
|
||||
"draft_n_accepted": 0
|
||||
},
|
||||
"finish_reason": "length"
|
||||
},
|
||||
{
|
||||
"wall_seconds": 11.322899782011518,
|
||||
"ttft_seconds": 0.7614952440053457,
|
||||
"usage": {
|
||||
"prompt_tokens": 56,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 568,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 0,
|
||||
"prompt_n": 56,
|
||||
"prompt_ms": 734.5,
|
||||
"prompt_per_token_ms": 13.116,
|
||||
"prompt_per_second": 76.2,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 10486.5,
|
||||
"predicted_per_token_ms": 20.481,
|
||||
"predicted_per_second": 48.8,
|
||||
"draft_n": 0,
|
||||
"draft_n_accepted": 0
|
||||
},
|
||||
"finish_reason": "length"
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"peak_memory_gib": 37.34151840209961,
|
||||
"read_gib": 1.6622123718261719,
|
||||
"read_mib_s": 150.0250971588377,
|
||||
"refaults": 0,
|
||||
"major_faults": 12568,
|
||||
"limit_events": 0,
|
||||
"oom_kill_delta": 0,
|
||||
"cpu_cores": 5.69478314087727,
|
||||
"pressure_full_percent": 0.0,
|
||||
"peak_processing_slots": 2,
|
||||
"gpu_samples": {
|
||||
"0": {
|
||||
"mean_utilization": 72.0,
|
||||
"peak_memory_mib": 11249.0
|
||||
},
|
||||
"1": {
|
||||
"mean_utilization": 81.66666666666667,
|
||||
"peak_memory_mib": 15522.0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"arm": "pipeline",
|
||||
"case": "parallel-cold-65536",
|
||||
"requests": 2,
|
||||
"wall_seconds": 161.98274067699094,
|
||||
"aggregate_output_tok_s": 3.160830578987282,
|
||||
"rows": [
|
||||
{
|
||||
"wall_seconds": 161.95836567800143,
|
||||
"ttft_seconds": 73.39949623300345,
|
||||
"usage": {
|
||||
"prompt_tokens": 65515,
|
||||
"completion_tokens": 256,
|
||||
"total_tokens": 65771,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 0,
|
||||
"prompt_n": 65515,
|
||||
"prompt_ms": 73262.3,
|
||||
"prompt_per_token_ms": 1.118,
|
||||
"prompt_per_second": 894.3,
|
||||
"predicted_n": 256,
|
||||
"predicted_ms": 87792.4,
|
||||
"predicted_per_token_ms": 342.939,
|
||||
"predicted_per_second": 2.9,
|
||||
"draft_n": 0,
|
||||
"draft_n_accepted": 0
|
||||
},
|
||||
"finish_reason": "length"
|
||||
},
|
||||
{
|
||||
"wall_seconds": 161.9824448920117,
|
||||
"ttft_seconds": 155.96184796201123,
|
||||
"usage": {
|
||||
"prompt_tokens": 65518,
|
||||
"completion_tokens": 256,
|
||||
"total_tokens": 65774,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 0,
|
||||
"prompt_n": 65518,
|
||||
"prompt_ms": 81691.6,
|
||||
"prompt_per_token_ms": 1.247,
|
||||
"prompt_per_second": 802.0,
|
||||
"predicted_n": 256,
|
||||
"predicted_ms": 5263.8,
|
||||
"predicted_per_token_ms": 20.562,
|
||||
"predicted_per_second": 48.6,
|
||||
"draft_n": 0,
|
||||
"draft_n_accepted": 0
|
||||
},
|
||||
"finish_reason": "length"
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"peak_memory_gib": 44.0,
|
||||
"read_gib": 138.8767547607422,
|
||||
"read_mib_s": 877.9317863165429,
|
||||
"refaults": 33470893,
|
||||
"major_faults": 714801,
|
||||
"limit_events": 82476,
|
||||
"oom_kill_delta": 0,
|
||||
"cpu_cores": 1.151974582107474,
|
||||
"pressure_full_percent": 29.6759665869934,
|
||||
"peak_processing_slots": 2,
|
||||
"gpu_samples": {
|
||||
"0": {
|
||||
"mean_utilization": 47.666666666666664,
|
||||
"peak_memory_mib": 11289.0
|
||||
},
|
||||
"1": {
|
||||
"mean_utilization": 27.545454545454547,
|
||||
"peak_memory_mib": 15576.0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"arm": "pipeline",
|
||||
"case": "parallel-cached-65536",
|
||||
"requests": 2,
|
||||
"wall_seconds": 98.34308873099508,
|
||||
"aggregate_output_tok_s": 10.412526322017614,
|
||||
"rows": [
|
||||
{
|
||||
"wall_seconds": 98.34237096400466,
|
||||
"ttft_seconds": 87.08424342499347,
|
||||
"usage": {
|
||||
"prompt_tokens": 65804,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 66316,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 0,
|
||||
"prompt_n": 65804,
|
||||
"prompt_ms": 84873.4,
|
||||
"prompt_per_token_ms": 1.29,
|
||||
"prompt_per_second": 775.3,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 10521.6,
|
||||
"predicted_per_token_ms": 20.55,
|
||||
"predicted_per_second": 48.7,
|
||||
"draft_n": 0,
|
||||
"draft_n_accepted": 0
|
||||
},
|
||||
"finish_reason": "length"
|
||||
},
|
||||
{
|
||||
"wall_seconds": 98.31455847500183,
|
||||
"ttft_seconds": 1.305569830990862,
|
||||
"usage": {
|
||||
"prompt_tokens": 65806,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 66318,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 65773
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 65773,
|
||||
"prompt_n": 33,
|
||||
"prompt_ms": 1170.5,
|
||||
"prompt_per_token_ms": 35.47,
|
||||
"prompt_per_second": 28.2,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 96209.2,
|
||||
"predicted_per_token_ms": 187.909,
|
||||
"predicted_per_second": 5.3,
|
||||
"draft_n": 0,
|
||||
"draft_n_accepted": 0
|
||||
},
|
||||
"finish_reason": "length"
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"peak_memory_gib": 44.0,
|
||||
"read_gib": 76.15969848632812,
|
||||
"read_mib_s": 793.0148651658166,
|
||||
"refaults": 19890974,
|
||||
"major_faults": 398638,
|
||||
"limit_events": 48092,
|
||||
"oom_kill_delta": 0,
|
||||
"cpu_cores": 1.5251707256244356,
|
||||
"pressure_full_percent": 28.689659196261974,
|
||||
"peak_processing_slots": 2,
|
||||
"gpu_samples": {
|
||||
"0": {
|
||||
"mean_utilization": 56.1,
|
||||
"peak_memory_mib": 11289.0
|
||||
},
|
||||
"1": {
|
||||
"mean_utilization": 33.95,
|
||||
"peak_memory_mib": 15578.0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,614 @@
|
||||
[
|
||||
{
|
||||
"arm": "serial_mtp",
|
||||
"case": "solo-short-0",
|
||||
"requests": 1,
|
||||
"wall_seconds": 10.484778166995966,
|
||||
"aggregate_output_tok_s": 48.83269744434613,
|
||||
"rows": [
|
||||
{
|
||||
"wall_seconds": 10.48470636199636,
|
||||
"ttft_seconds": 1.0656706720037619,
|
||||
"usage": {
|
||||
"prompt_tokens": 56,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 568,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 0,
|
||||
"prompt_n": 56,
|
||||
"prompt_ms": 1033.2,
|
||||
"prompt_per_token_ms": 18.45,
|
||||
"prompt_per_second": 54.2,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 9447.1,
|
||||
"predicted_per_token_ms": 18.451,
|
||||
"predicted_per_second": 54.2,
|
||||
"draft_n": 299,
|
||||
"draft_n_accepted": 196
|
||||
},
|
||||
"finish_reason": "length"
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"peak_memory_gib": 35.82564163208008,
|
||||
"read_gib": 3.9173851013183594,
|
||||
"read_mib_s": 382.5929628513373,
|
||||
"refaults": 0,
|
||||
"major_faults": 27966,
|
||||
"limit_events": 0,
|
||||
"oom_kill_delta": 0,
|
||||
"cpu_cores": 5.418331136354109,
|
||||
"pressure_full_percent": 0.0,
|
||||
"peak_processing_slots": 0,
|
||||
"gpu_samples": {
|
||||
"0": {
|
||||
"mean_utilization": 30.0,
|
||||
"peak_memory_mib": 11249.0
|
||||
},
|
||||
"1": {
|
||||
"mean_utilization": 33.0,
|
||||
"peak_memory_mib": 15536.0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"arm": "serial_mtp",
|
||||
"case": "parallel-short-0",
|
||||
"requests": 2,
|
||||
"wall_seconds": 15.41811057200539,
|
||||
"aggregate_output_tok_s": 66.4154012398428,
|
||||
"rows": [
|
||||
{
|
||||
"wall_seconds": 15.416260758007411,
|
||||
"ttft_seconds": 0.8091643649968319,
|
||||
"usage": {
|
||||
"prompt_tokens": 61,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 573,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 0,
|
||||
"prompt_n": 61,
|
||||
"prompt_ms": 780.4,
|
||||
"prompt_per_token_ms": 12.793,
|
||||
"prompt_per_second": 78.2,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 14527.9,
|
||||
"predicted_per_token_ms": 28.375,
|
||||
"predicted_per_second": 35.2,
|
||||
"draft_n": 0,
|
||||
"draft_n_accepted": 0
|
||||
},
|
||||
"finish_reason": "length"
|
||||
},
|
||||
{
|
||||
"wall_seconds": 15.222709826004575,
|
||||
"ttft_seconds": 1.5741246240067994,
|
||||
"usage": {
|
||||
"prompt_tokens": 56,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 568,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 0,
|
||||
"prompt_n": 56,
|
||||
"prompt_ms": 555.4,
|
||||
"prompt_per_token_ms": 9.918,
|
||||
"prompt_per_second": 100.8,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 13581.3,
|
||||
"predicted_per_token_ms": 26.526,
|
||||
"predicted_per_second": 37.7,
|
||||
"draft_n": 0,
|
||||
"draft_n_accepted": 0
|
||||
},
|
||||
"finish_reason": "length"
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"peak_memory_gib": 39.59473419189453,
|
||||
"read_gib": 3.5741119384765625,
|
||||
"read_mib_s": 237.3760784700332,
|
||||
"refaults": 0,
|
||||
"major_faults": 25866,
|
||||
"limit_events": 0,
|
||||
"oom_kill_delta": 0,
|
||||
"cpu_cores": 5.563587029642299,
|
||||
"pressure_full_percent": 0.0031586230863089298,
|
||||
"peak_processing_slots": 2,
|
||||
"gpu_samples": {
|
||||
"0": {
|
||||
"mean_utilization": 37.5,
|
||||
"peak_memory_mib": 11261.0
|
||||
},
|
||||
"1": {
|
||||
"mean_utilization": 54.75,
|
||||
"peak_memory_mib": 15548.0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"arm": "serial_mtp",
|
||||
"case": "parallel-cold-65536",
|
||||
"requests": 2,
|
||||
"wall_seconds": 201.08074581000255,
|
||||
"aggregate_output_tok_s": 2.5462408045958775,
|
||||
"rows": [
|
||||
{
|
||||
"wall_seconds": 108.65977381500124,
|
||||
"ttft_seconds": 76.7929394130042,
|
||||
"usage": {
|
||||
"prompt_tokens": 65515,
|
||||
"completion_tokens": 256,
|
||||
"total_tokens": 65771,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 0,
|
||||
"prompt_n": 65515,
|
||||
"prompt_ms": 76635.7,
|
||||
"prompt_per_token_ms": 1.17,
|
||||
"prompt_per_second": 854.9,
|
||||
"predicted_n": 256,
|
||||
"predicted_ms": 31003.0,
|
||||
"predicted_per_token_ms": 121.105,
|
||||
"predicted_per_second": 8.3,
|
||||
"draft_n": 0,
|
||||
"draft_n_accepted": 0
|
||||
},
|
||||
"finish_reason": "length"
|
||||
},
|
||||
{
|
||||
"wall_seconds": 201.08029669799726,
|
||||
"ttft_seconds": 194.95017397899937,
|
||||
"usage": {
|
||||
"prompt_tokens": 65518,
|
||||
"completion_tokens": 256,
|
||||
"total_tokens": 65774,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 0,
|
||||
"prompt_n": 65518,
|
||||
"prompt_ms": 117122.9,
|
||||
"prompt_per_token_ms": 1.788,
|
||||
"prompt_per_second": 559.4,
|
||||
"predicted_n": 256,
|
||||
"predicted_ms": 4368.9,
|
||||
"predicted_per_token_ms": 17.066,
|
||||
"predicted_per_second": 58.6,
|
||||
"draft_n": 153,
|
||||
"draft_n_accepted": 99
|
||||
},
|
||||
"finish_reason": "length"
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"peak_memory_gib": 44.0,
|
||||
"read_gib": 182.08439254760742,
|
||||
"read_mib_s": 927.261420369543,
|
||||
"refaults": 44818167,
|
||||
"major_faults": 864302,
|
||||
"limit_events": 103383,
|
||||
"oom_kill_delta": 0,
|
||||
"cpu_cores": 1.3101204639897226,
|
||||
"pressure_full_percent": 29.822166592052206,
|
||||
"peak_processing_slots": 2,
|
||||
"gpu_samples": {
|
||||
"0": {
|
||||
"mean_utilization": 37.775,
|
||||
"peak_memory_mib": 11307.0
|
||||
},
|
||||
"1": {
|
||||
"mean_utilization": 20.65,
|
||||
"peak_memory_mib": 15610.0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"arm": "serial_mtp",
|
||||
"case": "parallel-cached-65536",
|
||||
"requests": 2,
|
||||
"wall_seconds": 21.736466989998007,
|
||||
"aggregate_output_tok_s": 47.10977181669825,
|
||||
"rows": [
|
||||
{
|
||||
"wall_seconds": 21.735794496999006,
|
||||
"ttft_seconds": 1.3616767920029815,
|
||||
"usage": {
|
||||
"prompt_tokens": 65804,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 66316,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 65770
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 65770,
|
||||
"prompt_n": 34,
|
||||
"prompt_ms": 1207.9,
|
||||
"prompt_per_token_ms": 35.526,
|
||||
"prompt_per_second": 28.1,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 19563.9,
|
||||
"predicted_per_token_ms": 38.211,
|
||||
"predicted_per_second": 26.2,
|
||||
"draft_n": 0,
|
||||
"draft_n_accepted": 0
|
||||
},
|
||||
"finish_reason": "length"
|
||||
},
|
||||
{
|
||||
"wall_seconds": 21.477532226999756,
|
||||
"ttft_seconds": 4.488289519998943,
|
||||
"usage": {
|
||||
"prompt_tokens": 65807,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 66319,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 65521
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 65521,
|
||||
"prompt_n": 286,
|
||||
"prompt_ms": 2183.8,
|
||||
"prompt_per_token_ms": 7.636,
|
||||
"prompt_per_second": 131.0,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 16196.6,
|
||||
"predicted_per_token_ms": 31.634,
|
||||
"predicted_per_second": 31.6,
|
||||
"draft_n": 0,
|
||||
"draft_n_accepted": 0
|
||||
},
|
||||
"finish_reason": "length"
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"peak_memory_gib": 43.9999885559082,
|
||||
"read_gib": 3.7221641540527344,
|
||||
"read_mib_s": 175.350303961718,
|
||||
"refaults": 622550,
|
||||
"major_faults": 28098,
|
||||
"limit_events": 2999,
|
||||
"oom_kill_delta": 0,
|
||||
"cpu_cores": 4.63276759955226,
|
||||
"pressure_full_percent": 2.5999441411524984,
|
||||
"peak_processing_slots": 2,
|
||||
"gpu_samples": {
|
||||
"0": {
|
||||
"mean_utilization": 33.2,
|
||||
"peak_memory_mib": 11313.0
|
||||
},
|
||||
"1": {
|
||||
"mean_utilization": 44.0,
|
||||
"peak_memory_mib": 15614.0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"arm": "pipeline",
|
||||
"case": "solo-short-0",
|
||||
"requests": 1,
|
||||
"wall_seconds": 10.605822165991412,
|
||||
"aggregate_output_tok_s": 48.27537101666452,
|
||||
"rows": [
|
||||
{
|
||||
"wall_seconds": 10.605760890990496,
|
||||
"ttft_seconds": 1.0755668560013874,
|
||||
"usage": {
|
||||
"prompt_tokens": 56,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 568,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 0,
|
||||
"prompt_n": 56,
|
||||
"prompt_ms": 1050.4,
|
||||
"prompt_per_token_ms": 18.757,
|
||||
"prompt_per_second": 53.3,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 9551.5,
|
||||
"predicted_per_token_ms": 18.655,
|
||||
"predicted_per_second": 53.6,
|
||||
"draft_n": 287,
|
||||
"draft_n_accepted": 197
|
||||
},
|
||||
"finish_reason": "length"
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"peak_memory_gib": 39.34785079956055,
|
||||
"read_gib": 5.5923614501953125,
|
||||
"read_mib_s": 539.9466477349415,
|
||||
"refaults": 1,
|
||||
"major_faults": 39738,
|
||||
"limit_events": 0,
|
||||
"oom_kill_delta": 0,
|
||||
"cpu_cores": 5.213174342795667,
|
||||
"pressure_full_percent": 0.0,
|
||||
"peak_processing_slots": 0,
|
||||
"gpu_samples": {
|
||||
"0": {
|
||||
"mean_utilization": 25.333333333333332,
|
||||
"peak_memory_mib": 11231.0
|
||||
},
|
||||
"1": {
|
||||
"mean_utilization": 39.0,
|
||||
"peak_memory_mib": 15508.0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"arm": "pipeline",
|
||||
"case": "parallel-short-0",
|
||||
"requests": 2,
|
||||
"wall_seconds": 11.940449173998786,
|
||||
"aggregate_output_tok_s": 85.75891786632583,
|
||||
"rows": [
|
||||
{
|
||||
"wall_seconds": 11.939980654002284,
|
||||
"ttft_seconds": 1.552705018009874,
|
||||
"usage": {
|
||||
"prompt_tokens": 61,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 573,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 0,
|
||||
"prompt_n": 61,
|
||||
"prompt_ms": 613.1,
|
||||
"prompt_per_token_ms": 10.051,
|
||||
"prompt_per_second": 99.5,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 10325.0,
|
||||
"predicted_per_token_ms": 20.166,
|
||||
"predicted_per_second": 49.6,
|
||||
"draft_n": 0,
|
||||
"draft_n_accepted": 0
|
||||
},
|
||||
"finish_reason": "length"
|
||||
},
|
||||
{
|
||||
"wall_seconds": 11.919720029996824,
|
||||
"ttft_seconds": 0.7951862210029503,
|
||||
"usage": {
|
||||
"prompt_tokens": 56,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 568,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 0,
|
||||
"prompt_n": 56,
|
||||
"prompt_ms": 771.9,
|
||||
"prompt_per_token_ms": 13.784,
|
||||
"prompt_per_second": 72.5,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 11046.6,
|
||||
"predicted_per_token_ms": 21.575,
|
||||
"predicted_per_second": 46.3,
|
||||
"draft_n": 0,
|
||||
"draft_n_accepted": 0
|
||||
},
|
||||
"finish_reason": "length"
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"peak_memory_gib": 41.92718505859375,
|
||||
"read_gib": 2.372894287109375,
|
||||
"read_mib_s": 203.49684627368669,
|
||||
"refaults": 0,
|
||||
"major_faults": 17574,
|
||||
"limit_events": 0,
|
||||
"oom_kill_delta": 0,
|
||||
"cpu_cores": 5.632953921571363,
|
||||
"pressure_full_percent": 8.374894322883381e-06,
|
||||
"peak_processing_slots": 2,
|
||||
"gpu_samples": {
|
||||
"0": {
|
||||
"mean_utilization": 64.66666666666667,
|
||||
"peak_memory_mib": 11249.0
|
||||
},
|
||||
"1": {
|
||||
"mean_utilization": 85.66666666666667,
|
||||
"peak_memory_mib": 15524.0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"arm": "pipeline",
|
||||
"case": "parallel-cold-65536",
|
||||
"requests": 2,
|
||||
"wall_seconds": 176.4843446550076,
|
||||
"aggregate_output_tok_s": 2.9011071831944073,
|
||||
"rows": [
|
||||
{
|
||||
"wall_seconds": 176.45547918698867,
|
||||
"ttft_seconds": 84.03929605499434,
|
||||
"usage": {
|
||||
"prompt_tokens": 65515,
|
||||
"completion_tokens": 256,
|
||||
"total_tokens": 65771,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 0,
|
||||
"prompt_n": 65515,
|
||||
"prompt_ms": 83902.7,
|
||||
"prompt_per_token_ms": 1.281,
|
||||
"prompt_per_second": 780.8,
|
||||
"predicted_n": 256,
|
||||
"predicted_ms": 91883.6,
|
||||
"predicted_per_token_ms": 358.92,
|
||||
"predicted_per_second": 2.8,
|
||||
"draft_n": 0,
|
||||
"draft_n_accepted": 0
|
||||
},
|
||||
"finish_reason": "length"
|
||||
},
|
||||
{
|
||||
"wall_seconds": 176.48404745699372,
|
||||
"ttft_seconds": 170.46911489398917,
|
||||
"usage": {
|
||||
"prompt_tokens": 65518,
|
||||
"completion_tokens": 256,
|
||||
"total_tokens": 65774,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 0,
|
||||
"prompt_n": 65518,
|
||||
"prompt_ms": 85783.4,
|
||||
"prompt_per_token_ms": 1.309,
|
||||
"prompt_per_second": 763.8,
|
||||
"predicted_n": 256,
|
||||
"predicted_ms": 5541.3,
|
||||
"predicted_per_token_ms": 21.646,
|
||||
"predicted_per_second": 46.2,
|
||||
"draft_n": 0,
|
||||
"draft_n_accepted": 0
|
||||
},
|
||||
"finish_reason": "length"
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"peak_memory_gib": 44.0,
|
||||
"read_gib": 152.69827270507812,
|
||||
"read_mib_s": 885.9881116121612,
|
||||
"refaults": 36724619,
|
||||
"major_faults": 859323,
|
||||
"limit_events": 77486,
|
||||
"oom_kill_delta": 0,
|
||||
"cpu_cores": 1.1479205161003028,
|
||||
"pressure_full_percent": 31.510010765378166,
|
||||
"peak_processing_slots": 2,
|
||||
"gpu_samples": {
|
||||
"0": {
|
||||
"mean_utilization": 47.25714285714286,
|
||||
"peak_memory_mib": 11289.0
|
||||
},
|
||||
"1": {
|
||||
"mean_utilization": 27.857142857142858,
|
||||
"peak_memory_mib": 15580.0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"arm": "pipeline",
|
||||
"case": "parallel-cached-65536",
|
||||
"requests": 2,
|
||||
"wall_seconds": 101.61582549499872,
|
||||
"aggregate_output_tok_s": 10.077170509729301,
|
||||
"rows": [
|
||||
{
|
||||
"wall_seconds": 101.61507949499355,
|
||||
"ttft_seconds": 89.65827477199491,
|
||||
"usage": {
|
||||
"prompt_tokens": 65804,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 66316,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 0,
|
||||
"prompt_n": 65804,
|
||||
"prompt_ms": 88191.3,
|
||||
"prompt_per_token_ms": 1.34,
|
||||
"prompt_per_second": 746.2,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 11489.9,
|
||||
"predicted_per_token_ms": 22.441,
|
||||
"predicted_per_second": 44.6,
|
||||
"draft_n": 0,
|
||||
"draft_n_accepted": 0
|
||||
},
|
||||
"finish_reason": "length"
|
||||
},
|
||||
{
|
||||
"wall_seconds": 101.59031660099572,
|
||||
"ttft_seconds": 0.9523080609942554,
|
||||
"usage": {
|
||||
"prompt_tokens": 65807,
|
||||
"completion_tokens": 512,
|
||||
"total_tokens": 66319,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 65773
|
||||
}
|
||||
},
|
||||
"backend_timings": {
|
||||
"cache_n": 65773,
|
||||
"prompt_n": 34,
|
||||
"prompt_ms": 814.9,
|
||||
"prompt_per_token_ms": 23.968,
|
||||
"prompt_per_second": 41.7,
|
||||
"predicted_n": 512,
|
||||
"predicted_ms": 100228.4,
|
||||
"predicted_per_token_ms": 195.759,
|
||||
"predicted_per_second": 5.1,
|
||||
"draft_n": 0,
|
||||
"draft_n_accepted": 0
|
||||
},
|
||||
"finish_reason": "length"
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"peak_memory_gib": 44.0,
|
||||
"read_gib": 77.44012451171875,
|
||||
"read_mib_s": 780.3773389992574,
|
||||
"refaults": 20228923,
|
||||
"major_faults": 454369,
|
||||
"limit_events": 40714,
|
||||
"oom_kill_delta": 0,
|
||||
"cpu_cores": 1.5588123132237515,
|
||||
"pressure_full_percent": 29.765315444382875,
|
||||
"peak_processing_slots": 2,
|
||||
"gpu_samples": {
|
||||
"0": {
|
||||
"mean_utilization": 45.095238095238095,
|
||||
"peak_memory_mib": 11289.0
|
||||
},
|
||||
"1": {
|
||||
"mean_utilization": 40.23809523809524,
|
||||
"peak_memory_mib": 15582.0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,22 @@
|
||||
"""Summarize synthetic metrics only; never reads generated text or credentials."""
|
||||
import argparse,json,pathlib,re,statistics
|
||||
p=argparse.ArgumentParser();p.add_argument('directory');a=p.parse_args();root=pathlib.Path(a.directory)
|
||||
rows=json.loads((root/'results.json').read_text());summary={}
|
||||
for arm in ('serial_mtp','pipeline'):
|
||||
r=[x for x in rows if x['arm']==arm];short=[x for x in r if x['case'].startswith('solo-short')]
|
||||
parallel=[x for x in r if x['case'].startswith('parallel-short')]
|
||||
summary[arm]={'completed_cases':len(r),
|
||||
'solo_short_output_tok_s':[y['backend_timings'].get('predicted_per_second') for x in short for y in x['rows']],
|
||||
'parallel_short_per_request_output_tok_s':[y['backend_timings'].get('predicted_per_second') for x in parallel for y in x['rows']],
|
||||
'cases':{x['case']:{'wall_seconds':x['wall_seconds'],'output_tok_s':[y['backend_timings'].get('predicted_per_second') for y in x['rows']],
|
||||
'input_tok_s':[y['backend_timings'].get('prompt_per_second') for y in x['rows']],
|
||||
'cached_tokens':[y['backend_timings'].get('cache_n') for y in x['rows']],
|
||||
'new_input_tokens':[y['backend_timings'].get('prompt_n') for y in x['rows']],
|
||||
'resources':x['resources']} for x in r}}
|
||||
log=root/f'engine-{arm}.log'
|
||||
if log.exists():
|
||||
text=log.read_text(errors='replace')
|
||||
summary[arm]['resolved_resident_gib']=re.findall(r'(?:resident RAM mode:|resident) ([0-9.]+) GiB of experts in RAM',text)[:1]
|
||||
summary[arm]['batch_groups_reported']=sorted(set(re.findall(r'(?:batch_groups|batch groups)[= :]+([0-9]+)',text)))
|
||||
summary[arm]['batch_mtp_disabled_reported']=bool(re.search(r'(?i)(?:batch-mtp.{0,100}(?:off|disabled|ignored|left off)|(?:off|disabled|ignored).{0,100}batch-mtp)',text))
|
||||
print(json.dumps(summary,indent=2))
|
||||
Reference in new issue
Block a user