Repository navigation
feat(why_sie): compare serving jobs with and without SIE - #39
Merged
Merged
Conversation
Collaborator
Author
Self-ReviewSix passes over the full diff (about 5,500 lines in 58 files, not counting lockfiles and data): code, silent failures, tests, comments and docs, types, and security. Lint, strict mypy, every selfcheck and tools/check_tree.py pass. Every number in the six recipe READMEs matches what its recipe.py computes. Important (12)
Suggestions (14)
Strengths
Generated using wayfare. |
… failed step - Workers, round-robin and engine servers, the gateway and NATS bind to 127.0.0.1; the sidecar probe port is hard-coded to all interfaces in SIE v0.11.1 and the README says so. - A failed setup or step is recorded and reported as not measured, summary.json is saved after every step, and the run exits 1 when a verdict fails. - Kills are confirmed before they are timed, restarts wait for readiness, the engine kill reports how many processes it stopped and only targets its own server, and every engine recovery is judged against thresholds in rules.yaml.
…king recipe - A setup that fails more than max_failed_share of its turns fails its verdict. - Setups that can't run are recorded as not measured, summary.json is saved after each setup, and zero baseline capacity stops with a clear message. - The README names the A10s the run used and prices them at the L4 rate.
…equests or unparsed logs - Fit and pinned need the failed share under a bar, and both fail when no load events for the pinned model were parsed. - Log times across UTC midnight are handled, and a setup that errors is reported as not measured. - Labels per model live in rules.yaml.
…verdict - Errors and missing usage are counted in the same window as successes and fail a phase above max_error_share. - Warm-up retries only on loading and connection errors. - The published-image limit (superlinked/sie#969) is stated in Run it.
- Expected outcomes live under expect in rules.yaml and verdicts() computes them. - Cells with errors or missing usage are counted and left out of the headline; no tokens prints n/a. - The server is pinned to one GPU.
- Every 503 is checked for a Retry-After, and Retry-After 0 is no longer treated as missing. - The burst verdict is kept with --skip-cold, calls per second counts successful calls, and the client timeout lives in rules.yaml.
… against - The why_sie table quotes each recipe's run and labels the earlier Kubernetes numbers. - The AGENTS.md exception covers a stated baseline as well as a by-hand setup, and GPU recipes that start their own servers. - MODELS.md points the Qwen3-Embedding-4B image to superlinked/sie#969.
Collaborator
Author
Self-Review: ImprovementsImportant (12 / 12 fixed):
Suggestions (14 / 14 fixed):
Checks after the fixes: ruff, ruff format, strict mypy, Commits: 559cf52, a80f1d7, ddf9d18, 5af1c64, e69c164, 70f0e9b, aa15bde Generated using wayfare. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Adds a
why_sie/folder. Each recipe in it does one serving job the way a team would build it by hand, does the same job on SIE with the same models and load, and reports the numbers, including where SIE doesn't come out ahead.why_sie/README.md: what the folder is for, and a table of six serving jobs with what we found for each. All six have a recipe in this PR.why_sie/measure_cold_starts_and_bursts: one rerank call to a model that's usually at zero on SIE Serverless, retried on each503for as long as itsRetry-Aftersays; the same call warm; then 2,000 bge-m3 calls from 32 callers. Live run on 16 Nov 2026: answered cold after 81.5 s (one503at 20 s,Retry-After: 60), warm in 0.32 s, and the burst had 0 errors with a p95 of 1.42 s. 3 of 3 as expected.why_sie/share_one_gpu_between_two_sglang_models: Qwen3-Embedding-4B and Qwen3Guard-Gen-0.6B on one 24 GB L4, set up three ways: plain SGLang at its defaults, plain SGLang with--mem-fraction-staticset by hand, and one SIE server with KV budgets. Run on one L4 on 16 Nov 2026: at the defaults the guard ran out of memory; by hand the embedder kept 64% of its throughput alone and the guard 47%; with SIE both started on the first try and kept 66% and 64%. 1 of 3 as expected: neither shared setup kept the 80% we hoped for, and the README says SIE saves the memory arithmetic, not compute. It also reports that the guard alone was slower through SIE (44 vs 63 checks a second).why_sie/find_when_a_gpu_pays_off: bge-m3 throughput on one L4 by input mix and concurrency, and the break-even against paying per call. Live run: about 51,600 tokens a second on the mixed inputs, so paying per call is cheaper below about 11% busy.why_sie/pack_five_models_on_one_gpu: an agent turn of five calls, one server per model against packed on two GPUs and one. Live run on four A10s: at 50% load the slowest 5% of turns took 2.10 times as long on two GPUs and 3.17 times on one, past the 1.25 bar; the reranker slows its neighbours.why_sie/serve_more_models_than_fit: 10 models that fit against 16 that don't, one server on one GPU, bge-m3 pinned. Live run on one A10: no unloads when they fit; about 1,740 an hour when they don't, a median 10.5 s wait for a model to load, and the pinned model never reloaded but its p99 went from 34 ms to 2.1 s. The original two-worker result about duplicate loads isn't covered, and the README says so.why_sie/kill_a_worker_under_load: SIE's gateway and queue against a hand-built round-robin with health checks, from published images (gateway, sidecar, server, NATS). Live run on two A10s: the queue handles about 0.92 of round-robin's capacity, lost 0 of 38,440 requests through three worker kills against 26 failures for round-robin, and a killed SGLang engine answered again after 31 s and 61 s.AGENTS.md: an exception forwhy_sie/. These recipes report latency, errors and throughput, which the rest of the repo doesn't, and they still run live.tools/check_tree.py, rootREADME.md,MODELS.md: register the folder, index the two recipes, add the models the recipes use (licenses checked on Hugging Face, images from SIE v0.11.1's compatibility matrix).Every recipe except the cold-start one starts its own servers on your GPUs, so it needs Docker and one to four 24 GB GPUs, and doesn't use SIE Serverless. The live runs used
--launcher processin an environment built from SIE v0.11.1's source; thedocker runpaths run the same commands in the published images and haven't been run end to end. Two setups need a server with models from two bundles, which no published image serves yet (superlinked/sie#969); their READMEs say so.How failures are reported
Each recipe judges its own run against thresholds in its
rules.yamland writes the verdicts tosummary.json, saved after every setup. A setup that can't start or can't be measured gets a "not measured" verdict with the reason, and the run exits 1 when any verdict fails. Every server the recipes start binds to 127.0.0.1, except the SIE sidecar's probe port, which SIE v0.11.1 hard-codes to all interfaces.--launcher processtakes--server-python, the interpreter of an environment with SIE installed.Checks
uvx pre-commit run --all-filespassesuv lock --check, strict mypy anduv run recipe.py --helppassuv run recipe.py), and its README matches what came out.envfiles,runs/output or personal dataGenerated using wayfare.