InternLM / Agent-FLAN

[ACL2024 Findings] Agent-FLAN: Designing Data and Methods of Effective Agent Tuning for Large Language Models

Home Page:https://internlm.github.io/Agent-FLAN/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

模型推理代码

xinyiqin opened this issue · comments

您好,想求一份Agent-flan的推理代码!
p.s 貌似模型中没有定义template中的special tokens比如这种,ി\n,不清楚推理中具体是怎么处理的。
以及template中好像没有定义Function的。

可以用lagent的推理框架然后走huggingface那个class,把readme里面的meta template传进那个类就好了
我们没有专门定义function的role,function的返回都当作user处理

你好,感谢回答。想知道下推理的system prompt构造大概是什么样以及训练时的function_call格式,因为直接推理的话返回的function_call格式比较五花八门的,不是很方便提取。

哈喽~能麻烦解答一下吗

训练的时候我们用了多套模版,所以在推理的时候用react那种Thought: Action: ActionInput:就可以,当然也可以用JSON format的system prompt, {thought:"", action: "", action_input:""}