[Doc] Cleanup non-english comments (#125)

Signed-off-by: Roger Wang <hey@rogerw.io>
This commit is contained in:
Roger Wang authored and GitHub committed 2025-11-30 16:45:30 -08:00
1 parent 90ba189232
commit 7391db62d1
3 files changed
+8 -8

No files matched your search

+5 -5
View File
@@ -449,15 +449,15 @@ AsyncLLM.add_request()
↓ ↓
OutputProcessor.add_request() OutputProcessor.add_request()
↓ ↓
RequestState.from_new_request() → 创建请求状态 RequestState.from_new_request() → create request state
AsyncLLM.__init__() / AsyncLLM.generate() / AsyncLLM.encode() → 创建一个Background loop 持续从EngineCore获取输出 AsyncLLM.__init__() / AsyncLLM.generate() / AsyncLLM.encode() → create a background loop that continuously pulls output from EngineCore
↓ ↓
OutputProcessor.process_outputs() → 更新状态并处理输出 OutputProcessor.process_outputs() → update state and process outputs
↓ ↓
RequestState.make_request_output() → 转换为最终输出,格式为RequestOutput或者PoolingRequestOutput RequestState.make_request_output() → convert to the final output, formatted as RequestOutput or PoolingRequestOutput
↓ ↓
RequestOutputCollector.put() → 推送到队列(AsyncLLM) RequestOutputCollector.put() → push to the queue (AsyncLLM)
``` ```
Need to add implementation for an existing method Need to add implementation for an existing method
@@ -4,7 +4,7 @@ from typing import Optional
def extract_prompt(line: str) -> Optional[str]: def extract_prompt(line: str) -> Optional[str]:
# 提取第一个 '|' 与第二个 '|' 之间的内容 # Extract the content between the first '|' and the second '|'
i = line.find("|") i = line.find("|")
if i == -1: if i == -1:
return None return None
@@ -519,9 +519,9 @@ class Qwen3OmniMoeForConditionalGeneration(
tts_eos_thinker=tts_eos_thinker, tts_eos_thinker=tts_eos_thinker,
tts_pad_thinker=tts_pad_thinker, tts_pad_thinker=tts_pad_thinker,
) )
# req_embeds: [S,D], req_input_ids: [S] → map到当前 span # req_embeds: [S,D], req_input_ids: [S] → map onto the current span
seg_len = min(span_len, req_embeds.shape[0]) seg_len = min(span_len, req_embeds.shape[0])
# 强制对齐 dtype/device/内存布局,避免精度或布局差异导致比较不相等 # Force-align dtype/device/memory layout to avoid mismatches from precision or layout differences
inputs_embeds[s : s + seg_len] = ( inputs_embeds[s : s + seg_len] = (
req_embeds[:seg_len].to(device=inputs_embeds.device, dtype=inputs_embeds.dtype).contiguous() req_embeds[:seg_len].to(device=inputs_embeds.device, dtype=inputs_embeds.dtype).contiguous()
) )