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
特定のローカルLLM(具体的にはCommand R PlusやMistral系?)では、ユーザroleがuser/assistant/user/assitant/user/...という順序になっていないとエラーになるものがありました。その場合Bad Request 405が返ってきます。 調べてみると、発言履歴を10個だけ使っていますが、この場合「assitant/user」の5回繰り返しになります。先頭がassistantoなら良さそうなんですが、実は最初にsystem promptが入っているので、systemはassistanto相当になり、assistant/assitantと続くのでエラーになるようです。 単純にエラーをなくすだけなら、slice(-11)とかにすればエラーは出なくなります。 あるいは、この系統のLLMでは、system promptをuser roleに変更するとか(すいません、確認できていません)もありそうですが、モデル毎の設定を追加するのはちょっと面倒ですね。 src/pages/index.tsx:484 const messages: Message[] = [ { role: "system", content: systemPrompt, }, ...messageLog.slice(-10), ];
The text was updated successfully, but these errors were encountered:
あ、すいません、vllmのデフォルトチャットテンプレートを使用しているためかもしれません。vllm側で工夫すればいいのかな。
vllm-project/vllm#2112
Sorry, something went wrong.
Issueありがとうございます!
おお、ローカルLLMにもAnthropic Claudeみたいな仕様のLLMがあるんですね👀
Claudeで下記のようなロジックを組んでるので転用できるかもしれません! 後ほど確認しておきます!
ちなみにですが、エラーの出るLLMの名前おしえてもらってよいですか?
すいません、返事遅くなりました。CohereのCommand R Plus 70Bを量子化したものをvllmで動かしています。
No branches or pull requests
特定のローカルLLM(具体的にはCommand R PlusやMistral系?)では、ユーザroleがuser/assistant/user/assitant/user/...という順序になっていないとエラーになるものがありました。その場合Bad Request 405が返ってきます。
調べてみると、発言履歴を10個だけ使っていますが、この場合「assitant/user」の5回繰り返しになります。先頭がassistantoなら良さそうなんですが、実は最初にsystem promptが入っているので、systemはassistanto相当になり、assistant/assitantと続くのでエラーになるようです。
単純にエラーをなくすだけなら、slice(-11)とかにすればエラーは出なくなります。
あるいは、この系統のLLMでは、system promptをuser roleに変更するとか(すいません、確認できていません)もありそうですが、モデル毎の設定を追加するのはちょっと面倒ですね。
src/pages/index.tsx:484
const messages: Message[] = [
{
role: "system",
content: systemPrompt,
},
...messageLog.slice(-10),
];
The text was updated successfully, but these errors were encountered: