-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Missing support for tool calling in Llama models (was: Tool Calling for AzureML Managed Deployments) #39391
Comments
Hi @Luke-Dornburgh thank you for opening this issue. I'm taking a look at it now. |
@Luke-Dornburgh it seems that even though the model supports tool calls, The appropriate Azure Service hosting this model has not yet been updated to expose tool calls via the Azure AI Model Inference REST APIs. That's why this page https://learn.microsoft.com/azure/ai-foundry/model-inference/concepts/models#meta still shows Llama models not supporting tool calls. I'm trying to get information from the appropriate team about when this will be fixed. |
@dargilco, thanks for the update on this. I was not aware of this capabilities documentation so this will be helpful in the meantime to know what is possible. I assume these restrictions probably apply to both Managed and Serverless deployments? Please keep me updated on what PG from Azure says about when this could change. |
@dargilco Any new from internal team about future support on this? I have been continuing testing out the SDK and it turns out that when I query a client using a gpt model which invokes tool calling, and then I create a new client for a Meta model, when I pass the message history to that new Meta-based client, it has issues handling the AssistantMessage that describes the tool calls that were suggested. Seems this may be more than just a support issue and also perhaps a bug that hinders the ability to switch models mid-conversation |
@Luke-Dornburgh I have not yet heard back, I reached out again. I'd like to learn more about what you tried next, as it seems, from the point of view of the new client that you created to handle the tool response, this is just a regular chat completions operation with history. Can you please open a new GitHub issue and share your code? Can you modify this sample for example https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_tools.py to take the tool response you got from gpt model, and pass it as chat history on a new client that uses Meta model? I want to be sure I understand what you did. Update: I run this sample for chat completions with history https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/ai/azure-ai-inference/samples/sample_chat_completions_with_history.py with model Thanks! |
Since we are tracking this work request internally, I'm going to close this issue. I do not yet have an estimated time for when Llama models will support tool call. |
Describe the bug
Tool calling not functioning as expected for Meta-Llama-3.1-70B-Instruct or Meta-Llama-3.3-70B-Instruct deployed to Managed compute in Azure Machine Learning. The code below works just find for OpenAI models, but the two Azure ML Realtime Managed models we have deployed do not work.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Here is the output that the Azure OpenAI models return:
Screenshots - Error using Azure ML Managed Deployment:
Additional context
This code is heavily based on this sample from the repo: sdk/ai/azure-ai-inference/samples/sample_chat_completions_streaming_with_tools.py
In that sample, the comment clearly states:
DESCRIPTION:
This sample demonstrates how to do chat completions using a synchronous client,
with the assistance of tools, with streaming service response. In this sample,
we use a mock function tool to retrieve flight information in order to answer
a query about the next flight between two cities. Make sure that the AI model
you use supports tools. The sample supports either Serverless API endpoint /
Managed Compute endpoint, or Azure OpenAI endpoint. Set the boolean variable
use_azure_openai_endpoint
to select between the two. API key authenticationis used for both endpoints in this sample.
The text was updated successfully, but these errors were encountered: