Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions vllm/model_executor/models/bart.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
from vllm.model_executor.sampling_metadata import SamplingMetadata
from vllm.sequence import IntermediateTensors

from .interfaces import SupportsV0Only
from .interfaces import SupportsQuant, SupportsV0Only
from .utils import maybe_prefix

logger = logging.get_logger(__name__)
Expand Down Expand Up @@ -697,7 +697,7 @@ def forward(
return hidden_states


class BartModel(nn.Module):
class BartModel(nn.Module, SupportsQuant):
_tied_weights_keys = [
"encoder.embed_tokens.weight", "decoder.embed_tokens.weight"
]
Expand Down Expand Up @@ -763,7 +763,8 @@ def forward(self, input_ids: torch.Tensor, positions: torch.Tensor,
return decoder_outputs


class BartForConditionalGeneration(nn.Module, SupportsV0Only):
class BartForConditionalGeneration(nn.Module, SupportsV0Only, SupportsQuant):
packed_modules_mapping = {"qkv_proj": ["q_proj", "k_proj", "v_proj"]}
base_model_prefix = "model"

def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
Expand Down