Code Velocity
Þróunartól

SageMaker AI: Hraðari umboðsstýrð tólaútköllun með miðlaralausri sérsniðnun líkana

·5 mín lestur·AWS·Upprunaleg heimild
Deila
Notendaviðmót Amazon SageMaker AI Studio sem sýnir valkosti fyrir miðlaralausa sérsniðnun líkana og umboðsstýrða tólaútköllun.
{
  "prompt": [
    {"role": "system", "content": "You are a helpful assistant. When using tools, respond with: [...]"},
    {"role": "user", "content": "Get the weather"}
  ],
  "reward_model": {
    "ground_truth": "To provide you with the weather information, could you please specify the location?"
  }
}

Fínstilling Qwen 2.5 7B Instruct með SageMaker AI

Ferlið við fínstillingu líkans eins og Qwen 2.5 7B Instruct innan Amazon SageMaker AI Studio er straumlínulagað og auðskilið. Eftir að hafa tryggt að nauðsynlegar forkröfur (AWS reikningur, IAM hlutverk, SageMaker AI lén, S3 geymsla) séu uppfylltar geta notendur farið í Líkön hlutann í SageMaker AI Studio.

Þaðan, með því að velja Qwen 2.5 7B Instruct og velja Sérsníða með notendaviðmóti opnast sérstök stillingarsíða. Þetta viðmót gerir kleift að:

  • Val á tækni: Að velja sérstaklega Styrktarnám með sannreynanlegum verðlaunum (RLVR) úr fellilistanum.
  • Gagnainnsláttur: Að benda á undirbúin þjálfunargögn sem eru geymd í Amazon S3 geymslu.
  • Verðlaunafall: Að stilla stigveldisbundna stigakerfið sem skilgreinir hvernig svörunarkandidatar eru metnir út frá ground_truth.
  • Stillingu ofbreyta: Að stilla breytur eins og stærð runu, þó að SageMaker AI sjái oft um bestu stillingar sjálfkrafa.

SageMaker AI styður fjölbreytt úrval líkanategunda, þar á meðal Amazon Nova, GPT-OSS, Llama, Qwen, og DeepSeek, ásamt ýmsum aðferðum eins og stýrðri fínstillingu (SFT), beinni hagræðingu valkosta (DPO), RLVR, og styrktarnámi frá gervigreindarviðbrögðum (RLAIF). Samþætt MLflow mæling veitir innsýn í þjálfunar- og staðfestingarmælingar, sem einfaldar afkestaeftirlit og ítrekun. Þessi auðveldleiki í notkun flýtir verulega fyrir þróunarferlinu fyrir þróunaraðila sem byggja flókna github-agentic-workflows.

Mat og árangur í innleiðingu

Skilvirkni okkar fínstillta Qwen 2.5 7B Instruct líkans var nákvæmlega metin á gögnum sem voru geymd utan, þar á meðal sviðsmyndum með algjörlega óþekktum verkfærum – mikilvægt próf fyrir alhæfingu. Niðurstöðurnar voru sannfærandi: fínstillta líkanið náði ótrúlegum 57% bata í verðlaunum fyrir tólaútköllun samanborið við grunnlíkanið. Þetta mikilvæga stökk í frammistöðu á sviðsmyndum sem það hafði ekki mætt á meðan á þjálfun stóð undirstrikar mátt RLVR til að kenna líkönum öfluga ákvarðanatökugetu fyrir samskipti við verkfæri.

Þessi aukna áreiðanleiki skilar sér beint í aukið traust og sjálfstraust við innleiðingu gervigreindarumboðsmanna í framleiðsluumhverfi. Með því að lágmarka tilfelli af ímynduðum verkfærum, röngum viðföngum og óviðeigandi aðgerðum geta fyrirtæki nýtt sér gervigreindarumboðsmenn fyrir mikilvægari og viðkvæmari verkefni. Með SageMaker AI sem sér um flókna líkanadreifingu og innviðastjórnun geta þróunaraðilar óaðfinnanlega fært sig frá fínstillingu til framleiðslu, og nýtt allan möguleikann í gervigreindarlausnum sínum. Þessi geta samræmist víðtækari sýn á að gera umboðs-gervigreind virka fyrir raunveruleg áhrif.

Í stuttu máli, samsetning miðlaralausrar sérsniðnunar líkana frá Amazon SageMaker AI og öflugra námsgetu RLVR veitir öfluga leið til að byggja upp mjög áreiðanleg umboðsstýrð tólaútkalls kerfi. Þessi nýstárlega nálgun flýtir fyrir þróun, dregur úr rekstrarálagi og skilar að lokum gervigreindarumboðsmönnum sem starfa með óviðjafnanlegri nákvæmni og áreiðanleika.

Algengar spurningar

What is agentic tool calling and why is it crucial for AI agents?
Agentic tool calling is the mechanism that empowers AI agents to perform real-world actions like querying databases, initiating workflows, fetching real-time information, and executing tasks on a user's behalf. It's crucial because it bridges the gap between language understanding and practical application, allowing AI agents to move beyond just generating text to actually interacting with external systems and data sources, thereby making them genuinely useful in production environments.
What are the common challenges AI agents face when performing tool calls?
AI agents frequently encounter challenges such as hallucinating tools that don't exist, passing incorrect parameters to valid tools, or attempting actions when they should instead seek clarification from the user. These failures lead to unreliable agent behavior, eroding user trust and posing significant hurdles to the successful deployment of AI agents in critical production systems, ultimately limiting their real-world utility.
How does Amazon SageMaker AI address the challenges of agentic tool calling?
Amazon SageMaker AI addresses these challenges through its serverless model customization capabilities, particularly using Reinforcement Learning with Verifiable Rewards (RLVR). This approach allows developers to fine-tune large language models (LLMs) to improve their tool-calling accuracy without managing complex infrastructure. SageMaker AI handles the operational overhead of GPU provisioning, memory management, and reward infrastructure, letting users focus on data, reward functions, and model behavior.
What is Reinforcement Learning with Verifiable Rewards (RLVR) and how does it work?
RLVR is a powerful fine-tuning technique where the model generates multiple candidate responses for a given prompt. A predefined reward function then evaluates these candidates, providing a signal about their quality and correctness. The model subsequently updates its internal policy to favor responses that received higher reward scores, using methods like Group Relative Policy Optimization (GRPO), thereby iteratively learning to produce more accurate and desired outputs for specific tasks like tool calling.
Why is RLVR considered more effective than Supervised Fine-Tuning (SFT) for tool calling tasks?
While SFT requires meticulously labeled examples for every desired behavior (e.g., calling a tool, clarifying, refusing), RLVR operates differently. SFT can struggle to generalize decision-making between these behaviors. RLVR, by contrast, allows the model to learn the optimal decision boundary by generating multiple candidates and receiving immediate feedback via a reward function, enabling it to better understand *when* to execute a tool call versus *when* to ask for more information or refuse a request.
How is training data prepared for RLVR in Amazon SageMaker AI for agentic tool calling?
Training data for RLVR in SageMaker AI is prepared as JSONL files, where each entry contains a prompt (system and user messages) and a `ground_truth` within a `reward_model` field. This `ground_truth` is what the reward function scores against. To ensure robust agent behavior, datasets are typically designed to cover three distinct scenarios: executing a tool call when all parameters are present, clarifying when information is missing, and refusing requests that are out of scope or harmful. Synthetic data generation tools like Kiro can be used for this purpose.
What agent behaviors are critical for building robust and reliable tool-calling AI agents?
Building robust tool-calling AI agents requires them to master three critical behaviors. First, they must `Execute` a tool call accurately when all necessary information is provided by the user. Second, they need to `Clarify` by asking follow-up questions when essential parameters are missing from a user's request. Third, they must `Refuse` gracefully when a request is out of scope, harmful, or cannot be fulfilled. Training models across these behaviors ensures comprehensive and trustworthy agent performance.
What prerequisites are needed to use serverless model customization in SageMaker AI?
To leverage serverless model customization in Amazon SageMaker AI, users must have an active AWS account, an AWS IAM role configured with the necessary permissions for SageMaker, a SageMaker AI domain providing Studio access for development, and an Amazon Simple Storage Service (Amazon S3) bucket to store training data and model outputs securely. These components ensure a secure and functional environment for fine-tuning models.

Fylgstu með

Fáðu nýjustu gervigreindarfréttirnar í pósthólfið.

Deila