Question 1: Short answer
easyAI-checkedNLP TasksA BERT fine-tuning dataset truncates each (premise, hypothesis) pair like this:
def _truncate_pair_of_tokens(self, p_tokens, h_tokens):
# Reserve slots for '<CLS>', '<SEP>', and '<SEP>'
while len(p_tokens) + len(h_tokens) > self.max_len - 3:
if len(p_tokens) > len(h_tokens):
p_tokens.pop()
else:
h_tokens.pop()
With max_len = 32, a premise of 40 tokens and a hypothesis of 10 tokens, how many premise
tokens remain?