ng-fukgin
ng-fukgin
First apply the gpt api, and then modify it ` base_url=f"https://{self.model}.lepton.run/api/v1/",` to ` base_url=f""https://api.openai.com/v1"` and change ` "LLM_MODEL": "mixtral-8x7b",` the model name here
啊,我英语不太好,就是你先申请gpt4 的api,然后修改[这里的](https://github.com/leptonai/search_with_lepton/blob/432436575eb64028a8b2fae62ca345d83a06b189/search_with_lepton.py#L368),改为`base_url=f""https://api.openai.com/v1"` 以及 [这里的的](https://github.com/leptonai/search_with_lepton/blob/432436575eb64028a8b2fae62ca345d83a06b189/search_with_lepton.py#L324C13-L324C41) ""LLM_MODEL":mixtral-8x7b"
你在后台把{"role": "user", "content": query},改成{"role": "user", "content": query+"请把你的回答翻译成中文"},很大几率会回答中文
> How to set the backend as "qwen", can you provide guidance? 你先自己用fastchat也好,什么也好,自己部署一个类似于openai 的api 的接口,然后修改 `base_url=f"https://{self.model}.lepton.run/api/v1/",`这一个链接,例如`base_url=f"https:localhost:8000/v1/",` 然后修改"LLM_MODEL": "mixtral-8x7b",这里的模型名字,就可以了,qwen不会生成Related,可能会报错,但不影响模型的回答。
以前成功过吗,成功过就更新下tokenization_chatglm.py试试 如果第一次运行,很有可能是模型的问题,重新下载模型试一下,
> 请问一下我在运行cli_demo.py报如下错误:AttributeError: 'ChatGLMTokenizer' object has no attribute 'sp_tokenizer'. Did you mean: '_tokenize'?,我也重新加载了模型还是这样,这是什么情况 可能是transformers的问题,试一下 pip install transformers==4.33.0