File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
vllm/model_executor/layers Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 66from typing import Optional
77
88import torch
9- import torch .nn as nn
109
1110import vllm .envs as envs
1211from vllm .distributed import (tensor_model_parallel_all_gather ,
1312 tensor_model_parallel_gather )
13+ from vllm .model_executor .custom_op import CustomOp
1414from vllm .model_executor .layers .vocab_parallel_embedding import (
1515 VocabParallelEmbedding )
1616from vllm .model_executor .sampling_metadata import SamplingMetadata
2222 envs .VLLM_LOGITS_PROCESSOR_THREADS )
2323
2424
25- class LogitsProcessor (nn .Module ):
25+ @CustomOp .register ("logits_processor" )
26+ class LogitsProcessor (CustomOp ):
2627 """Process logits and apply logits processors from sampling metadata.
2728
2829 This layer does the following:
Original file line number Diff line number Diff line change @@ -429,6 +429,7 @@ def extra_repr(self) -> str:
429429 return s
430430
431431
432+ @CustomOp .register ("parallel_lm_head" )
432433class ParallelLMHead (VocabParallelEmbedding ):
433434 """Parallelized LM head.
434435
You can’t perform that action at this time.
0 commit comments