"src/diffusers/training_utils.py" did not exist on "c31736a4a498db269d4bb5d0d368b878bc3c578a"
Unverified Commit 2c05f81f authored by Yineng Zhang's avatar Yineng Zhang Committed by GitHub
Browse files

fix custom op version compatibility (#2988)

parent d77caa2b
......@@ -27,7 +27,7 @@ runtime_common = [
]
srt = [
"sglang[runtime_common]", "cuda-python",
"sgl-kernel>=0.0.2.post14", "torch", "vllm>=0.6.3.post1,<=0.6.4.post1",
"sgl-kernel>=0.0.2.post14", "torch", "vllm==0.6.4.post1",
"flashinfer==0.1.6"
]
......
......@@ -8,6 +8,8 @@ import torch
import torch.nn as nn
from vllm.model_executor.custom_op import CustomOp
from sglang.srt.layers.custom_op_util import register_custom_op
def _rotate_neox(x: torch.Tensor) -> torch.Tensor:
x1 = x[..., : x.shape[-1] // 2]
......@@ -51,7 +53,7 @@ def _apply_rotary_emb(
return torch.stack((o1, o2), dim=-1).flatten(-2)
@CustomOp.register("rotary_embedding")
@register_custom_op("sglang_rotary_embedding")
class RotaryEmbedding(CustomOp):
"""Original rotary positional embedding."""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment