Repository navigation
feat(plugin): DeepSeek-V4.1-Flash on the vLLM plugin backend #2494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
50d91ab
feat(plugin): support DeepSeek-V4.1-Flash graphs and DSpark
zgplvyou 9e73508
fix(plugin): stabilize V4.1 V2 state and graph staging
zgplvyou 089e251
fix(plugin): prepare V4.1 profiling FULL metadata before capture
zgplvyou fc13949
fix(plugin): bound V4.1 capture scratch and cover graph rebinding
zgplvyou 2252d65
style(plugin): satisfy current V4.1 pre-checkin rules
zgplvyou aa8a043
fix(plugin): address V4.1 plugin review findings
zgplvyou bb30e96
fix(plugin): close the aiter collectives this plugin creates
zgplvyou f8a9024
fix(plugin): refuse the V4.1 configs that were starting and failing l…
zgplvyou 5ad5cb5
fix(plugin): restore DSpark verification and unify the V4.1 predicate
zgplvyou bdc670e
ci: one speculative-acceptance gate, and let PR CI see a per-position…
zgplvyou 6f67f76
fix(plugin): ask the staging fallback the same synthetic question
zgplvyou b70d971
fix(plugin): report no KV transport when vLLM configured no connector
zgplvyou d175220
test(plugin): let CPU CI run the geometry parity check, and cover the…
zgplvyou 6099de0
fix(plugin): settle a tentative step on both staging paths, not one
zgplvyou ce2c22a
style(plugin): split the moved slot-allocator imports as isort wants …
zgplvyou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| #!/usr/bin/env bash | ||
| # The speculative-decoding acceptance gate, for whoever runs a spec cell. | ||
| # | ||
| # gsm8k accuracy CANNOT guard a speculative cell. Verification is lossless with | ||
| # respect to the target model, so a draft head that has been broken outright -- | ||
| # reading the wrong hidden states, or an output projection no checkpoint ever | ||
| # filled -- leaves every answer correct and shows up only as acceptance falling | ||
| # to the floor. This is the only gate that catches that. | ||
| # | ||
| # It lives here because it was written twice, and the copies had already | ||
| # diverged in the way that matters: the PR-side one gated the overall rate and | ||
| # not the per-position rates, so PR CI could not see a per-position collapse -- | ||
| # a draft that still accepts its first token and nothing after it keeps a | ||
| # respectable overall number. | ||
| # | ||
| # `atom_oot_test.sh` records both into the result JSON, scraped from the live | ||
| # /metrics endpoint during the gsm8k run. | ||
| # | ||
| # Usage: | ||
| # check_mtp_acceptance.sh RESULT_JSON OVERALL_THRESHOLD [PER_POS_THRESHOLDS] | ||
| # | ||
| # PER_POS_THRESHOLDS is a comma-separated list, one per draft position; absent | ||
| # or empty means the per-position rates are not gated. | ||
| # | ||
| # Reads the JSON with jq when it is there and falls back to python3: the | ||
| # nightly host runner has no python, the PR path runs inside a container that | ||
| # does, and the gate has to be the same number either way. | ||
| set -uo pipefail | ||
|
|
||
| result_file=${1:-} | ||
| overall_threshold=${2:-} | ||
| per_pos_thresholds=${3:-} | ||
|
|
||
| if [[ -z "${result_file}" || -z "${overall_threshold}" ]]; then | ||
| echo "usage: $(basename "$0") RESULT_JSON OVERALL_THRESHOLD [PER_POS_THRESHOLDS]" >&2 | ||
| exit 2 | ||
| fi | ||
| if [[ ! -f "${result_file}" ]]; then | ||
| echo "ERROR: no results JSON for the MTP acceptance check: ${result_file}" >&2 | ||
| exit 2 | ||
| fi | ||
| echo "RESULT_FILE: ${result_file}" | ||
|
|
||
| # read_metric overall | read_metric position <index> | ||
| # | ||
| # MTP_GATE_READER pins the reader (jq|python); the default picks whichever is | ||
| # installed. It exists so the two can be compared against each other -- a gate | ||
| # whose answer depends on which one the runner happens to have is not a gate. | ||
| read_metric() { | ||
| local what=$1 idx=${2:-0} | ||
| local reader=${MTP_GATE_READER:-auto} | ||
| if [[ "${reader}" != "python" ]] && command -v jq >/dev/null 2>&1; then | ||
| case "${what}" in | ||
| overall) | ||
| jq -r '.atom_ci_metadata.mtp_acceptance_overall // empty' "${result_file}" | ||
| ;; | ||
| position) | ||
| jq -r ".atom_ci_metadata.mtp_per_pos_acceptance[${idx}] // empty" "${result_file}" | ||
| ;; | ||
| esac | ||
| else | ||
| python3 "${BASH_SOURCE%/*}/read_mtp_metric.py" "${result_file}" "${what}" "${idx}" | ||
| fi | ||
| } | ||
|
|
||
| overall=$(read_metric overall) | ||
| if [[ -z "${overall}" ]]; then | ||
| echo "ERROR: mtp_acceptance_overall missing -- spec-decode /metrics were not captured during the run. Treating as a failure." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| fail=0 | ||
| echo "MTP overall acceptance: ${overall} (threshold ${overall_threshold})" | ||
| if awk -v v="${overall}" -v t="${overall_threshold}" 'BEGIN {exit !(v < t)}'; then | ||
| echo "FAIL: overall acceptance ${overall} < threshold ${overall_threshold}" | ||
| fail=1 | ||
| fi | ||
|
|
||
| if [[ -n "${per_pos_thresholds}" ]]; then | ||
| IFS=',' read -ra thresholds <<<"${per_pos_thresholds}" | ||
| idx=0 | ||
| for threshold in "${thresholds[@]}"; do | ||
| position=$(read_metric position "${idx}") | ||
| if [[ -z "${position}" ]]; then | ||
| echo "FAIL: position ${idx} acceptance missing (expected >= ${threshold})" | ||
| fail=1 | ||
| else | ||
| echo "MTP position ${idx} acceptance: ${position} (threshold ${threshold})" | ||
| if awk -v v="${position}" -v t="${threshold}" 'BEGIN {exit !(v < t)}'; then | ||
| echo "FAIL: position ${idx} acceptance ${position} < threshold ${threshold}" | ||
| fail=1 | ||
| fi | ||
| fi | ||
| idx=$((idx + 1)) | ||
| done | ||
| fi | ||
|
|
||
| if [[ "${fail}" -eq 1 ]]; then | ||
| echo "MTP acceptance gate FAILED." >&2 | ||
| exit 1 | ||
| fi | ||
| echo "MTP acceptance gate PASSED." |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # SPDX-License-Identifier: MIT | ||
| """Read one MTP acceptance number out of an accuracy result JSON. | ||
|
|
||
| The jq fallback for `check_mtp_acceptance.sh`. The nightly host runner has jq | ||
| and no python; the PR path runs in a container with python and no jq, and the | ||
| gate has to read the same number either way. | ||
|
|
||
| Prints the value, or an empty line when it is absent -- which the caller | ||
| treats as a failure rather than a pass, since a missing acceptance means the | ||
| spec-decode metrics were never captured. | ||
| """ | ||
|
|
||
| import json | ||
| import sys | ||
|
|
||
|
|
||
| def main() -> int: | ||
| if len(sys.argv) < 3: | ||
| print("usage: read_mtp_metric.py RESULT_JSON overall|position [INDEX]") | ||
| return 2 | ||
| path, what = sys.argv[1], sys.argv[2] | ||
| index = int(sys.argv[3]) if len(sys.argv) > 3 else 0 | ||
|
|
||
| with open(path, encoding="utf-8") as handle: | ||
| meta = json.load(handle).get("atom_ci_metadata", {}) | ||
|
|
||
| if what == "overall": | ||
| value = meta.get("mtp_acceptance_overall") | ||
| else: | ||
| positions = meta.get("mtp_per_pos_acceptance") or [] | ||
| value = positions[index] if index < len(positions) else None | ||
|
|
||
| print("" if value is None else value) | ||
| return 0 | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| raise SystemExit(main()) |
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.