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

question_ids如何设置? #1

Open
MrXiaoaa opened this issue Jun 26, 2024 · 2 comments
Open

question_ids如何设置? #1

MrXiaoaa opened this issue Jun 26, 2024 · 2 comments

Comments

@MrXiaoaa
Copy link

MrXiaoaa commented Jun 26, 2024

您好,很有意思的工作,相比于之前的方法,增加了query的权重,十分符合逻辑。请问关于用户query的位置该如何设置,以参数形式传入model.generate()失败。

@JulietLJY
Copy link
Member

我们定义了GreedySearch类,您可以定义searcher=GreedySearch(model, tokenizer)并用searcher.generate(question_ids=xxx)替代model.generate()

@MrXiaoaa
Copy link
Author

谢谢,这是我的疏忽,您在原来的模型中增加了额外的变量作为question_ids的输入,而我直接调用了tansformer.models中的casuallm函数。经过修订后无异常。

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