Slightly improve the sampler to skip unnecessary steps (#6956)

This commit is contained in:
Lianmin Zheng
2025-06-08 03:18:54 -07:00
committed by GitHub
parent 6c0a48282a
commit 608668e143
7 changed files with 109 additions and 93 deletions
@@ -852,7 +852,7 @@ class TokenizerManager:
obj.load_format = self.server_args.load_format
logger.info("Start update_weights. Load format=%s", obj.load_format)
if True:
if True: # Keep this redundant check to simplify some internal code sync
# Hold the lock if it is not async. This means that weight sync
# cannot run while requests are in progress.
async with self.model_update_lock.writer_lock: