Open MrXiaoaa opened 3 months ago
您好,很有意思的工作,相比于之前的方法,增加了query的权重,十分符合逻辑。请问关于用户query的位置该如何设置,以参数形式传入model.generate()失败。
我们定义了GreedySearch类,您可以定义searcher=GreedySearch(model, tokenizer)并用searcher.generate(question_ids=xxx)替代model.generate()
谢谢,这是我的疏忽,您在原来的模型中增加了额外的变量作为question_ids的输入,而我直接调用了tansformer.models中的casuallm函数。经过修订后无异常。
您好,很有意思的工作,相比于之前的方法,增加了query的权重,十分符合逻辑。请问关于用户query的位置该如何设置,以参数形式传入model.generate()失败。