shibing624 / textgen

TextGen: Implementation of Text Generation models, include LLaMA, BLOOM, GPT2, BART, T5, SongNet and so on. 文本生成模型,实现了包括LLaMA,ChatGLM,BLOOM,GPT2,Seq2Seq,BART,T5,UDA等模型的训练和预测,开箱即用。
Apache License 2.0
932 stars 108 forks source link

部署问题 #59

Open yeyuan0620 opened 2 months ago

yeyuan0620 commented 2 months ago

Describe the Question

Please provide a clear and concise description of what the question is.

yeyuan0620 commented 2 months ago

root@autodl-container-176e4f97d8-1a1babc9:~/autodl-tmp/textgens# python examples/T5/gradio_demo.py Traceback (most recent call last): File "examples/T5/gradio_demo.py", line 10, in from textgen import T5Model File "/root/miniconda3/lib/python3.8/site-packages/textgen-1.1.1-py3.8.egg/textgen/init.py", line 15, in from textgen.language_modeling.language_modeling_model import LanguageModelingModel File "/root/miniconda3/lib/python3.8/site-packages/textgen-1.1.1-py3.8.egg/textgen/language_modeling/init.py", line 8, in from textgen.language_modeling.language_modeling_model import LanguageModelingModel File "/root/miniconda3/lib/python3.8/site-packages/textgen-1.1.1-py3.8.egg/textgen/language_modeling/language_modeling_model.py", line 62, in from textgen.custom_models.models import ElectraForLanguageModelingModel File "/root/miniconda3/lib/python3.8/site-packages/textgen-1.1.1-py3.8.egg/textgen/custom_models/models.py", line 30, in from transformers.models.distilbert.modeling_distilbert import DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST ImportError: cannot import name 'DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST' from 'transformers.models.distilbert.modeling_distilbert' (/root/miniconda3/lib/python3.8/site-packages/transformers/models/distilbert/modeling_distilbert.py)

yeyuan0620 commented 2 months ago

我在部署时出现这个问题,请问怎么解决

shibing624 commented 2 months ago

transformers 版本问题,你用的哪个版本的transformers,我兼容下

yeyuan0620 commented 1 month ago

解决了,tansformer4.30.2就可以,谢谢