Is there a standard way to pass tools parse the tool calling messages in Llama 3.2? #1958
-
Hello! I am trying to fine tune Llama 3.2 with TorchTune for tools usage. I understand I can pass the tools to the LLM as a system prompt and parse the output message to extract tool calls. I was just wondering if there is a standard format to do it for Llama models. Like a specific template to pass the tools and a specific function to do the parsing. Thank you very much in advance for any help! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Great question. See the documentation here for Llama3.2: https://www.llama.com/docs/model-cards-and-prompt-formats/llama3_2/#-tool-calling-(1b/3b)- The system prompt in the link above would probably be directly passed into content as a system message |
Beta Was this translation helpful? Give feedback.
-
Great! Thanks a lot for your help. |
Beta Was this translation helpful? Give feedback.
Great question. See the documentation here for Llama3.2: https://www.llama.com/docs/model-cards-and-prompt-formats/llama3_2/#-tool-calling-(1b/3b)-
The system prompt in the link above would probably be directly passed into content as a system message
Message(role="system", content=system_prompt_with_registered_tools)
. Generic functions that can quickly do this for the llama model would be generally useful, and could potentially be added to the library.