Skip to content

vllm_omni.model_executor.models.voxcpm2

Modules:

Name Description
minicpm4_hf_compat

fp32 RoPE + MLP matching native VoxCPM2 numerics.

minicpm4_paged

MiniCPM4 with PagedAttention + fp32 RoPE/RMSNorm for VoxCPM2.

pipeline

VoxCPM2 pipeline topology (frozen).

voxcpm2_import_utils

Dynamic import utilities for the native VoxCPM2 package.

voxcpm2_talker

VoxCPM2 AR talker — PagedAttention pipeline with per-request state.

VoxCPM2TalkerForConditionalGeneration

Bases: Module

config instance-attribute

config = hf_config

has_postprocess instance-attribute

has_postprocess = True

has_preprocess instance-attribute

has_preprocess = True

have_multimodal_outputs instance-attribute

have_multimodal_outputs = True

hf_to_vllm_mapper class-attribute instance-attribute

hf_to_vllm_mapper = WeightsMapper(
    orig_to_new_prefix={"base_lm.": "model."}
)

make_empty_intermediate_tensors instance-attribute

make_empty_intermediate_tensors = (
    make_empty_intermediate_tensors
)

model instance-attribute

model = MiniCPM4PagedForVoxCPM2(
    vllm_config=vllm_config,
    prefix=maybe_prefix(prefix, "model"),
)

residual_model instance-attribute

residual_model = MiniCPM4PagedResidualLM(
    vllm_config=vllm_config,
    prefix=maybe_prefix(prefix, "residual_model"),
)

tts property

tts: Module

vllm_config instance-attribute

vllm_config = vllm_config

compute_logits

compute_logits(
    hidden_states: Tensor | OmniOutput,
    sampling_metadata: Any = None,
) -> Tensor | None

embed_input_ids

embed_input_ids(input_ids: Tensor, **_: Any) -> Tensor

forward

forward(
    input_ids: Tensor,
    positions: Tensor,
    intermediate_tensors: IntermediateTensors | None = None,
    inputs_embeds: Tensor | None = None,
    **kwargs: Any,
) -> Tensor | IntermediateTensors

load_weights

load_weights(
    weights: Iterable[tuple[str, Tensor]],
) -> set[str]

make_omni_output

make_omni_output(
    model_outputs: Tensor | OmniOutput, **kwargs: Any
) -> OmniOutput

on_requests_finished

on_requests_finished(
    finished_req_ids: set[str] | list[str],
) -> None

postprocess

postprocess(
    hidden_states: Tensor, **info: Any
) -> dict[str, Any]

preprocess

preprocess(
    input_ids: Tensor,
    input_embeds: Tensor | None,
    **info_dict: Any,
) -> tuple[Tensor, Tensor, dict[str, Any]]