Repository navigation
Is it possible to port older Spacy models to newer Spacy versions? #14027
Replies: 1 comment
|
It appears that it is not possible to smoothly move from SpaCy model 3.1 to 3.5 since the inference and results would not be identical. It is important to point out that the SpaCy pipeline is based on a specific version of the library, since the data structures it uses to store and predict information about tokens are frequently altered when moving from one version to another. Thus, if you wish to go from version 3.1 to 3.5, you will have two choices. The way to proceed would be to download the most recent models, which have been trained on the 3.5th version of the library, since they might give slightly different predictions and morphology compared to the ones currently in use. A second possibility is to retrain the model from the beginning by using the same data that was originally employed for training the version 3.5. There are cases in which people try to get their previously trained models to work by altering certain files in the model's data folder in order to trick the new version of SpaCy into thinking that it is the old one. The SpaCy team do not advise this practice since it might result in errors and unexpected behaviours as a consequence of changes to the underlying structure between versions. The morphologizer and tagger usually encounter problems when loading older pipelines, so in most cases it is advisable to retrain your model from scratch if you are using a different version of SpaCy in order to make sure that your results are not influenced by the changes made to the library. |
Uh oh!
There was an error while loading. Please reload this page.
I have a project I’d like to update from spacy 3.1.4 to 3.5, which uses the associated spacy models and the old method for accessing morphology. Is it at all possible to port these models (I believe lg and trf) to be compatible with 3.5? I want to preserve the same inference and output behavior in my system.
All reactions