MCPcopy Create free account
hub / github.com/OpenGVLab/EfficientQAT / forward

Method forward

quantize/utils.py:16–22  ·  view source on GitHub ↗
(self,
        hidden_states: torch.Tensor,
        attention_mask: Optional[torch.Tensor] = None,
        position_ids: Optional[torch.LongTensor] = None)

Source from the content-addressed store, hash-verified

14 self.block_list.append(block)
15
16 def forward(self,
17 hidden_states: torch.Tensor,
18 attention_mask: Optional[torch.Tensor] = None,
19 position_ids: Optional[torch.LongTensor] = None):
20 for block in self.block_list:
21 hidden_states = block(hidden_states, attention_mask=attention_mask,position_ids=position_ids)[0]
22 return (hidden_states, )
23
24
25def set_weight_parameters(model, requires_grad):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected