Skip to content
New issue

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

Cerebras messes with tools #1154

Open
mwufi opened this issue Dec 1, 2024 · 5 comments
Open

Cerebras messes with tools #1154

mwufi opened this issue Dec 1, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@mwufi
Copy link

mwufi commented Dec 1, 2024

Using this configuration works


    assistant = VoiceAssistant(
        vad=ctx.proc.userdata["vad"],
        stt=deepgram.STT(),
        llm=openai.LLM(),
        tts=cartesia.TTS(voice="41f3c367-e0a8-4a85-89e0-c27bae9c9b6d"),
        chat_ctx=initial_ctx,
        fnc_ctx=func_ctx,
    )

But if we replace openai.LLM with

llm=openai.LLM(
        base_url="https://api.cerebras.ai/v1",
        api_key=os.environ.get("CEREBRAS_API_KEY"),
        model="llama3.1-8b",
)

then the agent is no longer able to see the results of tool calls

image
@mwufi mwufi added the bug Something isn't working label Dec 1, 2024
@billyg88
Copy link

billyg88 commented Dec 2, 2024

Shouldn't you be using with_cerebras on your LLM declaration?

@imohitmayank
Copy link

imohitmayank commented Dec 5, 2024

Facing similar issue, even with officia Cerebras example and using both 8b and 70b model, function call is never happening. Is this bcoz of model or the some code issue?

@jayeshp19
Copy link
Collaborator

jayeshp19 commented Dec 6, 2024

Hi @mwufi @imohitmayank,

I've tried reproducing these issues, and it seems Cerebras models aren't optimal for tool use. Here are my observations:

  • llama3.1-8b: Doesn't handle tool calls properly.
  • llama3.1-70b: Generates same tool call even after receiving a tool response.

Hope this helps clarify!

@davidzhao
Copy link
Member

I've talked to the Cerebras team and they've confirmed these will be improved very soon, currently planned in the next few weeks! Stay tuned and we'll update here when it's resolved.

@imohitmayank
Copy link

Btw function call is much better for llama-3.3-70b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants