[Docs] optimize and supplement docs system (#86)

Signed-off-by: Gaohan123 <gaohan19@huawei.com>
This commit is contained in:
Gao Han authored and GitHub committed 2025-11-28 11:03:52 +08:00
1 parent 38f58064eb
commit db81ee9f69
75 files changed
+2452 -512

No files matched your search

+16
View File
@@ -13,7 +13,23 @@ from vllm_omni.worker.gpu_ar_model_runner import GPUARModelRunner
class GPUARWorker(GPUWorker):
"""GPU worker for autoregressive omni model stages.
Extends the base GPUWorker to initialize and manage autoregressive
model runners for text generation stages (e.g., thinker stages).
"""
def init_device(self):
"""Initialize the GPU device and autoregressive model runner.
Sets up CUDA device, initializes distributed environment,
sets random seed, and creates a GPUARModelRunner instance.
Raises:
ValueError: If free GPU memory is insufficient for the
requested memory utilization
RuntimeError: If device type is not supported
"""
if self.device_config.device.type == "cuda":
# This env var set by Ray causes exceptions with graph building.
os.environ.pop("NCCL_ASYNC_ERROR_HANDLING", None)
+17
View File
@@ -13,7 +13,24 @@ from vllm_omni.worker.gpu_diffusion_model_runner import GPUDiffusionModelRunner
class GPUDiffusionWorker(GPUWorker):
"""GPU worker for diffusion-based omni model stages.
Extends the base GPUWorker to initialize and manage diffusion model
runners for non-autoregressive generation stages (e.g., image or
audio generation stages).
"""
def init_device(self):
"""Initialize the GPU device and diffusion model runner.
Sets up CUDA device, initializes distributed environment,
sets random seed, and creates a GPUDiffusionModelRunner instance.
Raises:
ValueError: If free GPU memory is insufficient for the
requested memory utilization
RuntimeError: If device type is not supported
"""
if self.device_config.device.type == "cuda":
# This env var set by Ray causes exceptions with graph building.
os.environ.pop("NCCL_ASYNC_ERROR_HANDLING", None)
+19
View File
@@ -30,7 +30,26 @@ logger = init_logger(__name__)
class OmniGPUModelRunner(GPUModelRunner):
"""GPU model runner for omni models with M-RoPE support.
Extends the base GPUModelRunner to handle multimodal rotary position
embeddings (M-RoPE) for processing image, video, and audio inputs
with proper positional encoding.
"""
def _init_mrope_positions(self, req_state: CachedRequestState):
"""Initialize M-RoPE positions for multimodal inputs.
Extracts multimodal feature metadata (image grids, video grids,
audio features) and computes M-RoPE positions for proper positional
encoding of multimodal tokens.
Args:
req_state: Cached request state containing multimodal features
Raises:
AssertionError: If the model does not support M-RoPE
"""
image_grid_thw = []
video_grid_thw = []
second_per_grid_ts = []