We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
微调的模型基座: QWen1.5-7b-Base 使用的数据集: glaive_toolcall_en, glaive_toolcall_zh 使用的推理代码:tests/test_toolcall.py
我对项目自带的function call数据进行了微调训练,微调后的大模型确实能准确返回function name了。
然后我在推理代码中做了下修改,在tools里写了10个function的schema,这个是其中一个推理后返回的值 Function(arguments='{"customer_name": "test", "product_name": "laptop", "quantity": 1, "unit_price": 6000}', name='generate_invoice')
但是如果我发给模型的message包含了2个或以上function name的信息,比如说:“请帮我买个笔记本电脑,并帮我开一张发票",它实际只返回了“generate_invoice”
我期望返回的function是一个List,它可能是["buy_product","generate_invoice"],我并不需要它实际去调用外部api,而是希望能识别到这个指令可能包含多个function,并将返回的参数从一个string变成一个List即可。
根据我的判断,这个修改是不是该从推理的test_toolcall.py中改,如果能实现的话是否能请教下实现的思路,谢谢
No response
The text was updated successfully, but these errors were encountered:
目前本项目还不支持并行工具调用
Sorry, something went wrong.
No branches or pull requests
Reminder
Reproduction
微调的模型基座: QWen1.5-7b-Base
使用的数据集: glaive_toolcall_en, glaive_toolcall_zh
使用的推理代码:tests/test_toolcall.py
Expected behavior
我对项目自带的function call数据进行了微调训练,微调后的大模型确实能准确返回function name了。
然后我在推理代码中做了下修改,在tools里写了10个function的schema,这个是其中一个推理后返回的值
Function(arguments='{"customer_name": "test", "product_name": "laptop", "quantity": 1, "unit_price": 6000}', name='generate_invoice')
但是如果我发给模型的message包含了2个或以上function name的信息,比如说:“请帮我买个笔记本电脑,并帮我开一张发票",它实际只返回了“generate_invoice”
我期望返回的function是一个List,它可能是["buy_product","generate_invoice"],我并不需要它实际去调用外部api,而是希望能识别到这个指令可能包含多个function,并将返回的参数从一个string变成一个List即可。
根据我的判断,这个修改是不是该从推理的test_toolcall.py中改,如果能实现的话是否能请教下实现的思路,谢谢
System Info
No response
Others
No response
The text was updated successfully, but these errors were encountered: