Skip to content

serve: no SIGPIPE on disconnect, tokenizer EOS, producer cache flags (#214, #229, #241) - #281

Merged
gspark-etri merged 1 commit into
optimus-rmfrom
fix/214-serving-http
Oct 30, 2026
Merged

gspark-etri merged 1 commit into
optimus-rmfrom
fix/214-serving-http

Conversation

@gspark-etri

Copy link
Copy Markdown
Collaborator

Background

Three serving fixes from a draft stack: a client disconnect during an HTTP response could deliver SIGPIPE to a vendor-installed handler (#214); chat checkpoints whose generation_config keeps a base-model EOS never stopped on the tokenizer's EOS (#229); the Torch PD producer had no flags for chunk size or prefix caching (#241).

Changes

Verification

  • pytest -q tests/test_http_sigpipe.py tests/test_serving_eos_factory.py tests/test_serving_prefill_cache.py: 13 passed.
  • The new handler test fails (1 failed, 2 passed) with the setup() override removed, and the whole file fails to import against optimus-rm's llmd.py.
  • Full suite: CI (cpu-tests).

Compatibility and limits

  • On platforms without MSG_NOSIGNAL the flag is 0 (previous behaviour); the signal test is skipped there.
  • The writer is unbuffered, as BaseHTTPRequestHandler's default wfile already is.
  • Producer flags only affect --pd-prefill-device (Torch producer); defaults match previous behaviour (chunk 2048, prefix cache on).

Related Issue

Closes #214
Closes #229
Closes #241

Supersedes #215, #230, #242.

🤖 Generated with Claude Code

…214, #229, #241)

- llmd: HTTP handler writes via MSG_NOSIGNAL so a client disconnect raises
  BrokenPipeError instead of hitting a vendor SIGPIPE handler (#215).
- serve_batched: add the tokenizer EOS to generation_config EOS ids (#230);
  --pd-prefill-chunk / --pd-prefill-no-prefix-cache for the Torch producer (#242).
- test that serve_stage's handler actually writes through the no-signal writer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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