Repository navigation
Update vllm to v0.4.3 - #511
Merged
Merged
Conversation
merrymercy
commented
Jun 7, 2024
Collaborator
- Combine these two PRs
- Fix sglang compat with vllm 0.4.3 #487
- Fix issue: cuda index incorrectly -1 when tp_size>1 #496
- Enforce version in pyproject.toml
This was referenced Jun 7, 2024
timethink
pushed a commit
to timethink/sglang
that referenced
this pull request
Mar 9, 2025
Co-authored-by: Qubitium <[email protected]> Co-authored-by: ZX <[email protected]>
efschu
added a commit
to efschu/htsglang
that referenced
this pull request
Aug 3, 2026
…pert stride; catch-all probe registration Three sgl-kernel csrc fixes, each with an off-GPU can-discriminate test (pure tree change -- wheel NOT built/installed here): - sgl-project#511 (audit sgl-project#506 axis 4, sgl-project#380 class): the GGUF MXFP4 numeric gate was loose enough that an all-zeros or sign-flipped output passed (atol=1.5, rtol=3e1 against RMS 5.1e3 outputs). Replaced with a tolerance DERIVED from the one physical error source (q8_1 activation rounding), plus spread/magnitude preconditions. Every gate in test_gguf_mxfp4_cuda.py now has an off-GPU test proving it rejects a zeroed and a sign-flipped output, including the refuted baseline executed as its own test. - sgl-project#512 (audit sgl-project#506 A1-1): the GGUF MoE MMQ kernel's expert-address byte stride (moe.cuh) was declared `int` (32-bit) while the call site already passed int64_t -- wraps negative once a rank's per-layer expert tensor passes 2 GiB (DSV4-Flash Q4_K, 256 experts, first bad local expert 227; TP=3 sharding is the only reason this rig never hit it). Widened to int64_t through all instantiations. - sgl-project#518: three GGUF capability probes (ggml_moe_get_block_size, ggml_mmvq_kq_tuned, ggml_mxfp4_native) were registered for a DEVICE dispatch key but take no tensor argument, so the dispatcher can never route them -- every call raised "no tensor arguments" before any kernel ran, on every arch. Serving never noticed because gguf.py had grown a python mirror around the raise. Fixed with the same keyless m.impl pattern apply_token_bitmask_inplace_cuda already uses. test_no_tensor_op_dispatch_518.py pins it twice: the dispatcher behaviour on throwaway in-process ops (executed, off-GPU, no wheel needed) and a ratchet over every TORCH_LIBRARY_FRAGMENT schema. FEATURE_CATALOG.md §12 conflict as expected (both this branch and the already-merged sgl-project#510/sgl-project#513 insert a new family paragraph immediately after the §12 header): kept all three additive paragraphs in sequence (Unauthenticated-state-change sgl-project#510, Incomplete-cache-key sgl-project#513, Unreachable-registration sgl-project#81/sgl-project#518, Byte-stride width sgl-project#109/sgl-project#112/sgl-project#512, Tolerance-that-cannot-fail sgl-project#380/sgl-project#511). All 17 sections and every other previously-preserved additive paragraph verified present. Tests (CUDA_VISIBLE_DEVICES=99, PYTHONPATH pinned to this worktree, no wheel rebuild): - The three sgl-project#511-touched test files directly: 29 passed, 14 skipped (the CUDA-gated MXFP4 kernel cases correctly skip without a rebuilt wheel; the off-GPU can-discriminate portions all run and pass). - test/registered/unit/quantization/ (full): 6 failed, 100 passed, 14 skipped, 27 subtests -- all 6 failures confined to test_gguf_dequant_scratch_budget.py, untouched by sgl-project#511's diff. - test/registered/unit/layers/ (full): 3 failed, 646 passed, 39 skipped, 995 subtests -- all 3 failures in test_deterministic_fp8_gemm.py / test_flashinfer_workspace_zeroing.py, both untouched by sgl-project#511's diff. - test/registered/unit/model_loader/ (full, since gguf.py is touched): 32 failed, 229 passed, 9 skipped, 41 subtests. Diffed the FULL failing-test-ID list (not just the tail) against the pre-sgl-project#511 tip (post-sgl-project#514): BYTE-IDENTICAL, 32 lines each side, empty diff. An earlier truncated `tail` comparison looked different due to test-order variance in what scrolled past -- re-verified against the complete list before trusting it. - ruff check --select=F401,F821,UP037: clean. - codespell: clean on all 9 touched/added files including the .cc/.cuh sources.
efschu
added a commit
to efschu/htsglang
that referenced
this pull request
Aug 3, 2026
…ough the declaration overlay Task sgl-project#465 fixture repair + sgl-project#499 hibernate fix, two commits: test(sgl-project#465): repairs four stale test fixtures across the line (7 red -> 0): test_decode_queue_cleanup.py, test_bar1_strand_is_opt_in.py, test_rank_prefill_log.py, test_coresidence_budget_mapping.py -- no assertion weakened, each fixture updated to match the current production shape. fix(sgl-project#499): a server_args field read on both sides of materialize_declarations is TWO values. The sgl-project#89 hibernate manifest identity (model_loader/hibernate.py:_model_identity) is computed at the MATCH inside ServerArgs._handle_load_format BEFORE materialize_declarations(self), and again at the PARK in the worker, long after it. quantization is declared "gguf" at the head of that same handler, so every manifest was written with "gguf" while every subsequent boot compared None -- the identity could never match its own park, and sgl-project#89's fast restore was unreachable on GGUF, the only checkpoint class sgl-project#89 supports. The park kept reporting success and the mismatch silently fell back to a cold load that works, so nothing surfaced. Fixed by computing the identity through resolved_view, the mid-resolution equivalent of the post-materialization fields, so both sides read the same value. HIBERNATE_VERSION stays 2 -- manifests parked before the fix become matchable rather than invalid. Reach read off the metadata: of the nine identity fields only quantization and dtype are declarable at all, so the hazard was confined to those two; a residual (ModelRunner._sm80_dtype_fallback, worker-resolved after the match) is named and left open -- unreachable on sm80+, live only on the sm75 hetero host. FEATURE_CATALOG.md §12 conflict as expected (this branch and the already-merged sgl-project#514 both insert a new paragraph at the same point, right after the sgl-project#501 reclaim-then-decline test line): kept both, sgl-project#514's five paragraphs (two-stage-error, group-agreement, rank-local-verdict, fabricated-identity, value-pinning) first, sgl-project#499's "Resolution-ordering family" appended after -- no content overlap despite the shared "identity" theme (different mechanisms: server_args field declaration ordering vs. NVML->CUDA card index mapping). All 17 sections and every other additive paragraph verified present. Also fixed a missing blank-line paragraph separator this merge introduced, plus three more found from the earlier sgl-project#513/sgl-project#511 §12-header resolutions (cosmetic -- markdown paragraphs need a blank line between them or they render as one block; no content change). Tests (CUDA_VISIBLE_DEVICES=99, PYTHONPATH pinned to this worktree): - The five directly touched/new test files: 47 passed, 4 skipped, 0 failed -- confirms the "7 red -> 0" claim (test_decode_queue_cleanup.py, which failed earlier in this same session's sgl-project#514 verification pass, is now green). - test/registered/unit/distributed/ (full, since test_bar1_strand_is_opt_in.py lives there): 24 failed, 2147 passed, 8 skipped, 721 subtests -- unchanged from the established baseline. - ruff check --select=F401,F821,UP037: clean. - codespell: clean on all touched/added files.
efschu
added a commit
to efschu/htsglang
that referenced
this pull request
Aug 3, 2026
… pool -- established unreachable, not fixed sgl-project#487 audits whether the stock even-DCP allocator branch (model_runner_kv_cache_mixin.py, the else of the allocator chain -- which inflates both index space and page granularity by dcp_size, assuming a token-sharded pool) can ever run against a draft worker at --draft-kv-layout replicated (the default), whose pool sizing has the opposite geometry (draft_pool_is_replicated) and which the allocator selection never mentions. sgl-project#108 never audited this crossing. Answer established WITHOUT a boot, by enumerating every producer of is_draft_worker=True rather than assuming there is one shape: UNREACHABLE on CUDA. Given dcp_size > 1 the stock branch is taken exactly when rank_tp_ratio is None and not weightless_kv_active(); (1) a speculative draft worker cannot exist in that shape because ServerArgs._handle_dcp_validation refuses dcp_size>1 + speculation on CUDA unless the boot is uneven-weighted DCP or the weightless fast lane; (2) a sgl-project#274 dual-group-lane runner also sets is_draft_worker=True and is NOT speculative, so leg 1 misses it -- closed instead by _lane_server_args_view forcing view.dcp_size = 1. Leg 2 exists only because "a draft pool implies a speculative algorithm" turned out false once the producer set was enumerated, not assumed -- the new falsifier pins that set so a third producer lands as a red test instead of a wrong address. Residual, named rather than fixed: on HIP/ROCm leg 1 does not run (is_hip() short-circuits before the CUDA branch), so the crossing IS admitted there -- left alone, since this fork does not serve ROCm and a desk-guessed change to address computation is exactly the sgl-project#345 right-token/wrong-slot class waiting to happen. Also folds in docs(sgl-project#482): the ARM3_COMPUTE work-matched counter rule and its script updates (scripts/dev/394_s2_proof/). FEATURE_CATALOG.md §12 conflict as expected (this branch and the already-merged sgl-project#510/sgl-project#513/sgl-project#511 all insert a new family paragraph at the same point, right after the §12 header): kept all six additive paragraphs in sequence (Unauthenticated-state-change sgl-project#510, Incomplete-cache-key sgl-project#513, Unreachable-registration sgl-project#81/sgl-project#518, Byte-stride width sgl-project#109/sgl-project#112/sgl-project#512, Tolerance-that-cannot-fail sgl-project#380/sgl-project#511, Reach-before-fix sgl-project#487). All 17 sections and every other previously-preserved additive paragraph (two-axis §1, matrix doctrine §2, sgl-project#514's five families, sgl-project#499's resolution-ordering, MERGE-DUTY owner-sites + SITREP §12, NVENC §13) verified present. Tests (CUDA_VISIBLE_DEVICES=99, PYTHONPATH pinned to this worktree): - test_stock_dcp_allocator_reach_487.py alone: 20 passed. - test/registered/unit/distributed/ (full, since model_runner_kv_cache_mixin.py is touched): 24 failed, 2167 passed, 8 skipped, 723 subtests -- same 24 failing test IDs as the established baseline, byte-identical; the +20/+2 deltas are exactly this merge's own new test file. - ruff check --select=F401,F821,UP037: clean. - codespell: clean on all 8 touched/added files.
efschu
added a commit
to efschu/htsglang
that referenced
this pull request
Aug 3, 2026
…en3.8 day-0 ratchets docs(sgl-project#519): wheel-pin/expectation corrections in DESIGN_456_sparse_image_write.md, TICKET_398_mxfp4_validation.md, and rig-runbook.md. test(sgl-project#497): forward-compatibility-by-model_type, day-0 prep for a Qwen3.8 checkpoint that does not exist yet. The claim: the load path must key on model_type and on config FIELDS, never on a version string in the model name or a geometry constant -- then a new checkpoint reusing an existing model_type loads with no code change at all. Audited and CONFIRMED for both live paths: gguf_registry.create_gguf_adapter reads exactly model_type (no name_or_path in the registry); ServerArgs.declared_layer_kinds probes layer_types -> full_attention_interval -> all-attention from either the top level or text_config, so a different depth/interval needs nothing. Both now ratcheted with a literal sweep that ignores docstrings (parses and looks only at string literals the module evaluates, since the family is documented in prose everywhere -- a naive grep ratchet would be pure noise). Two findings recorded and deliberately NOT fixed: (1) an unregistered architecture does not refuse, it silently falls back to TransformersForCausalLM (models/registry.py:61-78), so a boot can succeed on the generic backend with none of this fork's features -- assert the resolved class at day 0 rather than trusting a green boot; (2) the M-RoPE declaration gap vLLM PR sgl-project#50068 closes upstream exists here too -- model_is_mrope is decided from config alone (true for text-only Qwen3.5/3.6) while qwen3_5.py sets is_mrope_enabled only on the ForConditionalGeneration classes, so prefill_cuda_graph_runner.py computes mrope positions and discards them. Closing it changes which positions a captured graph replays and needs a boot; characterised by tests that flip together when the fix lands, not fixed here. docs/dev/ANALYSE_495_qwen38_forward_compat.md has the full analysis. FEATURE_CATALOG.md §12 conflict as expected (this branch and all of sgl-project#510/sgl-project#513/sgl-project#511/sgl-project#487, already merged, insert a new paragraph at the same point after the §12 header): kept all seven additive paragraphs in sequence, this branch's "Forward-compatibility-by-model_type" appended last. All 17 sections and every other additive paragraph verified present. Docs + one new ratchet test only -- no production python/sglang/srt source touched (git diff --stat confirms empty for python/**/*.py), so no regression surface beyond the new test file itself. Tests (CUDA_VISIBLE_DEVICES=99, PYTHONPATH pinned to this worktree): - test_qwen38_forward_compat_497.py alone: 21 passed. - ruff check --select=F401,F821,UP037: clean. - codespell: clean on all 6 touched/added files.
efschu
added a commit
to efschu/htsglang
that referenced
this pull request
Aug 3, 2026
… medians, honest server state Three new server-side computed blocks the Monitor tab's landing poll now returns (all server-side so a curl client sees exactly what the page draws, per the runbook's "curl is a complete client" architecture rule): - server_state.py: a four-state discriminator (not_running | starting | running_no_metrics | running_with_metrics) that keys off an explicit API probe, never a metrics-scrape failure alone -- a connection-refused scrape used to be rendered as "no --enable-metrics", which is a different diagnosis than "not running at all". running_no_metrics is only ever reported with a passing API probe. - rate_medians.py: medians behind the rate tiles, windowed over PROCESSING polls only -- idle polls never enter the window, so an idle server still reports the median of what it did while working, not a zero-diluted average. - spill_tiers.py / tier_occupancy.py: one row per spill/offload tier type x place, with absent tiers PRINTED alongside their reason rather than hidden or shown as zero. Two tiers are deliberately never populated: the sgl-project#407 memtier registry (no production consumer, so reading it would print zeros that look measured) and the sgl-project#286 short-term register (no reachable byte ledger in this build) -- both documented as absent-by- construction, not omissions. webui.py and live_metrics.py wire these into the existing landing poll; metrics_reporter.py and metrics_collector.py get the small hooks the new blocks read from. Clean auto-merge on both touched docs (FEATURE_CATALOG.md and rig-runbook.md) -- neither had a conflicting edit on this line since this branch's base (3e3aca2, the sgl-project#510 merge). rig-runbook.md gains new §8.0 documenting the shell-only verification recipe (curl + three python3 one-liners for state/medians/tiers) and the restart requirement: the dashboard serves from one long-lived process, so a change is live only after that process restarts -- done as the merge step below, not mid-session. All 17 catalog sections and all 21 previously-preserved additive paragraphs verified present (two-axis §1, matrix doctrine §2, all six §12 families from sgl-project#510/sgl-project#513/sgl-project#511/sgl-project#487/qwen38-prep, sgl-project#514's five families + value-pinning, sgl-project#499's resolution-ordering, sgl-project#517's two sgl-project#459 paragraphs, MERGE-DUTY owner-sites + SITREP §12, NVENC §13). Tests (CUDA_VISIBLE_DEVICES=99, PYTHONPATH pinned to this worktree): - The six directly touched/new test files: 517 passed, 0 failed. - test/registered/unit/planner/ (full, HTSGLANG_TEST_MODEL_DIR set): 2337 passed, 1 skipped, 352 subtests -- no failures. - ruff check --select=F401,F821,UP037: 1 finding (live_metrics.py's LiveSnapshot import), confirmed pre-existing -- already unused in the pre-merge base, only mentioned in a docstring, the line just shifted from sgl-project#522's unrelated insertions above it. - codespell: 1 hit (webui.py:1786 "unparseable"), confirmed pre-existing at the identical line in the pre-merge base, in unrelated SVG chess-piece-parsing code this branch never touches.
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.