fastnlp / fastNLP

fastNLP: A Modularized and Extensible NLP Framework. Currently still in incubation.
https://gitee.com/fastnlp/fastNLP
Apache License 2.0
3.05k stars 451 forks source link

刚开始使用fastNlp得embedding功能,运行示例代码出现问题 #335

Closed Magic-123 closed 3 years ago

Magic-123 commented 3 years ago

image 1.使用fastNlp(v0.5.5)提供的示例代码,下载语言模型没有问题,但是出现如下错误 image 2.随后使用文档提供的“cn-base"模型,代码如下: image 语言模型无法自动下载,出现错误如下: image

xuyige commented 3 years ago
  1. 这个错误的是由于PyTorch版本升级带来的变动而导致的,在github的最新版本当中已经修复了这个问题,我们将在下一个版本发布这个修复。可以先 pip uninstall fastNLP 之后,再 pip install git+https://github.com/fastnlp/fastNLP.git 来安装最新版本
  2. cn-base模型是BERT里面的一个模型,需要用BertEmbedding来调用。StaticEmbedding只能调用类似word2vec或者是glove的静态embedding。在文档当中有详细分类说明。
Magic-123 commented 3 years ago

好的,谢谢,解决了