Repository navigation
Improve Chinese character streaming when the last char is half Chinese word. - #95
Merged
Merged
Conversation
5 tasks done
timethink
pushed a commit
to timethink/sglang
that referenced
this pull request
Mar 9, 2025
pi314ever
pushed a commit
to pi314ever/sglang
that referenced
this pull request
Aug 1, 2025
) Signed-off-by: Rahul Vijayaraghavan <[email protected]>
CaoE
referenced
this pull request
in CaoE/sglang
Nov 20, 2025
apinge
referenced
this pull request
in apinge/sglang
Dec 15, 2025
* add fused set kv * fix bug * comp with qwen235moe * format lint
vschandramourya
pushed a commit
to vschandramourya/sglang
that referenced
this pull request
Feb 3, 2026
efschu
added a commit
to efschu/htsglang
that referenced
this pull request
Jul 18, 2026
…rve default (sgl-project#95) All 4 errors were red at the base commit: sgl-project#68 changed the --rank-auto-reserve-mib default from the flat 2048 MiB to the demand-derived 'auto' sentinel without updating this test. - test_defaults now asserts the 'auto' sentinel (ServerArgs.AUTO_RANK_MEMORY_RESERVE_MIB) instead of int(...) == 2048. - The three TestAutoRatio arithmetic tests pin rank_auto_reserve_mib=2048 explicitly: their documented budget math (min(total - 2048, free - 1024)) is exact and device-independent that way, while the 'auto' default would route through the capacity-tier derivation (which needs the device capacity and cuda_graph_config the short-circuited ServerArgs stub lacks). - New test_auto_reserve_auto_derives_from_demand completes the stub for the 'auto' path (real default CudaGraphConfig, mocked get_device_memory_capacity, capture term disabled) and asserts the wiring: budgets == min(total - derived_rank_auto_reserve_mib(...), free - 1024), uniform cards still collapse to the even split. No production code touched; the auto-derive path behaves correctly on a minimal ServerArgs once the stub is complete. File green: 63/63 (was 59/63 at base).
efschu
added a commit
to efschu/htsglang
that referenced
this pull request
Jul 18, 2026
…rve default (sgl-project#95) All 4 errors were red at the base commit: sgl-project#68 changed the --rank-auto-reserve-mib default from the flat 2048 MiB to the demand-derived 'auto' sentinel without updating this test. - test_defaults now asserts the 'auto' sentinel (ServerArgs.AUTO_RANK_MEMORY_RESERVE_MIB) instead of int(...) == 2048. - The three TestAutoRatio arithmetic tests pin rank_auto_reserve_mib=2048 explicitly: their documented budget math (min(total - 2048, free - 1024)) is exact and device-independent that way, while the 'auto' default would route through the capacity-tier derivation (which needs the device capacity and cuda_graph_config the short-circuited ServerArgs stub lacks). - New test_auto_reserve_auto_derives_from_demand completes the stub for the 'auto' path (real default CudaGraphConfig, mocked get_device_memory_capacity, capture term disabled) and asserts the wiring: budgets == min(total - derived_rank_auto_reserve_mib(...), free - 1024), uniform cards still collapse to the even split. No production code touched; the auto-derive path behaves correctly on a minimal ServerArgs once the stub is complete. File green: 63/63 (was 59/63 at base).
efschu
added a commit
to efschu/htsglang
that referenced
this pull request
Jul 22, 2026
…rve default (sgl-project#95) All 4 errors were red at the base commit: sgl-project#68 changed the --rank-auto-reserve-mib default from the flat 2048 MiB to the demand-derived 'auto' sentinel without updating this test. - test_defaults now asserts the 'auto' sentinel (ServerArgs.AUTO_RANK_MEMORY_RESERVE_MIB) instead of int(...) == 2048. - The three TestAutoRatio arithmetic tests pin rank_auto_reserve_mib=2048 explicitly: their documented budget math (min(total - 2048, free - 1024)) is exact and device-independent that way, while the 'auto' default would route through the capacity-tier derivation (which needs the device capacity and cuda_graph_config the short-circuited ServerArgs stub lacks). - New test_auto_reserve_auto_derives_from_demand completes the stub for the 'auto' path (real default CudaGraphConfig, mocked get_device_memory_capacity, capture term disabled) and asserts the wiring: budgets == min(total - derived_rank_auto_reserve_mib(...), free - 1024), uniform cards still collapse to the even split. No production code touched; the auto-derive path behaves correctly on a minimal ServerArgs once the stub is complete. File green: 63/63 (was 59/63 at base).
efschu
added a commit
to efschu/htsglang
that referenced
this pull request
Jul 22, 2026
…city/feasibility/split, never tok/s Pure-library planner over the fork's EXISTING parse-time sizing math -- no formula is re-implemented: * PlanInputs (uneven_perf.py): the small boot-free input contract of PerfCostModel (design sgl-project#97 §2.1), incl. per-card effective_vram_mib budgets (§2.5) and manual-edit override fields (§2.6). PerfCostModel now takes PlanInputs; the boot path builds it via PlanInputs.from_server_args at its single call site, so server and offline planner run identical sizing code (the §5 sync guarantee). * sglang/srt/planner/: hardware.py (HardwareSpec; NVML via the rig-dashboard sample_nvml -> nvidia-smi -> MANUAL spec fallback -- fully offline-capable), model.py (HF config.json / .gguf / hub-config-only resolution, never weights), plan.py (derive_auto_plan: pure lift of _resolve_auto_rank_tp_ratio; reserve formulas called UNBOUND from the real ServerArgs methods), capacity.py (predict_capacity wrapper), feasibility.py (auto + manual-edit validation mirroring _handle_uneven_tp; fail-loud naming card/ranks/limit), advantage.py (stock-even-TP contrast: feasibility reasons + capacity-% RANGE; measured scores cache-only, gated to live-NVML specs). * python -m sglang.planner CLI: fit verdict, split + launch flags, per-rank VRAM breakdown, max-KV estimate, advantage vs stock. * Honesty is structural (§3.4): no planner dataclass carries a throughput-shaped field; a CPU test enforces it. Tests: test/registered/unit/planner/test_planner_core.py -- 33 passed (CPU-only; manual 5090+2x3080 rig, synthetic sparse checkpoints). Regression: test_uneven_tp_args / _mlp_solver / _partition / _memory identical pass/fail sets before and after the refactor (the 8 failures are pre-existing on integration/r1, the sgl-project#95 testfix lives on other branches); mlp_solver+partition (direct PerfCostModel consumers) fully green. Manual CLI runs: Qwen3.6-27B-AWQ TP=3 (fits, stock cannot shard 4 KV heads / 544-unit FFN across 3), TP=4 co-location 0,0,1,2 with --plan-free-reserve-gb, dense GGUF Q3_K_M (68-unit grid), physical impossibility rejection 2x20000 MiB on the 32607-MiB card.
efschu
added a commit
to efschu/htsglang
that referenced
this pull request
Jul 22, 2026
…rve default (sgl-project#95) All 4 errors were red at the base commit: sgl-project#68 changed the --rank-auto-reserve-mib default from the flat 2048 MiB to the demand-derived 'auto' sentinel without updating this test. - test_defaults now asserts the 'auto' sentinel (ServerArgs.AUTO_RANK_MEMORY_RESERVE_MIB) instead of int(...) == 2048. - The three TestAutoRatio arithmetic tests pin rank_auto_reserve_mib=2048 explicitly: their documented budget math (min(total - 2048, free - 1024)) is exact and device-independent that way, while the 'auto' default would route through the capacity-tier derivation (which needs the device capacity and cuda_graph_config the short-circuited ServerArgs stub lacks). - New test_auto_reserve_auto_derives_from_demand completes the stub for the 'auto' path (real default CudaGraphConfig, mocked get_device_memory_capacity, capture term disabled) and asserts the wiring: budgets == min(total - derived_rank_auto_reserve_mib(...), free - 1024), uniform cards still collapse to the even split. No production code touched; the auto-derive path behaves correctly on a minimal ServerArgs once the stub is complete. File green: 63/63 (was 59/63 at base).
5 tasks
ihciah
pushed a commit
to ihciah/sglang
that referenced
this pull request
Nov 25, 2026
…iled on (sgl-project#95) Two gaps between this router and the SGLang servers it fronts. /health: SGLang engines and sgl-model-gateway answer liveness on /health; this router only on /healthz, so a probe or script written for either got 404 here. /health now routes to the same liveness handler as /healthz (always 200) and is logged like the other infra probes (DEBUG on success). POST /flush_cache: the fan-out to every registered worker (plain, prefill and decode) was correct, but a refusing worker was reported only as "HTTP 400 Bad Request", and neither the response message nor the warning line said which worker refused. SGLang answers 400 without flushing while it has running or waiting requests, so a flush sent while a prefill/decode pair is serving returns 502 with no way to tell which side refused or why. Each failed worker's error now carries the start of its answer (at most 512 bytes, whitespace collapsed: "HTTP 400 Bad Request: Flush cache failed."), and the message and the warning list every failed worker with its error. Status codes are unchanged: 200 when every worker flushed, 502 otherwise. Tests: - routes/health.rs health_is_served_as_liveness: GET /health is 200. - routes/cache.rs refused_flush_names_the_worker_and_its_answer: one worker flushes, one answers 400 "Flush cache failed."; the 502 names the refusing worker with its answer and does not list the other. - routes/cache.rs refusal_answer_is_bounded: an 8 KiB answer is cut. All three fail on the release line before this change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Currently when the last word is Chinese, but only the first-half, the streaming will be delayed until the next chunk containing a full word -- occasionally delayed by three chunks or more.
Add a check if the penultimate token is a full Chinese word and stream the full words in that case.