We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
in python transformers module, there are lots of context(additional params) passing in forwarding
like LlamaModel
def forward( self, input_ids: torch.LongTensor = None, attention_mask: Optional[torch.Tensor] = None, position_ids: Optional[torch.LongTensor] = None, past_key_values: Optional[List[torch.FloatTensor]] = None, inputs_embeds: Optional[torch.FloatTensor] = None, use_cache: Optional[bool] = None, output_attentions: Optional[bool] = None, output_hidden_states: Optional[bool] = None, return_dict: Optional[bool] = None, cache_position: Optional[torch.LongTensor] = None, ) -> Union[Tuple, BaseModelOutputWithPast]: def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
pub trait Module<Ctx>: std::fmt::Debug + Send { fn forward(&self, xs: &Tensor, ctx: Option<Ctx>) -> Tensor; }
Is it a good solution?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
in python transformers module, there are lots of context(additional params) passing in forwarding
like LlamaModel
Is it a good solution?
The text was updated successfully, but these errors were encountered: