Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于transformers库的版本问题 #5

Closed
dhx20150812 opened this issue May 12, 2021 · 3 comments
Closed

关于transformers库的版本问题 #5

dhx20150812 opened this issue May 12, 2021 · 3 comments

Comments

@dhx20150812
Copy link

您好,感谢您开源代码!

我在尝试运行的时候发现,您在README里提到,transformers的版本要使用2.8.0,因为3以上的版本里tokenizer的行为不一致;但是在setup.py文件中,却指定了 transformers==3.4.0,这是为什么呢?我应该使用哪个版本的transformers库呢?

@jingtaozhan
Copy link
Owner

jingtaozhan commented May 12, 2021

我的训练和预测的代码都是按照3.4.0版本写的。
但是预处理的时候比较早,transformers库还只有2.8.0。我之前实验一直用的是2.8.0预处理好的数据进行训练和预测的。
后来整理代码的时候发现3.4.0的tokenizer行为和2.8.0不一致。但是并不要紧,你只需要在运行preprocess的时候另外创建一个环境,运行其他的文件都用3.4.0即可。
这块确实比较麻烦。我曾经试过去改动3.4.0版本的tokenizer,但是都没能使得它和2.x版本行为一致。如果你发现了应该如何改正,欢迎告诉我。

@dhx20150812
Copy link
Author

您好,最近在阅读您的代码时,我发现您在STAR中使用了同一个Roberta-base模型对query和doc进行编码,但是论文中似乎没有明确地说明这一点。不知道是否我的理解有误?

@jingtaozhan
Copy link
Owner

Yes, you are correct. And many related works do the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants