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

Add tool calling demo notebook to README.md #1764

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

oliveirabruno01
Copy link

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.

@oliveirabruno01 oliveirabruno01 marked this pull request as draft February 23, 2025 05:43
@danielhanchen
Copy link
Contributor

Thanks! Is there a way to actually make calculate_loan_emi executable? Maybe via exec / eval?

@oliveirabruno01
Copy link
Author

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

image

@oliveirabruno01
Copy link
Author

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.

@oliveirabruno01 oliveirabruno01 marked this pull request as ready for review February 26, 2025 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants