  max_source_length = 512
  max_target_length = 128
# Suppose we have the following 2 training examples:
  input_sequence_1 = "Welcome to NYC"
  output_sequence_1 = "Bienvenue à NYC"
input_sequence_2 = "HuggingFace is a company"
  output_sequence_2 = "HuggingFace est une entreprise"
# encode the inputs
  task_prefix = "translate English to French: "
  input_sequences = [input_sequence_1, input_sequence_2]
  encoding = tokenizer(
      [task_prefix + sequence for sequence in input_sequences],
      padding="longest",
      max_length=max_source_length,
      truncation=True,
      return_tensors="pt",
  )
  input_ids, attention_mask = encoding.input_ids, encoding.attention_mask
# encode the targets
  target_encoding = tokenizer(
      [output_sequence_1, output_sequence_2], padding="longest", max_length=max_target_length, truncation=True
