dspy
dspy copied to clipboard
Using llama-3-70B via Groq DSPy, I found it sends invalid arguments for COPRO optimizer
Hi, so I am using COPRO to optimize signatures and instructions, however whenever I use Llama-3-70b via groq I get this n must be at most 1 error.
Please see the attached image
I can't seem to find a way to over write it to be 1, how do I resolve this? Thanks
Similar issue: https://github.com/stanfordnlp/dspy/issues/1087 This is an issue with Groq I would wait until they support n > 1. From their API docs:
n
integer or null
Optional
Defaults to 1
How many chat completion choices to generate for each input message. Note that the current moment, only n=1 is supported. Other values will result in a 400 response.
https://console.groq.com/docs/api-reference#chat-create
@ArslanS1997 needs a fix like #1188 to dspy.GroqLM
Thanks for opening this! We released DSPy 2.5 yesterday. I think the new dspy.LM and the underlying dspy.ChatAdapter will probably resolve this problem.
Here's the (very short) migration guide, it should typically take you 2-3 minutes to change the LM definition and you should be good to go: https://github.com/stanfordnlp/dspy/blob/main/examples/migration.ipynb
Please let us know if this resolves your issue. I will close for now but please feel free to re-open if the problem persists.