Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions opt_prime/examples/pd/http_matrix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,17 @@ python examples/pd/serve_batched.py --model "$MODEL" --device cuda:1 --slots 4 \
```

The new flags affect the in-process Torch producer only. Nonpositive producer chunks are rejected. Disabling reuse or using smaller chunks can increase prefill work/overhead; these options do not promise a speedup or universal bitwise equality. CPU factory and four-model GPU controls are recorded under issue #241.

### Live GPU PD matrix

The validator accepts `--device`, `--pd-prefill-device` and the producer controls above, records actual producer policy and asserts remote prefill/transfer counters. It also accepts `--http-module` for a trusted local HTTP implementation candidate; the candidate is loaded before its consumers so exception classes retain their identity.

```bash
git show 9e442cd:opt_prime/opt_prime/accel/serve/llmd.py > /tmp/pd-http-safe.py
PYTHONPATH=opt_prime python opt_prime/examples/pd/http_matrix/validate.py \
--http-module /tmp/pd-http-safe.py --model "$MODEL" --output "$OUTPUT" \
--device cuda:1 --pd-prefill-device cuda:0 \
--pd-prefill-no-prefix-cache --pd-prefill-chunk 256
```

Run from the repository root. Omit the producer arguments for native control. `passed` means lifecycle/count assertions passed; concurrent/serial token equality is reported separately, including failed numerical comparisons. See gpu-live-pd240 for the complete default-policy, FP32 and matching-policy results.
4 changes: 4 additions & 0 deletions opt_prime/examples/pd/http_matrix/STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ Structured SDK logs and cancelled/malformed replies previously killed the receiv
## Explicit Torch producer policy (#241)

New opt-in controls disable producer prefix reuse and select producer chunk size; defaults remain cache-on/chunk2048. Public cache-off/chunk256 configuration passes all four real GPU PD HTTP paths:48/48 concurrent equality,12/12 native-PD serial equality at128/2048/8192tokens,84remote prefills and0producer hits. Lifecycle checks pass.20focused and464full tests pass (15skipped,135subtests). This is tested numerical reproducibility, not a speedup or arbitrary-input equality guarantee; original default-policy discrepancies remain in#240.

## Live GPU PD matrix (#240)

All four native/PD BF16 lifecycle configurations pass across128/2048/8192tokens. Default PD has35/48concurrent equality versus native48/48, and11/12native-PD serial equality. FP32 restores all divergent models; BF16 explicit cache-off/chunk256 controls#241 restore four-model48/48concurrent and12/12serial equality. Original divergences and validator module-identity failure are retained in evidence240. The self-contained HTTP-candidate loader was fixed and Qwen0.6B rerun passes. No matched speedup or compute/copy overlap claim.
3 changes: 3 additions & 0 deletions opt_prime/examples/pd/http_matrix/evidence240/events.jsonl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{"id": "a4854a4bbae8442ea6c1a5b3ce82e7ba", "ts": "2026-10-23T23:33:18+09:00", "task": "GPU live PD matrix (aicomp #240)", "result": "Qwen3-0.6B BF16 GPU0->GPU1 HTTP lifecycle passes;21remote prefills/44544transferred tokens. Concurrent equality8/12, retained as numerical discrepancy. Remaining native/PD queue49704 active.", "next": "Complete four-model BF16 native/PD matrix, then FP32 controls; preserve all numerical failures.", "state": "active", "done": false, "blocker": "", "metrics": {}, "params": {"dtype": "bfloat16", "decode_slots": "4"}, "artifacts": [{"path": "analysis/serving-matrix-201/gpu240-qwen06b-pd.json", "size": 24146, "sha256": "84de5338ae7a227f"}], "experiments": ["experiments/2026-10-23-gpu-live-pd240.md"], "labels": ["experiment"], "review": false, "todos": [], "note": "", "agent": "codex", "host": "xeon-max", "branch": "main", "commit": "351d39d-dirty"}
{"id": "bb809b6ecfa54c1c913cdbbaff56c857", "ts": "2026-10-23T23:36:05+09:00", "task": "GPU live PD matrix (aicomp #240)", "result": "Four-model BF16 native+PD8/8 lifecycle runs pass,84remote prefills. Native concurrency48/48 exact; PD35/48 exact(Q06=8,Q4=12,KONI=7,Gemma=8 of12). Native/PD serial11/12; Gemma2K differs.", "next": "Run FP32 and producer-cache-off controls before attributing numerical differences; keep full goal active.", "state": "active", "done": false, "blocker": "", "metrics": {}, "params": {"dtype": "bfloat16", "decode_slots": "4"}, "artifacts": [{"path": "analysis/serving-matrix-201/gpu240-summary.json", "size": 1555, "sha256": "46799a4baa76b48e"}], "experiments": ["experiments/2026-10-23-gpu-live-pd240.md"], "labels": ["experiment"], "review": false, "todos": [], "note": "", "agent": "codex", "host": "xeon-max", "branch": "main", "commit": "351d39d-dirty"}
{"id": "75a2497a5045452ca4660b574cf6211f", "ts": "2026-10-23T23:44:56+09:00", "task": "GPU live PD matrix (aicomp #240)", "result": "FP32 controls restore Q06/KONI/Gemma36/36 concurrent and9/9 native-PD serial equality. BF16 cache-off gives36/36 concurrent but7/9 serial; matching chunk256 restores Q06/Gemma6/6 serial. Public-policy4model queue20549 now running.", "next": "Validate public cache/chunk flags, publish evidence and retain originalBF16 mismatches; RNGD long KONI queue remains active.", "state": "active", "done": false, "blocker": "", "metrics": {}, "params": {}, "artifacts": [], "experiments": ["experiments/2026-10-23-gpu-live-pd240.md", "experiments/2026-10-23-pd-producer-cache241.md"], "labels": ["experiment"], "review": false, "todos": [], "note": "", "agent": "codex", "host": "xeon-max", "branch": "main", "commit": "351d39d-dirty"}
Loading