Skip to content

weight cache deamon - #1083

Open
liusy58 wants to merge 1 commit into
lightseekorg:mainfrom
liusy58:weight_cache
Open

weight cache deamon#1083
liusy58 wants to merge 1 commit into
lightseekorg:mainfrom
liusy58:weight_cache

Conversation

@liusy58

@liusy58 liusy58 commented Aug 13, 2026

Copy link
Copy Markdown

Summary

Test Plan

@liusy58
liusy58 requested a review from a team as a code owner August 13, 2026 14:20

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 13d28b35cb

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +589 to +591
weight_cache_daemon_procs = None
if getattr(server_args, "weight_cache_mode", "off") == "daemon":
weight_cache_daemon_procs = _launch_weight_cache_daemons(server_args)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep supervising daemon PIDs after launch

In engine-managed daemon mode, the Popen handles returned here are kept only in this local and are never retained or polled after _launch_subprocesses returns. If a weight-cache daemon crashes after schedulers have imported its CUDA IPC tensors, it can remain as an unreaped zombie under this parent; the IPC loader watchdog checks liveness with os.kill(pid, 0), which still succeeds for zombies, so the engine can continue using dangling IPC mappings instead of terminating. Keep these processes owned by the engine lifetime and reap/supervise them when they exit.

Useful? React with 👍 / 👎.

Comment on lines +78 to +83
weight_cache_mode = getattr(server_args, "weight_cache_mode", "off")
use_weight_cache = weight_cache_mode != "off"

# Create load config
load_config = LoadConfig(
load_format=server_args.load_format,
load_format=("ipc_cache" if use_weight_cache else server_args.load_format),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Don't route draft model loads through the target cache

When speculative decoding uses a separate draft model, WeightLoader.load_model is called for the draft runner as well, but this global weight_cache_mode switch forces the draft load to use ipc_cache and the same per-rank socket. The daemon launcher only caches server_args.model, so the draft runner connects to the target model's daemon and fails the CacheConfig check instead of loading the draft weights from disk. Gate IPC loading to the target model or pass draft-aware cache settings.

Useful? React with 👍 / 👎.

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