MyGit

v1.3.1

explosion/spacy-transformers

版本发布时间: 2023-09-26 15:08:41

explosion/spacy-transformers最新发布版本:v1.3.5(2024-04-25 20:54:53)

This release addresses incompatibilities related to saving and loading models across a range of transformers versions following changes in transformers v4.31.

Options for improved pipeline package compatibility

If you are packaging models with spacy package and you'd like to avoid having your users run into the fallback strict=False loading and warnings related to state_dict keys, you may want to add a stricter transformers requirement that corresponds to the version used during training.

If you're training with the newest supported transformers version (v4.33.x), you could currently add transformers>=4.31 to your package requirements. Note that this would restrict your users to Python 3.8+ and PyTorch 1.9+ due to transformers requirements.

Create meta.json with your additional requirements:

{
  "requirements": ["transformers>=4.31"]
}

Package with spacy package:

spacy package --meta meta.json input_dir output_dir

The requirement transformers>=4.31 will be added to any other package requirements that are automatically determined based on your pipeline config.

相关地址:原始地址 下载(tar) 下载(zip)

查看:2023-09-26发行的版本