AI 热点

megatron_server错配logprobs修复

UCSD Hao AI Lab更新于 12月4日 04:45

(2/8) Silent wrong teacher logprobs: after one worker crashes and restarts in megatron_server, later requests receive another request's logprobs with HTTP 200.

AI 导读

Hao AI Lab修复了megatron_server在Ray worker崩溃重启后,将后续批次错配给旧请求并返回错误teacher logprobs的问题。worker运行ID与批次ID机制可立即标记丢失批次;此前3轮复现中每轮10个HTTP 200响应有6至7个错配,修复后3轮均为零错配。

正文

(2/8) Silent wrong teacher logprobs: after one worker crashes and restarts in megatron_server, later requests receive another request's logprobs with HTTP 200.

In megatron_server, a Ray worker pulls batches from SampleManager, computes logprobs on GPUs, and sends them back. Meanwhile, SampleManager tracks waiting requests in a FIFO queue, assuming results return in order. When that worker crashes, Ray restarts it fresh and drops the running batches. However, those lost requests stay at the front of the queue. As a result, every later batch matches an older request, sending wrong logprobs to clients while newer requests hang.

Reproduction: Killing the worker once while 2 batches were running made every reply after restart (6 to 7 out of 10 HTTP 200 responses) carry another request's logprobs across 3 runs.

Our fix: We give each worker run its own ID, so SampleManager fails lost batches right away and matches replies by batch ID. With this fix, all 3 runs had zero mismatches.

PR: https://t.co/XZjLyun1oM

来源

UCSD Hao AI Lab