nlp-with-transformers / notebooks

Jupyter notebooks for the Natural Language Processing with Transformers book
https://transformersbook.com/
Apache License 2.0
3.92k stars 1.23k forks source link

Ch 4: results not reproducible for predictions for text example #55

Closed anita-clmnt-rvu closed 2 years ago

anita-clmnt-rvu commented 2 years ago

Information

The problem arises in chapter:

Describe the bug

The NER predictions (in terms of tags) on the Jack Sparrow example are odd and don't match those from the book. They also change each time you re-run all the code above. The tokenization looks fine so the issue seems to be coming from the model itself. Bug encountered locally and in Google colab.

To Reproduce

Steps to reproduce the behavior:

  1. Open 04_multilingual-ner.ipynb in Colab
  2. Run all the cells up to #115 (included)
  3. Check the output of cell 115

Expected behavior

I was expecting to get relevant tags as found in the book for cell 115 ie. [O I-LOC B-LOC B-LOC O I-LOC O O I-LOC B-LOC].