[PluggableLayer][3/N] Apply PluggableLayer to llm_head and vocab embedding layer (#33465)

Signed-off-by: whx-sjtu <2952154980@qq.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Hexiang Wang
2026-04-10 16:12:59 +08:00
committed by GitHub
co-authored by mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent ad720aefe9
commit 1dfd64c1cc
2 changed files with 8 additions and 11 deletions
@@ -9,14 +9,14 @@ from vllm.distributed import (
tensor_model_parallel_all_gather,
tensor_model_parallel_gather,
)
from vllm.model_executor.custom_op import CustomOp
from vllm.model_executor.custom_op import PluggableLayer
from vllm.model_executor.layers.vocab_parallel_embedding import VocabParallelEmbedding
from vllm.platforms import current_platform
# --8<-- [start:logits_processor]
@CustomOp.register("logits_processor")
class LogitsProcessor(CustomOp):
@PluggableLayer.register("logits_processor")
class LogitsProcessor(PluggableLayer):
"""Process logits and apply logits processors from sampling metadata.
This layer does the following: