# Schema for Llama fine-tuning with tool/function calling on Vertex AI?

**URL:** <https://discuss.google.dev/t/schema-for-llama-fine-tuning-with-tool-function-calling-on-vertex-ai/284493>\
**Category:** Open Models\
**Tags:** llama\
**Created:** [November 6, 2025, 7:45pm UTC](https://discuss.google.dev/t/schema-for-llama-fine-tuning-with-tool-function-calling-on-vertex-ai/284493 "2025-11-06T19:45:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mihaela\_Manciu](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/mihaela_manciu/32/185730_2.png) [@Mihaela\_Manciu](https://discuss.google.dev/u/Mihaela_Manciu)\
**Post date:** [November 6, 2025, 7:45pm UTC](https://discuss.google.dev/t/schema-for-llama-fine-tuning-with-tool-function-calling-on-vertex-ai/284493/1 "2025-11-06T19:45:49Z")

</div>

Hi everyone,

I’m trying to fine-tune a Llama model (any model) on Vertex AI and I’d like to enable tool calling (a.k.a. function calling) so the fine-tuned model can call structured tools.

However, I can’t find any schema or data format in the documentation that shows how to format the training examples for tool-augmented Llama fine-tuning e.g., how to include the “tools” definitions, “tool\_calls”, and “responses” fields in the JSONL format accepted by Vertex AI fine-tuning jobs.

Is there an officially supported training data schema for Llama fine-tuning with tool calling in Vertex AI yet?

Example of what I’m trying to achieve (it’s a Gemini 2.5 schema):

{

```
"systemInstruction": {

  "parts": \[

    {

      "text": "You are a helpful assistant." 

    }

  \]

},

"contents": \[

  {

    "role": "user",

    "parts": \[

      {

        "text": "In our 'Project Zeus' project, add a new task 'Post-Launch Review'." 

      }

    \]

  },

  {

    "role": "model",

    "parts": \[

      {

        "text": "Adding the 'Post-Launch Review' task to 'Project Zeus'." 

      },

      {

        "function_call": {

          "name": "addTask", 

          "args": {

            "planId": "PZ",

            "itemType": "theme",

            "name": "Post-Launch Review",

            "id": "PZ-5",

            "description": "Initiative to review project performance and gather feedback post-launch.",

            "endDate": "2024-12-31"

          }

       }

      }

    \]

  }

\]

```

}  
Any guidance, examples, or clarification from Google Cloud engineers or anyone who has tried this would be greatly appreciated!

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![ilnardo92](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/ilnardo92/32/158797_2.png) [@ilnardo92](https://discuss.google.dev/u/ilnardo92)\
**Post date:** [November 10, 2025, 4:21am UTC](https://discuss.google.dev/t/schema-for-llama-fine-tuning-with-tool-function-calling-on-vertex-ai/284493/2 "2025-11-10T04:21:30Z")

</div>

Hi @Mihaela_Manciu ,

what a great question! Let me ask ENG team and go back to you on this.

Best

---

<div class="post-metadata">

**Author:** ![Mihaela\_Manciu](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/mihaela_manciu/32/185730_2.png) [@Mihaela\_Manciu](https://discuss.google.dev/u/Mihaela_Manciu)\
**Post date:** [November 11, 2025, 12:13pm UTC](https://discuss.google.dev/t/schema-for-llama-fine-tuning-with-tool-function-calling-on-vertex-ai/284493/3 "2025-11-11T12:13:11Z")

</div>

Thanks so much! That’d be really helpful, I actually need this for an ongoing project.

---

<div class="post-metadata">

**Author:** ![ilnardo92](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/ilnardo92/32/158797_2.png) [@ilnardo92](https://discuss.google.dev/u/ilnardo92)\
**Post date:** [November 24, 2025, 1:15pm UTC](https://discuss.google.dev/t/schema-for-llama-fine-tuning-with-tool-function-calling-on-vertex-ai/284493/4 "2025-11-24T13:15:05Z")

</div>

Hi @Mihaela_Manciu ,

Check out the fine-tuned chat completion template with ENG support – it already integrates tool calling, meaning you can adapt the model using the same format for further tuning.

I’m also planning to create a tutorial demonstrating how to fine-tune Llama for function calls.

Best

---

<div class="post-metadata">

**Author:** ![Mihaela\_Manciu](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/mihaela_manciu/32/185730_2.png) [@Mihaela\_Manciu](https://discuss.google.dev/u/Mihaela_Manciu)\
**Post date:** [November 26, 2025, 8:11am UTC](https://discuss.google.dev/t/schema-for-llama-fine-tuning-with-tool-function-calling-on-vertex-ai/284493/5 "2025-11-26T08:11:14Z")

</div>

Thanks for the update, @ilnardo92 ! I’ll go through the chat completion template and I’m looking forward to see that Llama function-calling fine-tuning tutorial when you publish it.

Really appreciate you taking the time to look into this!

---

<div class="post-metadata">

**Author:** ![Dao\_Duc\_Manh](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/dao_duc_manh/32/186136_2.png) [@Dao\_Duc\_Manh](https://discuss.google.dev/u/Dao_Duc_Manh)\
**Post date:** [November 26, 2025, 8:37am UTC](https://discuss.google.dev/t/schema-for-llama-fine-tuning-with-tool-function-calling-on-vertex-ai/284493/6 "2025-11-26T08:37:23Z")

</div>

Hi @ilnardo92 , hi @Mihaela_Manciu ,

I am currently stuck with fine tuning Gemini 2.5 with function calling. I used the same chat template format with Mihaela, particularly this one: [Tune function calling &nbsp;|&nbsp; Generative AI on Vertex AI &nbsp;|&nbsp; Google Cloud Documentation](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models/tune-function-calling#tuning_function_calling_to_support_a_chat_session)

But I got this error: “Dataset example 1 of 25 contains an unsupported modality [function call] in the “parts” field, which is not supported by this model. The supported modalities are: [image, PDF document, audio, video]…..”

My dataset still worked well with Gemini 2.0, but did not with 2.5. Could you guys give me any clues to fix? Thank you.

---

<div class="post-metadata">

**Author:** ![ilnardo92](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/ilnardo92/32/158797_2.png) [@ilnardo92](https://discuss.google.dev/u/ilnardo92)\
**Post date:** [December 3, 2025, 3:30pm UTC](https://discuss.google.dev/t/schema-for-llama-fine-tuning-with-tool-function-calling-on-vertex-ai/284493/7 "2025-12-03T15:30:11Z")

</div>

Hi @Dao_Duc_Manh,

Unfortunately, function calling tuning isn’t supported for Gemini models. However, we’re actively working to have it.

We’ll update the documentation to better reflect this.

Best

---

<div class="post-metadata">

**Author:** ![daniel\_lublinsky](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/daniel_lublinsky/32/214037_2.png) [@daniel\_lublinsky](https://discuss.google.dev/u/daniel_lublinsky)\
**Post date:** [December 21, 2025, 9:13am UTC](https://discuss.google.dev/t/schema-for-llama-fine-tuning-with-tool-function-calling-on-vertex-ai/284493/8 "2025-12-21T09:13:23Z")

</div>

Hey @ilnardo92, when you say function calling tuning isn’t supported by gemini model tuning

Does this apply to all gemini models?

Is that possibly related to:

> [@Finetuning text dataset with function calls](https://discuss.google.dev/t/finetuning-text-dataset-with-function-calls/287384):
>
> Hey again, I am tuning a model with Vertex supervised text tuning. The model has an SQL tool that will be used in the tuning. My dataset has a system prompt and tools at the first lines, just like the docs say… But the issue I am having is with the tuning process for models above Gemini 2.0 flash. So my dataset works for Gemini 2.0 flash / 2.0 flash lite, But for 2.5 flash and up, I get this error (same dataset): Dataset example 1 of 14 contains an unsupported modality [function call] in…

---

<div class="post-metadata">

**Author:** ![ilnardo92](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/ilnardo92/32/158797_2.png) [@ilnardo92](https://discuss.google.dev/u/ilnardo92)\
**Post date:** [December 22, 2025, 3:52pm UTC](https://discuss.google.dev/t/schema-for-llama-fine-tuning-with-tool-function-calling-on-vertex-ai/284493/9 "2025-12-22T15:52:46Z")

</div>

Hi @daniel_lublinsky,

That’s correct. It applies to all Gemini models.

I will update this thread as soon as we have updates.

Best
