(
config, input_ids, attention_mask=None,
)
| 99 | |
| 100 | |
| 101 | def prepare_bart_inputs_dict( |
| 102 | config, input_ids, attention_mask=None, |
| 103 | ): |
| 104 | if attention_mask is None: |
| 105 | attention_mask = input_ids.ne(config.pad_token_id) |
| 106 | return { |
| 107 | "input_ids": input_ids, |
| 108 | "attention_mask": attention_mask, |
| 109 | } |
| 110 | |
| 111 | |
| 112 | @require_torch |
no outgoing calls
no test coverage detected