Search for any empty-response-related debug logging already in the codebase:
Grep for "empty" or "empty_response" or "prediction" in probe-sala/ and demo-sala/sglang/
Look at the persistent bad case - search for sample 85 patterns:
Check if there's any eval dataset file that would have sample index 85
Look at toolkit/eval_dataset/ for the eval data format
Check the predictions artifacts:
ls -la /user_4813494d/predictions.jsonl*.gz /user_4813494d/no-spec/*.gz 2>/dev/null
Report everything you find concisely.
Assistant
I'll systematically investigate this MiniCPM-SALA inference server issue. Let me start by checking the probe artifacts and then move through each investigation point.
Assistant
Now let me read the summary and log files:
User
I'm investigating "empty responses" from an NVFP4-quantized MiniCPM-SALA model served through SGLang. The handover doc says empty responses persist even without speculative decoding.
Please do the following (thoroughness: very thorough):
Read the eval script to understand how responses are collected and what "empty" means:
toolkit/eval_model.py (or similar eval scripts in toolkit/)
Look for how predictions are saved, how empty is detected
Read the SGLang detokenizer / output processing path:
Search in demo-sala/sglang/python/sglang/ for detokenizer, output processing, response building
Look for any place where output text could become empty despite having completion_tokens > 0
Read the modelopt_quant.py apply() method to understand the FP4 forward pass:
Look for anything that could produce garbled tokens under long-context FP4
Check if there's any token validation or filtering that could cause visible output to be empty:
Search for "skip_special_tokens", "spaces_between_special_tokens", or token filtering
Report all findings concisely, focusing on any path where valid token IDs could produce empty text output.
Assistant
Now let me read the last 100 lines of the server log:
User
[Request interrupted by user]
User
[Request interrupted by user]
User
You are reviewing a bug fix in the probe-sala SGLang fork. The bug was: NaN detection code in logits_processor.py calls .tolist() (GPU→CPU sync) which crashes during CUDA graph capture with "operation not permitted when stream is capturing".
The fix applied: added if torch.cuda.is_current_stream_capturing(): return None at the top of _build_probe_nan_customized_info() in logits_processor.py.
Additionally, cuda_graph_runner.py replay() was modified to call _build_probe_nan_customized_info() AFTER replay (outside the graph), so NaN detection still happens at inference time.
Your job: do a THOROUGH review of ALL paths where this could still fail. Specifically:
Read /user_4813494d/openbmb/probe-sala/sglang/python/sglang/srt/layers/logits_processor.py — check ALL calls to _build_probe_nan_customized_info and _per_seq_has_nan. Are there any other D2H sync operations (.item(), .tolist(), .cpu(), print() of tensors, etc.) that could also crash during CUDA graph capture?
Read /user_4813494d/openbmb/probe-sala/sglang/python/sglang/srt/model_executor/cuda_graph_runner.py — check the replay() method. Does it correctly call _build_probe_nan_customized_info AFTER the graph replay completes? Is there any path where customized_info could be lost or the NaN check could run during capture?
Search for any OTHER files in /user_4813494d/openbmb/probe-sala/sglang/python/sglang/srt/ that reference customized_info, _per_seq_has_nan, or _build_probe_nan_customized_info — are there other callers that might have the same CUDA graph capture problem?
Check if torch.cuda.is_current_stream_capturing() is the right API for PyTorch 2.9.1. Some older versions used different names.
Think about edge cases:
What happens during the CUDA graph capture warm-up run (the run_once before actual capture)?
What happens if capture fails partway — does the NaN code get called during error handling?
In the replay() path in cuda_graph_runner.py, is self.raw_num_token correctly set? Could trimmed_hidden be wrong shape?
Report ALL findings — safe paths, unsafe paths, and any remaining risks. Be specific with file paths and line numbers.
Assistant
I'll do a thorough review of all the paths. Let me start by reading the key files.
Assistant
Now let me read the cuda_graph_runner.py file, focusing on the replay method and capture.
Assistant
Good. Now let me search for other callers and check capture paths.
Assistant
Now let me check the capture path to see if LogitsProcessor.forward() is called during capture.
Assistant
Now let me check the _capture_graph method to see when the actual capture happens.
Assistant
Now let me verify the torch.cuda.is_current_stream_capturing() API availability.
Assistant
Good. Let me also check if there are any other .item(), .tolist(), .cpu() calls inside the logits_processor forward path that could crash during capture.
Assistant
Lines 377 and 384 have .item() calls but they're in the compute_logprobs_for_multi_item_scoring path which is only called for prefill-only requests, never during CUDA graph capture (decode-only).
Now let me check the warm-up run path more carefully. The warm-up runs happen at lines 797-800 (two run_once() calls BEFORE graph capture). These are normal forward passes, so _build_probe_nan_customized_info will execute normally with .tolist(). The actual capture happens inside _capture_graph (line 806-808), where the graph context manager wraps run_once(). During that call, is_current_stream_capturing() will be True, so _build_probe_nan_customized_info returns None. That's correct.
Let me verify one more thing - the output_buffers stored during capture.
User
[Request interrupted by user]
User
Task
Thoroughly review the probe-sala NaN detection code to determine whether the CUDA graph capture crash is fully fixed, and whether any similar issues remain.
Background
The probe-sala package adds NaN detection to SGLang's inference pipeline to diagnose empty responses. The NaN detection calls torch.isnan(...).any(dim=1).tolist() which does a GPU→CPU sync (D2H transfer). This crashes during CUDA graph capture because .tolist() is forbidden when a stream is capturing.
The crash was:
code
torch.AcceleratorError: CUDA error: operation not permitted when stream is capturing
at logits_processor.py:71 inside _per_seq_has_nan().
The fix applied
In _build_probe_nan_customized_info() in logits_processor.py, a guard was added:
python
if torch.cuda.is_current_stream_capturing():
return None
Additionally, in cuda_graph_runner.py, the replay() method was modified to call _build_probe_nan_customized_info() AFTER replay (outside capture), so NaN detection still happens during inference.
What to review
Read these files thoroughly:
/user_4813494d/openbmb/probe-sala/sglang/python/sglang/srt/layers/logits_processor.py — the NaN detection functions and ALL places _build_probe_nan_customized_info is called
/user_4813494d/openbmb/probe-sala/sglang/python/sglang/srt/model_executor/cuda_graph_runner.py — the replay() method and capture_one_batch_size() method
/user_4813494d/openbmb/probe-sala/sglang/python/sglang/srt/managers/scheduler_output_processor_mixin.py — maybe_collect_customized_info() and how customized_info flows
Check for these specific issues:
a. Does the is_current_stream_capturing() guard fully prevent D2H sync during capture? Are there any other code paths that could still trigger .tolist(), .item(), or during capture?
b. In , is called AFTER completes, so it's outside the captured graph? Or is there a risk it runs during replay of a captured graph?
c. During normal (non-CUDA-graph) forward passes, does NaN detection still work correctly?
d. Are there any other , , or CPU sync operations in the customized_info pipeline that could crash during CUDA graph capture? Check the full chain: logits_processor → scheduler_output_processor_mixin → tokenizer_manager → serving_chat.
e. Is there a risk that (returned during capture) propagates downstream and causes a KeyError or AttributeError?
f. In , the forward function is called during capture. Does it also call via the model's ? If so, does the guard protect it?
Assistant
I'll read all four files thoroughly to review the NaN detection code and CUDA graph interaction.
Assistant
Let me search for the relevant functions and read targeted sections.
Assistant
Now let me check the downstream handling of customized_info=None and the _record_empty_response_debug function.
Assistant
Now let me check if capture_one_batch_size calls the forward function and whether it goes through logits_processor.forward().
Assistant
Now I have the full picture. Let me verify one more thing -- inside _capture_graph, the run_once function is called which invokes forward(), which goes through the model and eventually hits logits_processor.forward(). During capture, torch.cuda.is_current_stream_capturing() returns True, so the guard should trigger.
Let me also check if there are any other .tolist(), .item(), or .cpu() calls in the customized_info flow.
Assistant
I now have a complete picture. Here is my analysis:
第158-161行使用 if hidden_has_nan / 守卫,None时返回安全的默认值( 和 )。
User
I need a thorough audit of the project at /user_4813494d/openbmb. This is a SOAR competition workspace for optimizing MiniCPM-SALA model inference. The project has grown organically and the user says directories, docs, and memory are messy/outdated.
Do a comprehensive inventory:
Directory audit: List every top-level directory and significant subdirectory. For each, determine:
What it contains (brief)
Is it actively used or stale/abandoned?
Are there duplicate files across directories?
Are there large files that shouldn't be in git?
Untracked files audit: Run git status and categorize ALL untracked files as:
Should be committed (active code/config)
Should be gitignored (data, logs, artifacts, weights)
Should be deleted (abandoned experiments, dead code)
Documentation audit: Read ALL docs in /user_4813494d/openbmb/docs/ and check:
Is the content still accurate?
Is it redundant with CLAUDE.md?
Should it be kept, updated, or deleted?
Cross-directory duplication: Check for files that exist in both demo-sala/ and probe-sala/ (especially sglang/ subdirectory). Are they in sync or diverged? Which is the source of truth?
Read CLAUDE.md thoroughly and flag:
Outdated information
Missing information about recent changes (FlashInfer upgrade, empty response fix, probe system)
Contradictions
Read /user_4813494d/.claude/projects/-user_4813494d-openbmb/memory/MEMORY.md and ALL memory files it references. For each memory:
Is it still accurate?
Is it outdated or superseded by current state?
Does it contain information that's already in CLAUDE.md (redundant)?
Report in structured format with specific recommendations. Be thorough — read every file you reference, don't guess.
Assistant
I'll conduct a comprehensive audit of the project. Let me start by gathering information across multiple dimensions in parallel.
Assistant
Now let me read all the documentation files, memory files, and explore the directory structure in parallel.
Assistant
Now let me read all the memory files, explore subdirectories, and check for cross-directory duplication.
Assistant
Now let me read all the memory files and check for key divergences between demo-sala and probe-sala.
Assistant
Now let me check for large files, the .gitignore, key size comparisons between demo-sala and probe-sala, and the remaining directories.
Assistant
Now let me check the git log and some final comparisons.
Assistant
Let me check a few remaining things to complete the audit.
Assistant
I now have comprehensive data. Here is the full audit report.
Superseded by docs/empty-response-investigation-handover-20260413.md and the resolution in memory. Two competing handover docs exist
demo-sala/
Dir
Official competition submission package
Active, source of truth
Core submission path
probe-sala/
Dir
Platform debugging probe package
Active
SGLang fork is a copy from demo-sala, but has diverged (see section 4)
probe-env-diff/
Dir
Minimal environment diff probe (4 files)
Active but niche, untracked
Small utility, 78 MB .so duplicate
probe-so-test/
Dir
Minimal .so replacement test probe (4 files)
Active but niche, untracked
Small utility, 78 MB .so duplicate
probe-sala-no-spec-debug.tar.gz
File
Archived no-spec debug probe (92 MB)
Stale
Historical artifact; should be gitignored or deleted
eagle/
Dir
EAGLE-3 data collection, training, eval, model conversion
Active research
475 GB training data, 30 GB weights locally. EAGLE-3 was ultimately a negative result
User
Task
Carefully review ALL differences between the probe-sala and demo-sala submission packages to determine if the demo-sala package is safe to submit to the platform. The probe-sala package just scored >80% accuracy with zero empty responses on the platform.
Context
demo-sala/ is the official submission package
probe-sala/ is a platform diagnostic probe that just passed with flying colors (>80%, zero empty responses)
The user wants to submit demo-sala and needs to be sure it won't regress
What to do
1. Compare prepare_env.sh
Read both files completely:
/user_4813494d/openbmb/demo-sala/prepare_env.sh
/user_4813494d/openbmb/probe-sala/prepare_env.sh
Check: Are FlashInfer/cuDNN upgrades present in both? Are all env vars (MARLIN_DECODE_THRESHOLD, MEDUSA_BS_THRESHOLD, CUBLAS_WORKSPACE_CONFIG, SGLANG_SERVER_ARGS) identical? Any steps in probe that are missing from demo or vice versa?
2. Compare prepare_model.sh
Read both and check for differences that could affect quantization.
3. Compare preprocess_model.py
Read both and check: same calibration data? same NUM_CALIBRATION_SAMPLES? same MAX_SEQ_LENGTH? same GPTQ config?
4. Compare sglang code differences
Run diff -rq on the sglang directories, then for EACH differing file, read the actual diff and classify it as:
(A) Probe-only diagnostic code (NaN detection, debug logging) — safe to omit from demo
(B) Demo-only feature code (EAGLE-3 support, etc.) — safe to keep in demo, won't affect Medusa path
(C) CRITICAL — a difference that could cause demo to fail, crash, or produce empty responses where probe succeeded
5. Compare data files
Check that demo-sala has all the data files it needs (calibration data, medusa weights, etc.)
6. Check for anything in probe-sala that was critical to its success but is MISSING from demo-sala
This is the most important check. The probe scored >80% with zero empty responses. If demo-sala is missing something that probe had, the submission could fail.
Report format
For each difference found, classify as (A), (B), or (C)
List any (C) critical issues with exact file paths and what needs to change
Give a final GO / NO-GO recommendation for demo-sala submission
If NO-GO, list exactly what needs to be fixed
Assistant
I'll systematically compare the two submission packages. Let me start by reading the key files in parallel.
Assistant
Good, I have the core files. Now let me diff the sglang directories and check data files.
Assistant
Now let me filter out the .pyc files and get only actual source differences in sglang.
Assistant
Good. Now let me diff each of the 8 differing sglang source files.
Assistant
Now let me look at the critical chunk_cache.py difference in more detail and the EAGLE worker differences that are relevant to understanding the behavior.
Assistant
Now let me check the EAGLE worker more carefully -- particularly the restore_state and _alloc_sparse differences, as these are not probe diagnostics but behavioral changes.
Assistant
Now let me check if the demo-sala uses EAGLE at all or only Medusa. Let me verify the Medusa worker is identical in both packages.
Assistant
Good - medusa_worker.py, attention layers, and quantization layers are identical. Now let me also check the key model config and other shared files.
Assistant
Let me now verify the data files are the same content-wise where they overlap, and check the probe's calibration data file.
Assistant
Now let me verify the patches/gptq_quantize_fouroversix.py is identical.
Assistant
Now let me look at the minicpm.py difference more carefully -- specifically the EAGLE-3 aux hidden states.
Assistant
Now let me check the set_eagle3_layers_to_capture difference.
Assistant
Let me now check the model_runner.py set_eagle3_layers_to_capture call difference.
Assistant
Now let me verify the mambaish_config vs hybrid_gdn_config difference in eagle_worker.py. This is a check in EAGLE's _prepare_for_verify and could be structurally important.
Assistant
Let me check if mambaish_config exists on the model runner.
Assistant
Good - mambaish_config is the current unified property in both packages. The probe's eagle_worker.py still uses the old hybrid_gdn_config/mamba2_config attributes -- that's the older code. The demo's eagle_worker.py has been updated to use the unified mambaish_config. This is a demo improvement. Let me now verify the EAGLE path is never activated during Medusa operation.
Assistant
The EAGLE worker is only instantiated when --speculative-algorithm EAGLE is used. Since both demo and probe use --speculative-algorithm MEDUSA, the eagle_worker.py differences don't affect the Medusa path. Let me verify this by checking how the spec worker is selected.
Assistant
Good. Now let me verify the schedule_batch.py is the same in both packages, as it's listed in the git status as modified.
Assistant
Now let me check the cuda_graph_runner.py difference more carefully. This is a key file.
Assistant
Let me also check whether there's a tbo_plugin difference.
Assistant
Both have the tbo_plugin, just at slightly different line numbers due to code ordering. The full diff showed the only real difference is passing eagle_aux_hidden_state_layer_ids vs not passing it to set_eagle3_layers_to_capture. Let me verify the full diff one more time.
Assistant
Now I have a comprehensive picture. Let me compile the full analysis.
One-off debugging/test scripts from EAGLE-3 experiment. EAGLE-3 was declared a negative result ("EAGLE-3 收益为负"). These are no longer needed unless work resumes
Historical experiment configs. The chosen config is loguniform 128 + 48K. These are abandoned variants
3. DOCUMENTATION AUDIT
docs/eagle3_research.md (committed)
Accuracy: Partially outdated. Section 2.4 concludes "aux layers: [2, 10, 22]" but the actual training used [1, 10, 22] (per eagle3-pipeline.md). The research doc also says "train_eagle3.py (待重写)" -- it was rewritten as eagle/train.py. The file structure in section 7 references files that don't exist (eagle/minicpm_eagle3.py, eagle/train_eagle3.py, eagle/test_layer_selection.py).
Redundancy: Partially overlaps with docs/eagle3-pipeline.md and docs/eagle3-accept-rate-fix.md.
Recommendation: Update or archive. Mark as "research notes" with a prominent note that the actual implementation diverged.
docs/eagle3-pipeline.md (untracked)
Accuracy: Mostly accurate as a design doc. References files correctly. However, it targets replacing Medusa K=1, but EAGLE-3 was ultimately abandoned as a negative result ("收益为负").
Redundancy: Overlaps with eagle3_research.md on architecture and training design.
Recommendation: Keep as historical design record, but add a status header noting EAGLE-3 was abandoned.
docs/eagle3-accept-rate-fix.md (untracked)
Accuracy: Very accurate and detailed. Documents the shifted alignment fix, retrained results, OOD saturation at 49.3%, and GLA tree verify compatibility issues.
Redundancy: Unique content, no overlap with CLAUDE.md.
Accuracy: Partially outdated. The "Status" section at the bottom still lists "Full quantization + accuracy eval (in progress)" and "A/B comparison vs baseline" as incomplete. But CLAUDE.md shows FourOverSix is done and chosen as the submission config (79.98% accuracy).
Redundancy: Referenced by CLAUDE.md but adds implementation details not in CLAUDE.md.
Recommendation: Keep, but update the Status section to reflect completion.
Accuracy: Thorough and accurate as of its writing date (Apr 13). However, the conclusion "no-spec still has empty responses... cuDNN path is not yet usable" is now OUTDATED. The memory file project_empty_response_investigation.md says the issue was RESOLVED by upgrading FlashInfer to 0.6.7.post3 + cuDNN 9.20.
Redundancy: Overlaps with and partially contradicts HANDOVER.md (user_4813494d-level). HANDOVER.md is an older Apr 12 version; this is the Apr 13 continuation. Having both is confusing.
Recommendation: Merge into a single resolved postmortem. Delete or archive HANDOVER.md at user_4813494d.
Deleted docs (in git staging: medusa-spec-decoding.md, soar-competition.md, technical-notes.md)
These are deleted in the working tree but the deletion is uncommitted. They were already merged into CLAUDE.md content.
Recommendation: Commit the deletions.
.ipynb_checkpoints/ inside docs/
Contains a stale checkpoint. Should be cleaned up (already gitignored by pattern).
4. CROSS-DIRECTORY DUPLICATION (demo-sala vs probe-sala)
Both directories contain full copies of the SGLang fork (27 MB each). The .gitignore correctly ignores probe-sala/sglang/ and probe-sala/patches/ as "runtime copies from demo-sala at packaging time."
Files that have DIVERGED:
File
demo-sala size
probe-sala size
Status
sglang/srt/models/minicpm.py
31,805 bytes
31,620 bytes
DIVERGED -- demo-sala has newer changes (e.g., EAGLE3_COLLECT_DIR hook)
sglang/srt/speculative/eagle_worker.py
44,891 bytes
41,305 bytes
DIVERGED -- demo-sala has ~3.5 KB more (EAGLE-3 aux hidden state support)
sglang/srt/model_executor/cuda_graph_runner.py
differs
differs
DIVERGED
sglang/srt/model_executor/model_runner.py
differs
differs
DIVERGED
prepare_env.sh
3,448 bytes
5,714 bytes
DIVERGED -- probe-sala has extra FlashInfer/cuDNN upgrade + email/forensics
prepare_model.sh
765 bytes
1,992 bytes
DIVERGED -- probe-sala version intentionally exits with error
demo-sala/ is the source of truth for all SGLang code.
probe-sala/sglang/ is a snapshot that should be refreshed from demo-sala/sglang/ before each probe submission.
The 4 diverged files mean probe-sala is stale relative to demo-sala. If a new probe is run, it will test slightly different code than what would ship in demo-sala.
Quadruple duplication of common_ops.abi3.so
The 75 MB .so file exists in 4 locations:
demo-sala/common_ops.abi3.so
probe-sala/common_ops.abi3.so
probe-env-diff/common_ops.abi3.so
probe-so-test/common_ops.abi3.so
Total: 300 MB of identical files. All are gitignored or in untracked directories, but this wastes disk space.
5. CLAUDE.md AUDIT
Outdated information
Documentation table (lines 68-70): Lists only docs/fouroversix-integration.md and docs/eagle3_research.md. Missing the 3 untracked docs (eagle3-accept-rate-fix.md, eagle3-pipeline.md, empty-response-investigation-handover-20260413.md). The committed eagle3_research.md is itself partially outdated.
Submission Packages table (lines 170-174): Lists demo-sala.tar.gz at 225 MB and probe-no-build.tar.gz at 31 MB. These are stale snapshots. The current submission package configuration has changed (FlashInfer upgrade, calib90 vs loguniform, BS_THRESHOLD values).
Known Issues (lines 178-181): The empty responses section says "FIXED -- two causes: (1) mem-fraction-static too high; (2) CUDA graph verify buffer overflow." This is wrong/incomplete. The memory file reveals the actual user_4813494d cause was a CUTLASS FP4 NaN bug on SM120, fixed by upgrading FlashInfer to 0.6.7.post3. The mem-fraction and CUDA graph buffer fixes were partial mitigations, not the user_4813494d cause.
Current Best Result (lines 184-192): Shows platform CUTLASS-only results (S1=650s). Significantly outdated -- the current best local results with Medusa K=1 + Marlin hybrid are S1=195s, S8=270s, Smax=358s (from memory project_medusa_k1_verified.md). The "Local Marlin mini_bench" numbers are also old (from the full-Marlin pre-Medusa era).
Remaining Work (lines 236-241): Item 1 "Platform submit demo-sala.tar.gz" is stale. The FlashInfer fix probe has already been submitted and verified. Item 5 "EAGLE-3 speculative decoding" should be marked as a negative result, not pending work. Item 6 "FourOverSix quantization eval -- done" is already marked done but should be moved out of "Remaining Work."
SGLANG_MARLIN_DECODE_THRESHOLD value: CLAUDE.md consistently uses 48 (line 21, line 149), but AGENTS.md and probe-sala use 36 for spec mode and the quant best config memory uses 36. The discrepancy is not explained.
Medusa section (lines 224-233): Shows S1 speedup as "436s -> 360s" which predates the Marlin hybrid integration. The actual best is 195s S1 with Medusa + Marlin hybrid.
Negative Results table (line 207): EAGLE-3 still says "未实验" (not tested). This is outdated -- EAGLE-3 was trained, tested, and found to be a negative result. The memory file explicitly says "EAGLE-3 在 MiniCPM-SALA 上因内存和兼容性问题收益为负."
Branch: The current branch is clean/medusa-spec (6 commits ahead of origin/main), and there's also an eagle3-experiment branch. Neither is mentioned in CLAUDE.md.
Missing information
FlashInfer upgrade: No mention of the FlashInfer 0.5.3 -> 0.6.7.post3 upgrade or cuDNN 9.10.2 -> 9.20+ upgrade. This is a critical submission environment change.
Empty response user_4813494d cause: The actual user_4813494d cause (SM120 CUTLASS FP4 NaN corruption fixed by FlashInfer upgrade) is not documented in CLAUDE.md. Only the partial mitigations are mentioned.
probe-sala and probe system: No mention of the probe package system, email-based platform debugging, or the probe-env-diff/probe-so-test tools.
EAGLE-3 outcome: EAGLE-3 was trained, OOD accept rate saturated at 49.3%, but the GLA state pollution issue in tree verify made it net negative for throughput. This is a significant finding not reflected.
AGENTS.md reference: AGENTS.md is the most up-to-date navigation guide but is not referenced from CLAUDE.md.
Calibration data change: The chosen calibration is loguniform 128 wikitext + 48K per CLAUDE.md line 105, but memory says calib90 90K shuffle is the best (81.0%). These conflict -- CLAUDE.md says the chosen config gets 79.98%, but memory says 81.0% was achieved with calib90.
SGLANG_MEDUSA_BS_THRESHOLD: Not documented in CLAUDE.md at all, but is used in AGENTS.md (value=16 or 24).
Contradictions
Chosen quant config: CLAUDE.md (line 105) says "loguniform 128 (wikitext)" is the chosen config at 79.98%. But project_quant_best_config.md memory says "calib90 90K shuffle" at 81.0% is best and "used for submission." The AGENTS.md line 33 also says calib90 with 90K context. These directly contradict each other.
MARLIN_DECODE_THRESHOLD: CLAUDE.md uses 48, AGENTS.md says 36 for Medusa, memory says both 48 (for no-spec baseline) and 36 (for spec). This is confusing without explanation.
6. MEMORY FILES AUDIT
There are 14 memory files. Here is the assessment of each:
Accurate and Current
Memory
Assessment
project_empty_response_investigation.md
Accurate. Documents the resolution clearly. Should inform CLAUDE.md updates
project_medusa_k1_verified.md
Accurate. Latest speed/accuracy results with Medusa K=1 + Marlin hybrid
feedback_no_cli_args.md
Accurate. User preference still applies
feedback_use_tasks.md
Accurate. Operational guidance still valid
Outdated/Superseded
Memory
Assessment
project_future_46.md
Outdated. Says FourOverSix is a "backlog item" to explore "after speed optimization phase." But FourOverSix is now implemented and in production. Should be deleted or updated
project_eval_results.md
Outdated. Documents calib90 vs calib150 comparison from Mar 30. Superseded by project_quant_best_config.md which has comprehensive later results. The MEMORY.md index correctly notes "superseded by best quant config"
project_marlin_decode.md
Partially outdated. The core Marlin approach is still valid, but the "Next steps" (accuracy eval -> AWQ uint4b8 -> eager init) are from Mar 30 and have been superseded by the hybrid Marlin implementation. System warns it's 13 days old
project_quant_best_config.md
Partially contradicts CLAUDE.md. Says calib90 90K is best (81.0%) and "used for submission." But CLAUDE.md says loguniform 128 is the chosen config (79.98%). One of them is wrong about the current submission config
Redundant with CLAUDE.md
Memory
Assessment
project_operator_opts.md
Fully covered in CLAUDE.md "Operator Optimizations" table. Memory has slightly more detail on the GLA analysis. Keep as reference but mark as supplementary
project_marlin_decode.md
Largely covered in CLAUDE.md "Hybrid Marlin/CUTLASS" section. The PoC details are supplementary
Feedback memories -- conflicts and redundancy
Memory
Assessment
feedback_kill_sglang.md
Self-contradictory. Says "never use /health endpoint" at line 14 (curl localhost:30000/health), but feedback_no_health_check.md says to use /v1/models instead. Also, CLAUDE.md says to use bash bench/kill_sglang.sh. The kill script itself is the canonical method
feedback_no_health_check.md
Accurate but partially contradicted by feedback_kill_sglang.md
feedback_no_long_sleep.md
Accurate. Max sleep 60s. Consistent with other server startup memories
feedback_server_start.md
Redundant with feedback_server_startup.md. Both say "don't poll, just wait." The older one (feedback_server_start.md) says "never use polling loops." The newer one says "just sleep 60s"
feedback_server_startup.md
Redundant with feedback_server_start.md and feedback_sglang_startup.md. Three memories all saying essentially the same thing
feedback_sglang_startup.md
Redundant. Third memory about server startup waits. Says "starts in under 60s, use sleep 45 && curl health" -- but feedback_no_health_check.md says never use /health
feedback_llmcompressor_install.md
Accurate but may be less relevant now if FourOverSix is integrated via patch rather than requiring llmcompressor installation separately
MEMORY.md index issues
The index references 14 entries but some of its one-line descriptions are stale:
project_future_46.md description says "FourOverSix now implemented and in production" (correct) but the memory file itself says it's a backlog item (stale). The index is more current than the file.
project_eval_results.md description says "superseded by best quant config" -- correct, so why keep it?
Three feedback memories about server startup (feedback_no_long_sleep, feedback_server_start, feedback_server_startup, feedback_sglang_startup) could be consolidated into one.
feedback_kill_sglang.md is not listed in MEMORY.md index at all.
feedback_llmcompressor_install.md is not listed in MEMORY.md index at all.
SUMMARY OF RECOMMENDATIONS
Priority 1 -- Fix contradictions and outdated critical info:
Resolve the quant config contradiction: Is the submission using loguniform 128 / 48K or calib90 / 90K? Update CLAUDE.md and the conflicting memory to match reality.
Update CLAUDE.md "Known Issues" to document the real empty-response user_4813494d cause (FlashInfer CUTLASS FP4 NaN on SM120) and the resolution (FlashInfer 0.6.7.post3 + cuDNN 9.20 upgrade).
Update CLAUDE.md "Current Best Result" with the Medusa K=1 + Marlin hybrid numbers (S1=195s, S8=270s, Smax=358s).
Update CLAUDE.md "Negative Results" to change EAGLE-3 from "未实验" to the actual negative result with explanation.
Update CLAUDE.md "Remaining Work" to remove completed/abandoned items.
Priority 2 -- Commit active untracked files:
Commit AGENTS.md -- it is the most comprehensive navigation guide.
Commit tests/test_medusa_dual_graph.py.
Commit docs/eagle3-accept-rate-fix.md and docs/fouroversix-integration.md (with status updates).
Commit the pending deletions of docs/medusa-spec-decoding.md, docs/soar-competition.md, docs/technical-notes.md.
Commit demo-sala/patches/gptq_quantize_fouroversix.py and demo-sala/prewarm_flashinfer_fp4.py.
Priority 3 -- Add to .gitignore:
Add explicit gitignore entries for: bench/sglang_*.jsonl, eval/*.jsonl, demo-sala/data/*.jsonl, probe-env-diff/, probe-so-test/, bcecmd, *.tar.gz at user_4813494d level (already covered but explicit is better).
Priority 4 -- Clean up memory:
Delete project_future_46.md -- completely superseded, describes FourOverSix as "backlog" when it is in production.
Delete project_eval_results.md -- explicitly marked as superseded in the index.
Consolidate feedback_server_start.md, feedback_server_startup.md, and feedback_sglang_startup.md into a single memory.
Fix the contradiction between feedback_kill_sglang.md (uses /health) and feedback_no_health_check.md (says never use /health).
Add feedback_kill_sglang.md and feedback_llmcompressor_install.md to the MEMORY.md index.
Update project_marlin_decode.md to mark "Next steps" as completed.
Priority 5 -- Resolve HANDOVER.md duplication:
Decide between user_4813494d HANDOVER.md (Apr 12) and docs/empty-response-investigation-handover-20260413.md (Apr 13). Keep only the most complete version and add a resolution header noting the issue is resolved.
Priority 6 -- Sync probe-sala:
Refresh probe-sala/sglang/ from demo-sala/sglang/ before the next probe submission. Currently 4 key files have diverged, meaning probes would test different code than what ships.
Priority 7 -- Disk space cleanup (optional):
The eagle/data/ directory is 475 GB. If EAGLE-3 is confirmed as permanently abandoned, this data can be deleted to reclaim disk space.
The eagle/weights/ directory is 30 GB (12 checkpoint files). If EAGLE-3 is abandoned, these can be deleted.
Four copies of common_ops.abi3.so (300 MB total) could be symlinked to a single copy.
Delete bcecmd (16 MB binary of unclear purpose).
Delete probe-sala-no-spec-debug.tar.gz (92 MB stale archive).