Skip to content

vllm.lora.ops.ipex_ops

Modules:

Name Description
lora_ops

__all__ module-attribute

__all__ = [
    "bgmv_expand",
    "bgmv_expand_slice",
    "bgmv_shrink",
]

bgmv_expand

bgmv_expand(
    inputs: Tensor,
    lora_b_weights: Tensor,
    output_tensor: Tensor,
    lora_indices_tensor: Tensor,
    add_inputs: bool = True,
) -> None
Source code in vllm/lora/ops/ipex_ops/lora_ops.py
def bgmv_expand(inputs: torch.Tensor,
                lora_b_weights: torch.Tensor,
                output_tensor: torch.Tensor,
                lora_indices_tensor: torch.Tensor,
                add_inputs: bool = True) -> None:
    ipex.llm.functional.bgmv_expand(inputs, lora_b_weights, output_tensor,
                                    lora_indices_tensor, add_inputs)

bgmv_expand_slice

bgmv_expand_slice(
    inputs: Tensor,
    lora_b_weights: Tensor,
    output_tensor: Tensor,
    lora_indices_tensor: Tensor,
    slice_offset: int,
    slice_size: int,
    add_inputs: bool = True,
) -> None
Source code in vllm/lora/ops/ipex_ops/lora_ops.py
def bgmv_expand_slice(inputs: torch.Tensor,
                      lora_b_weights: torch.Tensor,
                      output_tensor: torch.Tensor,
                      lora_indices_tensor: torch.Tensor,
                      slice_offset: int,
                      slice_size: int,
                      add_inputs: bool = True) -> None:
    ipex.llm.functional.bgmv_expand_slice(inputs, lora_b_weights,
                                          output_tensor, lora_indices_tensor,
                                          slice_offset, slice_size, add_inputs)

bgmv_shrink

bgmv_shrink(
    inputs: Tensor,
    lora_a_weights: Tensor,
    output_tensor: Tensor,
    lora_indices_tensor: Tensor,
    scaling: float = 1.0,
) -> None
Source code in vllm/lora/ops/ipex_ops/lora_ops.py
def bgmv_shrink(inputs: torch.Tensor,
                lora_a_weights: torch.Tensor,
                output_tensor: torch.Tensor,
                lora_indices_tensor: torch.Tensor,
                scaling: float = 1.0) -> None:

    ipex.llm.functional.bgmv_shrink(inputs, lora_a_weights, output_tensor,
                                    lora_indices_tensor, scaling)