Skip to content

Add matched-context DFlash proposal policy overlap reference - #555

Open
linson007 wants to merge 1 commit into
incoai:mainfrom
linson007:experiment/dflash-policy-overlap
Open

linson007 wants to merge 1 commit into
incoai:mainfrom
linson007:experiment/dflash-policy-overlap

Conversation

@linson007

@linson007 linson007 commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Measures proposal-policy alternatives against the same full target distribution and correct predecessor context. The reference compares existing, history-only and history-plus-prefix penalties on fixed candidate support, reporting overlap, target tail mass and proposal entropy. Prompt occurrences activate repetition; presence/frequency count generated output.

Related to #545. This implements the numerical measurement/reference stage; the research issue stays open for deployed distribution capture and serving qualification.

Validation:

  • Full repository Python suite passed: 1325 tests, 27 expected skips, after building the required native binary in this worktree.
  • Seven focused tests passed: target-tail preservation, signed penalties, default controls, within-block counts, greedy tie order, sampled frequencies, context mismatch rejection, and CLI/schema round-trip.
  • The exact accept-plus-residual reference reproduces arbitrary full target distributions on 100 small cases, including disjoint proposal support and target tail tokens.
  • Ruff lint/format and architecture boundaries passed; production native build succeeded locally.
python -m unittest dev.tests.tools.test_dflash_policy_overlap -v
python -m dev.benchmarks.dflash_policy_overlap capture.json --output report.json

Inputs must supply the actual full target p after request filtering and correctly bound proposal scores. The existing greedy capture in #550 does not contain that distribution. Fixture provenance is explicit and is not real-model improvement evidence. Target top-k/top-p/min-p, stops, thinking and constraints are already reflected in p; this tool changes no runtime policy, retrieval support, proposal q buffer or rejection correction. The CPU reference is not FP32/Metal numerical parity. Native sampled capture, mixed-lane/state tests and paired latency/acceptance measurements remain open.

@linson007

Copy link
Copy Markdown
Contributor Author

Validation scope relative to the new RunPod/native test run

This PR remains a CPU numerical proposal-policy reference, not a runtime policy change. Its recorded qualification includes seven focused policy tests, full-target/tail preservation and 100 small accept-plus-residual distribution cases, plus the passing repository suite and current-head scheduled CI at 24b00c1f5b22d0ae4378980c273a3478227bee50.

The new real-Qwen3.8 matrix in #554 used greedy decoding, all verification rows and frozen budget learning. It did not exercise sampled proposal-policy alternatives and does not supply the actual full filtered target distribution this reference requires. Consequently no new GPU/model-level policy-effectiveness result is claimed for this PR. Sampled native capture and paired latency/acceptance qualification remain open in #545.

Full report and reproduction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant