You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
研究了一下,最后生成的'stop': ['✿RESULT✿', '✿RETURN✿', 'Observation:', 'Observation:\n', '"], "instruction":'],超过了1个,直接在ultis.py里简单粗暴的修改了:
def merge_generate_cfgs(base_generate_cfg: Optional[dict], new_generate_cfg: Optional[dict]) -> dict:
generate_cfg: dict = copy.deepcopy(base_generate_cfg or {})
if new_generate_cfg:
for k, v in new_generate_cfg.items():
if k == 'stop':
stop = generate_cfg.get('stop', [])
stop = stop + [s for s in v if s not in stop]
### generate_cfg['stop'] = stop[:4]
else:
generate_cfg[k] = v
return generate_cfg
这应该也算个bug吧,希望能修复一下。
发现一个bug:如果利用openai的api兼容接口,llm使用glm-4,在使用assistant_rag这个demo时候。会遇到rror code: 400 - {'error': {'message': 'stop:最大只能有4个停止词 (request id: 202409291149558009254221372292)', 'type': '', 'param': '', 'code': '1214'}} 的问题。OPENAI规范里确实stop words只能有4个。但是使用qwen-max模型不会有这问题。请问一下,stop words是哪一个生成的?有什么办法能够暂时绕过这个错误吗?
The text was updated successfully, but these errors were encountered: