-
Notifications
You must be signed in to change notification settings - Fork 42
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
is tool_calls
from the README.md supposed to work?
#121
Comments
The type definition is missing and should be easy to fix. It depends on model and chat_template to see how readme example works for tool_calls, can you share the model you use? |
Thanks for the speedy reply @jhen0409 (and for this great project!): We use a few different models:
I'm currently testing on an iPhone 16 Pro with 8GB of memory. I see what you are describing the model-specific considerations for the chat_template, and that it might impact this functionality. If you have a model in mind that you think should 'just work' for the tool calling on a device with this memory I'd be happy to evaluate that instead of something on the list above. |
I've tested tinyllama 1.1 and the Phi 3 model in example, and it works as expected:
These two models aren't native supported tool calls, so it use the generic tool call method. The deepseek r1 model is native supported tool calls, so it will be better to decide when to use tool_call, but it currently has some issues. After ggml-org/llama.cpp#11607 (need sync later), I think it should be work, I'll do more tests for that. |
@jhen0409 thanks for your eyes on this. I confirmed that I am able to receive the
I see that you also recently added the missing TS definition for |
This screenshot is from dbca475 on main of this repo. I'm unable to get TypeScript to destructure the call to
await context?.completion
to obtain eithertext
ortool_calls
. I originally tried this on our own repo's implementation of llama.rn, but eventually tried it on the llama.rn repo and see the same result.I suppose my question / issue is: the config in the README.me here supposed to work?
Here is what I see in the llama.rn repo, as well as our own:
The text was updated successfully, but these errors were encountered: