aphp / edsnlp

Modular, fast NLP framework, compatible with Pytorch and spaCy, offering tailored support for French clinical notes.
https://aphp.github.io/edsnlp/
BSD 3-Clause "New" or "Revised" License
112 stars 29 forks source link

Tiny BERT saving issue #317

Closed percevalw closed 3 weeks ago

percevalw commented 3 weeks ago

Description

Running the training tests with pretrained BERT "hf-internal-testing/tiny-bert" causes this issue:

You are trying to save a non contiguous tensor: `encoder.layer.0.attention.self.query.weight` 
which is not allowed. It either means you are trying to save tensors which are reference of each 
other in which case it's recommended to save only the full tensors, and reslice at load time, or 
simply call `.contiguous()