diff --git a/docs/CURRENT_SYSTEM.md b/docs/CURRENT_SYSTEM.md index f0e9436..3578f90 100644 --- a/docs/CURRENT_SYSTEM.md +++ b/docs/CURRENT_SYSTEM.md @@ -1,3 +1,13 @@ +## Strata dual-slot with 64 GB RAM · 20 October 2026 + +Repeat through the existing published dual profile on Strata0.1.45: fresh pair +of64K prompts96.57s vs historical212.05s, engine reads6.78GiB vs188.33GiB; +cached follow-up17.56s vs19.61s. CPU6 during measurement to match history, +then restored8. Deck58GiB, automatic resident experts24.46GiB vs old fixed16GiB. +Historical isolated vs current production API/cache differences limit causal +attribution. Single-slot profile restored HTTP200, no restart/config changes. +[All cases, caveats and reproduction](experiments/strata-dual-ram-2026-10-20/README.md). + ## Unraid Docker console · 20 October 2026 Root's runtime directory was removed by elogind after logout while Docker retained diff --git a/docs/experiments/strata-dual-ram-2026-10-20/README.md b/docs/experiments/strata-dual-ram-2026-10-20/README.md new file mode 100644 index 0000000..dd9471b --- /dev/null +++ b/docs/experiments/strata-dual-ram-2026-10-20/README.md @@ -0,0 +1,114 @@ +# Dual-slot after the 64-GB RAM upgrade · 20 October 2026 + +User requested a repeat using the saved results as baseline. No browser login +was available (user on phone), so the test used the **normal authenticated API** +and the existing published `flash-next-strata-iq3-dual` profile. It did not bypass +administrator authentication or unload/kill a process directly. The initially +considered isolated fixed-budget A/B was not run. + +## Conditions + +- Same Strata 0.1.45, commit 477ac13cbe8e582c20484871ce459d20d82df09d, + existing IQ3_XXS weights, RTX3060/RTX5080, split16, 1024-MiB GPU reserves. +- Two slots, 262144 context each; int8 KV, resident KV32768; serial batch-MTP, + `--batch-groups 1`. No new opt-in flags, model/profile edits or GPU tuning. +- Engine argument/environment lists equal the old saved base template. +- New host MemTotal 65,730,108 KiB, Deck cap58GiB, no extra container swap. +- Temporarily **6 CPU cores**, matching the historical comparison. Restored8 + afterwards; persistent installation manifest was never changed by this test. +- Actual new automatic resident expert allocation **24.46GiB**, recorded after + activation and after measurement. Historical 17-October serial reference was + an isolated44GiB test container with a **fixed16GiB** expert budget. +- Old fixture-65536-0/1.json files copied unchanged from the saved October17 run; + no token recalibration. Same synthetic short prompts, seed42, temperature0, + top_p1, top_k0, reasoningnone and output limits. No private chats collected. +- One activation request (one output token) precedes timing. Each short repetition + measures one request then a concurrent pair. Fresh64K pair outputs256tokens + each; cached follow-ups output512 each. All requested counts were reached. + +## Results against the October17 serial reference + +| Case | Previous wall seconds | New wall seconds | Previous reads GiB | New reads GiB | +| --- | ---: | ---: | ---: | ---: | +| Short solo0, 512 output tokens | 11.15 | 9.19 | 4.06 | 0.052 | +| Short pair0, 2×512 | 16.85 | 14.46 | 3.16 | 0.072 | +| Short solo1, 512 | 9.07 | 8.02 | 1.53 | 0.006 | +| Short pair1, 2×512 | 15.19 | 14.25 | 2.04 | 0.034 | +| Fresh64K pair, 2×256 | **212.05** | **96.57** | **188.33** | **6.78** | +| Cached64K pair, 2×512 | 19.61 | 17.56 | 3.47 | 0.306 | + +Fresh-prompt wall time is54.5% lower, equivalent to2.20× end-to-end throughput +for this equal-output workload. Physical engine read bytes fall96.4%. +Full memory-pressure stall ratio falls from29.12% to0.224% in that case. +Short concurrent pairs improve6.6–16.5% in throughput; this is not a2× decode +speedup for ordinary short chats. New short dual-request backend decode rates +are38.1–41.7tok/s per request. Backend decoding and overall wall time differ. + +Actual fresh prompt counts:65,515/65,518, each zero cached tokens, output256 each. +Cached follow-up counts65,804/65,807, cached65,770/65,520, output512 each. +New first-token times for fresh pair35.75/91.68s; cached pair0.94/3.00s. +The serial-MTP path therefore still has uneven latency between simultaneous +long requests. Maximum admitted API requests matched each case's1or2 requests. + +New short cases peak around52.7GiB cgroup memory. Fresh64K peaks at58GiB and +records704 memory-max events; cached case peaks57.77GiB. No OOM kills occurred. +The larger budget significantly reduces stalls/read traffic but is still reached +in this workload; do not infer that two full262K contexts are now fast or fully +RAM-resident. Neither128K nor full262K work was repeated. + +## What this establishes and what it does not + +The current dual-slot configuration is materially more usable for long prompts +than the saved44GiB/16GiB-expert reference. More RAM permits both more resident +experts and a larger file cache. It is **not a randomized, isolated RAM-only +causal A/B**: the old run was isolated and fixed-budget, the new run is through +the production API with warm CPU TTS/STT services and automatic expert allocation. +Physical disk cache state and test order were not controlled by cache flushing. +The host was already using the weights before activation. “Fresh” describes the +prompt/KV cache, not a physically cold SSD. No output-identity/quality benchmark +was performed. Compare distributions only after more repetitions if needed. + +## Restoration and artifacts + +Normal API restoration returned HTTP200 for previous single profile +`flash-next-strata-iq3`. Final status: endpoint running, model loaded, zero active +requests; Deck healthy, CPU8, memory58GiB. Container StartedAt unchanged. +No host, Deck, Hermes or OpenCode restart. No profile configuration was saved. +Restore and CPU rollback evidence are in restore.json/container-restored.json. + +An initial setup attempt could not read the newly created root-owned0700 test +directory inside the UID65534 application container. No model test began; +the launcher restored CPU8. Ownership was corrected **only for this experiment +directory**, then the complete six-case run succeeded with exit0. No broad +application permissions were changed. + +Metrics omit generated text. Settings files omit API keys and retain only the +latest allocation relevant to this run; historical appended log allocations +are not a new measured distribution. Archived benchmark source adds optional +TEST_STAGE/TEST_CGROUP_DIR overrides for reproduction; default measurement logic +and fixture/generation parameters are unchanged. + +## Reproduction and native/restore notes + +Current optional Docker deployment: stage under the persistent state root, unpack +the included synthetic fixture-65536-0/1.json.gz (hashes in fixtures.json) and save only the previous API model identifier to +previous-model.json. The saved host launcher supplies the service token internally +on stdin, temporarily applies CPU6, runs benchmark.py in the existing container, +and restores CPU8 in finally. Do not put tokens in files, environment dumps or Git. +Start only at endpoint idle and verify the previously active profile afterwards. +The launcher expects endpoint-benchmark.py as the staged filename. Use a fresh +experiment directory for a later run and update stage paths in the launcher; +do not overwrite existing results. These fixtures are synthetic inputs, not user +chats, and are included compressed to make fresh-checkout reproduction possible. + +The benchmark itself uses Python standard library, the ordinary local API, +NVIDIA's existing nvidia-smi and Linux proc/cgroup counters. A native Debian +deployment runs it as the Deck service user with TEST_STAGE under its state root +and TEST_CGROUP_DIR pointing at the actual service cgroup. Match CPUQuota600%, +MemoryMax58GiB and no extra swap for this test, then restore the original service +resource configuration. No Docker dependency is added to the native runtime. +Existing source/weight restore recipes remain applicable; this test installs no +software, weights, profiles or permanent services. A complete fresh-host restore +has not been newly qualified by this performance test. + +Baseline: [Strata0.1.45 recheck](../strata-dual-0.1.45-2026-10-17/README.md). diff --git a/docs/experiments/strata-dual-ram-2026-10-20/benchmark.py b/docs/experiments/strata-dual-ram-2026-10-20/benchmark.py new file mode 100644 index 0000000..ad01576 --- /dev/null +++ b/docs/experiments/strata-dual-ram-2026-10-20/benchmark.py @@ -0,0 +1,166 @@ +"""Saved synthetic fixtures measured through the normal Athena API.""" +import concurrent.futures, copy, json, os, pathlib, random, re, signal +import socket, subprocess, threading, time, urllib.request +P = pathlib.Path +ROOT = P(os.environ.get('TEST_STAGE','/var/lib/deck/strata-dual-ram-20261020')) +SOURCE = P('/var/lib/deck/strata-runtime/source') +MODEL = 'flash-next-strata-iq3-dual' +import sys +KEY = json.load(sys.stdin)['key'] +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(os.environ.get('TEST_CGROUP_DIR','/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('http://127.0.0.1:8108','/api/v1/status',timeout=3) as response: + r['processing_slots']=json.load(response)['endpoint']['active_requests'] + 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_admitted_requests=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 settings(): + c=json.loads((ROOT.parent/'strata-worker/worker.json').read_text()) + text=(ROOT.parent/'strata-worker/engine.log').read_text(errors='replace') + allocated=re.findall(r'resident RAM mode: ([0-9.]+) GiB of experts in RAM',text) + return dict(model=c['model_name'],parallel=c.get('parallel'),args=c['args'],environment=c.get('env',{}),resident_expert_gib=[float(x) for x in allocated[-1:]],memory_max=(P(os.environ.get('TEST_CGROUP_DIR','/sys/fs/cgroup'))/'memory.max').read_text().strip(),cpu_max=(P(os.environ.get('TEST_CGROUP_DIR','/sys/fs/cgroup'))/'cpu.max').read_text().strip()) + +def run(): + base='http://127.0.0.1:8120' + previous=json.loads((ROOT/'previous-model.json').read_text())['model'] + with http('http://127.0.0.1:8108','/api/v1/status') as r:s=json.load(r) + if s['endpoint']['active_requests']:raise RuntimeError('Production requests active; no test started') + try: + save('loading') + with http(base,'/v1/chat/completions',dict(model=MODEL,messages=[dict(role='user',content='OK')],max_tokens=1,reasoning_effort='none')) as r:json.load(r) + cfg=settings() + if cfg['model']!=MODEL or cfg['parallel']!=2:raise RuntimeError('Dual profile not active') + (ROOT/'settings.json').write_text(json.dumps(cfg,indent=2)) + for rep in range(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,'production_dual','solo-short-'+str(rep),[msgs[0]]) + msgs[0][0]['content']+=' Parallele Messung.' + measure(base,'production_dual','parallel-short-'+str(rep),msgs) + msgs=[json.loads((ROOT/f'fixture-65536-{i}.json').read_text()) for i in range(2)] + first=measure(base,'production_dual','parallel-cold-65536',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,'production_dual','parallel-cached-65536',follow,512) + (ROOT/'settings-final.json').write_text(json.dumps(settings(),indent=2)) + save('complete') + finally: + time.sleep(1) + with http('http://127.0.0.1:8108','/api/v1/status') as r:s=json.load(r) + if s['endpoint']['active_requests']: + (ROOT/'restore.json').write_text(json.dumps(dict(restored=False,reason='new_activity'))) + else: + with http(base,'/v1/chat/completions',dict(model=previous,messages=[dict(role='user',content='OK')],max_tokens=1,reasoning_effort='none')) as r: + value=json.load(r);code=r.status + (ROOT/'restore.json').write_text(json.dumps(dict(http_status=code,model=previous,restored=code==200))) +if __name__=='__main__': + try:run() + except BaseException as e:save('failed',error_type=type(e).__name__);raise diff --git a/docs/experiments/strata-dual-ram-2026-10-20/container-restored.json b/docs/experiments/strata-dual-ram-2026-10-20/container-restored.json new file mode 100644 index 0000000..751c022 --- /dev/null +++ b/docs/experiments/strata-dual-ram-2026-10-20/container-restored.json @@ -0,0 +1 @@ +{"cpu": 8.0, "memory_gib": 58.0, "restarted": false} \ No newline at end of file diff --git a/docs/experiments/strata-dual-ram-2026-10-20/fixture-65536-0.json.gz b/docs/experiments/strata-dual-ram-2026-10-20/fixture-65536-0.json.gz new file mode 100644 index 0000000..648a2f4 Binary files /dev/null and b/docs/experiments/strata-dual-ram-2026-10-20/fixture-65536-0.json.gz differ diff --git a/docs/experiments/strata-dual-ram-2026-10-20/fixture-65536-1.json.gz b/docs/experiments/strata-dual-ram-2026-10-20/fixture-65536-1.json.gz new file mode 100644 index 0000000..09c8ad5 Binary files /dev/null and b/docs/experiments/strata-dual-ram-2026-10-20/fixture-65536-1.json.gz differ diff --git a/docs/experiments/strata-dual-ram-2026-10-20/fixtures.json b/docs/experiments/strata-dual-ram-2026-10-20/fixtures.json new file mode 100644 index 0000000..8f3aff0 --- /dev/null +++ b/docs/experiments/strata-dual-ram-2026-10-20/fixtures.json @@ -0,0 +1,12 @@ +{ + "fixture-65536-0.json": { + "sha256": "1fad19b62481ed46c30fcd68fc8e8d3ac8a91c5aa982d9a9267b1bff5f55b09c", + "bytes": 132984, + "gzip_bytes": 22189 + }, + "fixture-65536-1.json": { + "sha256": "5220d85c7e12926323e603bf08269155e808d61ca59c239652c282a93bcc07fa", + "bytes": 132984, + "gzip_bytes": 22235 + } +} \ No newline at end of file diff --git a/docs/experiments/strata-dual-ram-2026-10-20/host-memory.json b/docs/experiments/strata-dual-ram-2026-10-20/host-memory.json new file mode 100644 index 0000000..5a74f75 --- /dev/null +++ b/docs/experiments/strata-dual-ram-2026-10-20/host-memory.json @@ -0,0 +1 @@ +{"MemTotal": "65730108 kB", "MemAvailable": "18187604 kB", "SwapTotal": "50209788 kB"} \ No newline at end of file diff --git a/docs/experiments/strata-dual-ram-2026-10-20/launch.py b/docs/experiments/strata-dual-ram-2026-10-20/launch.py new file mode 100644 index 0000000..a123919 --- /dev/null +++ b/docs/experiments/strata-dual-ram-2026-10-20/launch.py @@ -0,0 +1,21 @@ +"""Host runner: temporary historical CPU quota, normal API benchmark, rollback.""" +import json,subprocess,sys,urllib.request +from pathlib import Path +token=json.load(sys.stdin)['key'] +stage=Path('/opt/athena-deck-dev/runtime/state/strata-dual-ram-20261020') +req=urllib.request.Request('http://127.0.0.1:8108/api/v1/status',headers={'Authorization':'Bearer '+token}) +status=json.load(urllib.request.urlopen(req,timeout=10)) +if status['endpoint']['active_requests']:raise RuntimeError('Production requests active') +before=json.loads(subprocess.check_output(['docker','inspect','athena-deck-dev']))[0] +cpus=before['HostConfig']['NanoCpus']/1e9 +assert cpus==8 +try: + subprocess.run(['docker','update','--cpus','6','athena-deck-dev'],check=True,capture_output=True) + with (stage/'test.log').open('w') as out: + result=subprocess.run(['docker','exec','-i','athena-deck-dev','python3','-u','/var/lib/deck/strata-dual-ram-20261020/endpoint-benchmark.py'],input=json.dumps({'key':token}),text=True,stdout=out,stderr=subprocess.STDOUT) +finally: + subprocess.run(['docker','update','--cpus',str(cpus),'athena-deck-dev'],check=True,capture_output=True) + after=json.loads(subprocess.check_output(['docker','inspect','athena-deck-dev']))[0] + (stage/'container-restored.json').write_text(json.dumps(dict(cpu=after['HostConfig']['NanoCpus']/1e9,memory_gib=after['HostConfig']['Memory']/2**30,restarted=after['State']['StartedAt']!=before['State']['StartedAt']))) +print(json.dumps(dict(exit_code=result.returncode))) +raise SystemExit(result.returncode) diff --git a/docs/experiments/strata-dual-ram-2026-10-20/restore.json b/docs/experiments/strata-dual-ram-2026-10-20/restore.json new file mode 100644 index 0000000..ffe86e3 --- /dev/null +++ b/docs/experiments/strata-dual-ram-2026-10-20/restore.json @@ -0,0 +1 @@ +{"http_status": 200, "model": "flash-next-strata-iq3", "restored": true} \ No newline at end of file diff --git a/docs/experiments/strata-dual-ram-2026-10-20/results.json b/docs/experiments/strata-dual-ram-2026-10-20/results.json new file mode 100644 index 0000000..8250df7 --- /dev/null +++ b/docs/experiments/strata-dual-ram-2026-10-20/results.json @@ -0,0 +1,448 @@ +[ + { + "arm": "production_dual", + "case": "solo-short-0", + "requests": 1, + "wall_seconds": 9.190052823999395, + "aggregate_output_tok_s": 55.71241099539013, + "rows": [ + { + "wall_seconds": 9.18994887900044, + "ttft_seconds": 0.8605409030005831, + "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.9, + "prompt_per_token_ms": 13.123, + "prompt_per_second": 76.2, + "predicted_n": 512, + "predicted_ms": 8352.8, + "predicted_per_token_ms": 16.314, + "predicted_per_second": 61.3, + "draft_n": 311, + "draft_n_accepted": 199 + }, + "finish_reason": "length" + } + ], + "resources": { + "peak_memory_gib": 52.73495101928711, + "read_gib": 0.052394866943359375, + "read_mib_s": 5.838088722394436, + "refaults": 0, + "major_faults": 0, + "limit_events": 0, + "oom_kill_delta": 0, + "cpu_cores": 5.681142535291638, + "pressure_full_percent": 0.0, + "peak_admitted_requests": 1, + "gpu_samples": { + "0": { + "mean_utilization": 31.0, + "peak_memory_mib": 11267.0 + }, + "1": { + "mean_utilization": 50.5, + "peak_memory_mib": 15376.0 + } + } + } + }, + { + "arm": "production_dual", + "case": "parallel-short-0", + "requests": 2, + "wall_seconds": 14.461624022000251, + "aggregate_output_tok_s": 70.80809170824827, + "rows": [ + { + "wall_seconds": 14.459707007000361, + "ttft_seconds": 0.9240774339996278, + "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": 686.7, + "prompt_per_token_ms": 11.257, + "prompt_per_second": 88.8, + "predicted_n": 512, + "predicted_ms": 13452.3, + "predicted_per_token_ms": 26.274, + "predicted_per_second": 38.1, + "draft_n": 0, + "draft_n_accepted": 0 + }, + "finish_reason": "length" + }, + { + "wall_seconds": 14.104760182000064, + "ttft_seconds": 1.634375652000017, + "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": 567.8, + "prompt_per_token_ms": 10.139, + "prompt_per_second": 98.6, + "predicted_n": 512, + "predicted_ms": 12410.0, + "predicted_per_token_ms": 24.238, + "predicted_per_second": 41.3, + "draft_n": 0, + "draft_n_accepted": 0 + }, + "finish_reason": "length" + } + ], + "resources": { + "peak_memory_gib": 52.679080963134766, + "read_gib": 0.07215118408203125, + "read_mib_s": 5.108887659339172, + "refaults": 0, + "major_faults": 0, + "limit_events": 0, + "oom_kill_delta": 0, + "cpu_cores": 5.603796632848086, + "pressure_full_percent": 0.0, + "peak_admitted_requests": 2, + "gpu_samples": { + "0": { + "mean_utilization": 37.666666666666664, + "peak_memory_mib": 11273.0 + }, + "1": { + "mean_utilization": 52.666666666666664, + "peak_memory_mib": 15382.0 + } + } + } + }, + { + "arm": "production_dual", + "case": "solo-short-1", + "requests": 1, + "wall_seconds": 8.016504530999555, + "aggregate_output_tok_s": 63.868235590725746, + "rows": [ + { + "wall_seconds": 8.016413169999396, + "ttft_seconds": 0.7996140999994168, + "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": 673.4, + "prompt_per_token_ms": 12.025, + "prompt_per_second": 83.2, + "predicted_n": 512, + "predicted_ms": 7239.1, + "predicted_per_token_ms": 14.139, + "predicted_per_second": 70.7, + "draft_n": 304, + "draft_n_accepted": 202 + }, + "finish_reason": "length" + } + ], + "resources": { + "peak_memory_gib": 52.699302673339844, + "read_gib": 0.00565338134765625, + "read_mib_s": 0.7221429835926481, + "refaults": 0, + "major_faults": 0, + "limit_events": 0, + "oom_kill_delta": 0, + "cpu_cores": 5.637120246767376, + "pressure_full_percent": 0.0, + "peak_admitted_requests": 1, + "gpu_samples": { + "0": { + "mean_utilization": 41.5, + "peak_memory_mib": 11279.0 + }, + "1": { + "mean_utilization": 52.5, + "peak_memory_mib": 15388.0 + } + } + } + }, + { + "arm": "production_dual", + "case": "parallel-short-1", + "requests": 2, + "wall_seconds": 14.252126362000126, + "aggregate_output_tok_s": 71.8489279417456, + "rows": [ + { + "wall_seconds": 14.251517470999715, + "ttft_seconds": 0.8682839660004902, + "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": 686.1, + "prompt_per_token_ms": 11.248, + "prompt_per_second": 88.9, + "predicted_n": 512, + "predicted_ms": 13303.4, + "predicted_per_token_ms": 25.983, + "predicted_per_second": 38.5, + "draft_n": 0, + "draft_n_accepted": 0 + }, + "finish_reason": "length" + }, + { + "wall_seconds": 13.877877421999983, + "ttft_seconds": 1.5528774750000593, + "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": 544.9, + "prompt_per_token_ms": 9.73, + "prompt_per_second": 102.8, + "predicted_n": 512, + "predicted_ms": 12265.2, + "predicted_per_token_ms": 23.955, + "predicted_per_second": 41.7, + "draft_n": 0, + "draft_n_accepted": 0 + }, + "finish_reason": "length" + } + ], + "resources": { + "peak_memory_gib": 52.69468688964844, + "read_gib": 0.0344390869140625, + "read_mib_s": 2.4744114740679906, + "refaults": 0, + "major_faults": 0, + "limit_events": 0, + "oom_kill_delta": 0, + "cpu_cores": 5.580219960163113, + "pressure_full_percent": 0.0, + "peak_admitted_requests": 2, + "gpu_samples": { + "0": { + "mean_utilization": 33.0, + "peak_memory_mib": 11279.0 + }, + "1": { + "mean_utilization": 49.333333333333336, + "peak_memory_mib": 15388.0 + } + } + } + }, + { + "arm": "production_dual", + "case": "parallel-cold-65536", + "requests": 2, + "wall_seconds": 96.57123327499903, + "aggregate_output_tok_s": 5.30178586973218, + "rows": [ + { + "wall_seconds": 60.39867494699865, + "ttft_seconds": 35.74751034399924, + "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": 35530.5, + "prompt_per_token_ms": 0.542, + "prompt_per_second": 1843.9, + "predicted_n": 256, + "predicted_ms": 24220.9, + "predicted_per_token_ms": 94.613, + "predicted_per_second": 10.6, + "draft_n": 0, + "draft_n_accepted": 0 + }, + "finish_reason": "length" + }, + { + "wall_seconds": 96.57081957800074, + "ttft_seconds": 91.68009312499998, + "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": 55374.1, + "prompt_per_token_ms": 0.845, + "prompt_per_second": 1183.2, + "predicted_n": 256, + "predicted_ms": 4092.2, + "predicted_per_token_ms": 15.985, + "predicted_per_second": 62.6, + "draft_n": 165, + "draft_n_accepted": 98 + }, + "finish_reason": "length" + } + ], + "resources": { + "peak_memory_gib": 57.99993896484375, + "read_gib": 6.782630920410156, + "read_mib_s": 71.92011354687827, + "refaults": 0, + "major_faults": 29570, + "limit_events": 704, + "oom_kill_delta": 0, + "cpu_cores": 1.5998553063937926, + "pressure_full_percent": 0.22415370774398158, + "peak_admitted_requests": 2, + "gpu_samples": { + "0": { + "mean_utilization": 58.0, + "peak_memory_mib": 11325.0 + }, + "1": { + "mean_utilization": 48.64705882352941, + "peak_memory_mib": 15448.0 + } + } + } + }, + { + "arm": "production_dual", + "case": "parallel-cached-65536", + "requests": 2, + "wall_seconds": 17.563750023000466, + "aggregate_output_tok_s": 58.30190014427609, + "rows": [ + { + "wall_seconds": 17.351707257999806, + "ttft_seconds": 0.9431644350006536, + "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": 751.2, + "prompt_per_token_ms": 22.094, + "prompt_per_second": 45.3, + "predicted_n": 512, + "predicted_ms": 16014.6, + "predicted_per_token_ms": 31.279, + "predicted_per_second": 32.0, + "draft_n": 0, + "draft_n_accepted": 0 + }, + "finish_reason": "length" + }, + { + "wall_seconds": 17.56339049900089, + "ttft_seconds": 2.9978729790000216, + "usage": { + "prompt_tokens": 65807, + "completion_tokens": 512, + "total_tokens": 66319, + "prompt_tokens_details": { + "cached_tokens": 65520 + } + }, + "backend_timings": { + "cache_n": 65520, + "prompt_n": 287, + "prompt_ms": 1530.9, + "prompt_per_token_ms": 5.334, + "prompt_per_second": 187.5, + "predicted_n": 512, + "predicted_ms": 14208.4, + "predicted_per_token_ms": 27.751, + "predicted_per_second": 36.0, + "draft_n": 0, + "draft_n_accepted": 0 + }, + "finish_reason": "length" + } + ], + "resources": { + "peak_memory_gib": 57.76874923706055, + "read_gib": 0.3062019348144531, + "read_mib_s": 17.852154627536382, + "refaults": 0, + "major_faults": 914, + "limit_events": 0, + "oom_kill_delta": 0, + "cpu_cores": 5.018290506559077, + "pressure_full_percent": 0.0, + "peak_admitted_requests": 2, + "gpu_samples": { + "0": { + "mean_utilization": 34.666666666666664, + "peak_memory_mib": 11325.0 + }, + "1": { + "mean_utilization": 55.666666666666664, + "peak_memory_mib": 15448.0 + } + } + } + } +] \ No newline at end of file diff --git a/docs/experiments/strata-dual-ram-2026-10-20/settings-final.json b/docs/experiments/strata-dual-ram-2026-10-20/settings-final.json new file mode 100644 index 0000000..7db3896 --- /dev/null +++ b/docs/experiments/strata-dual-ram-2026-10-20/settings-final.json @@ -0,0 +1,57 @@ +{ + "model": "flash-next-strata-iq3-dual", + "parallel": 2, + "args": [ + "--pack", + "/data/athena-deck-strata/packs/iq3_xxs", + "--native", + "/data/athena-deck-strata/models/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf", + "--ple-gguf", + "/data/athena-deck-strata/models/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf", + "--expert-profile", + "/var/lib/deck/strata-runtime/source/data/expert-profile.bin", + "--expert-cache", + "auto", + "--prefill", + "auto", + "--spec", + "4", + "--mtp", + "/data/athena-deck-strata/mtp/rt", + "--max-context", + "262144", + "--kv", + "int8", + "--kv-resident", + "32768", + "--vram-reserve-mib", + "1024", + "--vram-reserve-later-mib", + "1024", + "--batch-mtp", + "--batch-groups", + "1", + "--pcie-frac", + "0.35", + "--spec-min-p", + "0.70", + "--adapt-every", + "1", + "--adapt-swaps", + "80", + "--adapt-decay", + "0.97", + "--resident-experts", + "--vision" + ], + "environment": { + "STRATA_ROUTE_TAIL_SKIP": "0", + "STRATA_RESIDENT_HEADROOM_GIB": "6", + "STRATA_STAGE_TRIM": "1" + }, + "resident_expert_gib": [ + 24.46 + ], + "memory_max": "62277025792", + "cpu_max": "600000 100000" +} \ No newline at end of file diff --git a/docs/experiments/strata-dual-ram-2026-10-20/settings.json b/docs/experiments/strata-dual-ram-2026-10-20/settings.json new file mode 100644 index 0000000..7db3896 --- /dev/null +++ b/docs/experiments/strata-dual-ram-2026-10-20/settings.json @@ -0,0 +1,57 @@ +{ + "model": "flash-next-strata-iq3-dual", + "parallel": 2, + "args": [ + "--pack", + "/data/athena-deck-strata/packs/iq3_xxs", + "--native", + "/data/athena-deck-strata/models/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf", + "--ple-gguf", + "/data/athena-deck-strata/models/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf", + "--expert-profile", + "/var/lib/deck/strata-runtime/source/data/expert-profile.bin", + "--expert-cache", + "auto", + "--prefill", + "auto", + "--spec", + "4", + "--mtp", + "/data/athena-deck-strata/mtp/rt", + "--max-context", + "262144", + "--kv", + "int8", + "--kv-resident", + "32768", + "--vram-reserve-mib", + "1024", + "--vram-reserve-later-mib", + "1024", + "--batch-mtp", + "--batch-groups", + "1", + "--pcie-frac", + "0.35", + "--spec-min-p", + "0.70", + "--adapt-every", + "1", + "--adapt-swaps", + "80", + "--adapt-decay", + "0.97", + "--resident-experts", + "--vision" + ], + "environment": { + "STRATA_ROUTE_TAIL_SKIP": "0", + "STRATA_RESIDENT_HEADROOM_GIB": "6", + "STRATA_STAGE_TRIM": "1" + }, + "resident_expert_gib": [ + 24.46 + ], + "memory_max": "62277025792", + "cpu_max": "600000 100000" +} \ No newline at end of file