# \-100 in predictions

**URL:** <https://discuss.huggingface.co/t/100-in-predictions/132241>\
**Category:** Beginners\
**Created:** [December 19, 2024, 9:45am UTC](https://discuss.huggingface.co/t/100-in-predictions/132241 "2024-12-19T09:45:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thistlillo](https://avatars.discourse-cdn.com/v4/letter/t/51bf81/32.png) [@thistlillo](https://discuss.huggingface.co/u/thistlillo)\
**Post date:** [December 19, 2024, 9:45am UTC](https://discuss.huggingface.co/t/100-in-predictions/132241/1 "2024-12-19T09:45:30Z")

</div>

I am using the HuggingFace `Seq2SeqTrainer` with `predict_with_generate=True`.

I get the value `-100` in my predictions during the validation step. This makes the tokenizer fail (and has absolutely no sense).

Why?

I can share the code, but, based on my experience, a long piece of code turns readers away more easily than a short question.

---

<div class="post-metadata">

**Author:** ![thistlillo](https://avatars.discourse-cdn.com/v4/letter/t/51bf81/32.png) [@thistlillo](https://discuss.huggingface.co/u/thistlillo)\
**Post date:** [December 20, 2024, 7:34am UTC](https://discuss.huggingface.co/t/100-in-predictions/132241/2 "2024-12-20T07:34:14Z")

</div>

Where can I read how and with which tokens the generated sequences are padded?  
I cannot find any information on this.

These are the predictions I get (from `Seq2SeqTrainer` with `predict_with_generate=True`) when I set max\_new\_tokens=100:

```auto
preds[78]: [ 0 3 2 3247 3321 3155 3 2 1018 6327 3155 3
     2 1018 6327 3155 37 3 75 23 17436 19 3 9
     3 729 302 13 3 75 23 17436 7 24 619 16
     8 3 729 302 96 254 23 17436 121 1 -100 -100
  -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100
  -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100
  -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100
  -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100
  -100 -100 -100 -100]

```

The generated output is padded with the `label_pad_id=-100` instead of the tokenizer padding token. Why?

When I use pure PyTorch code the predictions are padded with the token “0”.
