Commit 77c469e1 authored by Junming Wu's avatar Junming Wu Committed by binmakeswell
Browse files

[NFC] polish applications/Chat/coati/models/base/actor.py code style (#4248)

parent 915ed8be
......@@ -21,16 +21,13 @@ class Actor(LoRAModule):
self.model = model
self.convert_to_lora()
def forward(self,
input_ids: torch.LongTensor,
attention_mask: Optional[torch.Tensor] = None,
**model_kwargs, # HACK: `generate` method may pass more kwargs
) -> torch.Tensor:
def forward(
self,
input_ids: torch.LongTensor,
attention_mask: Optional[torch.Tensor] = None,
**model_kwargs, # HACK: `generate` method may pass more kwargs
) -> torch.Tensor:
"""Returns model output.
"""
output = self.model(
input_ids,
attention_mask=attention_mask,
**model_kwargs
)
output = self.model(input_ids, attention_mask=attention_mask, **model_kwargs)
return output
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment