AI Cloud Architect

Improve your agent’s tool-calling accuracy with SFT and DPO on Amazon SageMaker AI

AWSHow-to by Amin Dashti and Giuseppe ZappiaAWS Artificial Intelligence Blog

In this post, you learn how to use Supervised Fine-Tuning (SFT) and Direct Preference Optimization (DPO) together to improve the tool-calling accuracy of a small language model (SLM). The example uses Amazon SageMaker AI training jobs, so you can focus on training code instead of managing your own training infrastructure. You also learn how to evaluate tool-calling accuracy and compare a base model to several fine-tuned variants, so you can make data-driven decisions about model quality.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

Shows how to combine SFT and DPO on SageMaker AI training jobs to raise Qwen3-1.7B tool-calling accuracy, and how to compare base and tuned variants with an evaluation set.

Who it is for

Teams building tool-calling agents on SageMaker AI that want to fine-tune a small model instead of using a larger one.

Key points

  • Example uses Qwen3-1.7B, SFT on 15,000 samples and DPO on 9,000 samples from the NVIDIA When2Call dataset
  • Training runs on one ml.p4d.24xlarge instance, which needs a service quota increase if the account limit is 0
  • Post reports the tuned Qwen3-1.7B reaches 71.06% Acc-Norm versus 41.57% for the base model, per the authors' own evaluation

The same at other vendors

Same approach

MicrosoftHow-to

DPO Fine-Tuning Using Microsoft Foundry SDK

AI:Both show how to run preference-based (DPO) fine-tuning jobs on a managed cloud training service and compare tuned models against a baseline.

Different approach

GoogleHow-to

A Guide to Fine-Tuning FunctionGemma

AI:Both show fine-tuning a small model to pick the right tool, but Google's guide uses open tooling (TRL) rather than a managed cloud training job.