unsloth
unsloth copied to clipboard
Add tool calling demo notebook to README.md
Adds a tool calling example notebook. Solves #1400 and partially #1561
Currently I'm linking to a personal colab link, but I can send a PR to unsloth/notebooks as well with the notebook.
The example uses Llama-3.1-8b and user-defined custom tools.
Thanks! Is there a way to actually make calculate_loan_emi executable? Maybe via exec / eval?
Absolutely! I'll refactor the Llama-3.1-8b notebook to be more streamlined, will see if I can use user-defined tools in multi-round chat without direct string manipulation.
I made this qwen-2.5-1.5b demo that is way more straightforward, and am testing directly with Python tools.
I'll update the Llama-3.1-8b demo soon
Is there a way to actually make calculate_loan_emi executable? Maybe via exec / eval?
I've implemented your suggestion and am defining the tool as a Python function.
Qwen notebook is still more refined than Llama but both notebooks are in a good state and a good starting point IMO
Let me know if there’s anything else I should adjust.
Hey @oliveirabruno01 I tried running both the notebooks but both the models are giving vague responses. I have not made any changes and just running the notebooks as it is.
Hi @adityaghai07, thanks for pointing this out. I'll take a closer look soon. It seems the issue is with generation. I tried patching the tokenizer using unsloth.get_chat_template but got the same result.
@danielhanchen, have you seen this issue when running the notebook a few weeks ago? Any insights would be greatly appreciated.
This is my implementation with llama 3.1 8b model, which pretty much solves issue #1400, This is the reference notebook @danielhanchen for that issue..
Hi there! Very cool work. I was wondering if you have notebooks for finetuning with ToolCalling? The Unsloth notebook ToolCalling seems to only support inference. Best!