Skip to content

尝试调整"top_p",解决qwen模型api转换时的bug #24

@ldlsldls

Description

@ldlsldls

使用qwen时出现了一个bug
本来的model-config.json

[
    {
        "token":"qwen-1111222211",
        "type":"qwen",
        "config":{
            "api_key":"sk-xxxxxxxxxxxxxx",
            "model":"qwen-turbo"
        }
    }
]

使用chatnext
image
结果

image

bug

{"code":"InvalidParameter","message":"Range of top_p should be (0.0, 1.0)","request_id":"7dc1df54-850d-95c8-bbdf-07112f62c90e"}

看到tian-mh其他的config里面设置了"top_p"
我也设置一下,像他一样"top_p": 0.7

[
    {
        "token":"qwen-1111222211",
        "type":"qwen",
        "config":{
            "api_key":"sk-xxxxxxxxxxxxxxxxxxxxx",
            "model":"qwen-turbo",
            "top_p": 0.7
        }
    }
]

结果
image

我尝试了0.1,0.2,...,0.9, 都可以, 也许是自动归一化吧, 当然就选0.7折中一点

最后十分感谢作者的这个项目, 帮了大忙, 可以用国内的api连接zotero gpt了🌸🌸🌸🌸🌸🌸🌸

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions