Skip to content

Commit

Permalink
reduce some waring for onnx export, add test code
Browse files Browse the repository at this point in the history
  • Loading branch information
Tlntin committed Jul 29, 2024
1 parent 9eeea23 commit 7ae6095
Show file tree
Hide file tree
Showing 5 changed files with 390 additions and 133 deletions.
10 changes: 5 additions & 5 deletions export/export_onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ def export_onnx(
attention_mask,
position_ids,
past_key_values,
None, # inputs_embeds: Optional[torch.FloatTensor] = None,
None, # labels: Optional[torch.LongTensor] = None,
True, # use_cache: Optional[bool] = None,
# None, # inputs_embeds: Optional[torch.FloatTensor] = None,
# None, # labels: Optional[torch.LongTensor] = None,
# True, # use_cache: Optional[bool] = None,
True, # output_attentions: Optional[bool] = None,
None, # output_hidden_states
False # return_dict:
# None, # output_hidden_states
# False # return_dict:
)
model.eval()
with torch.no_grad():
Expand Down
Loading

0 comments on commit 7ae6095

Please sign in to comment.