HyperAI
Back to Headlines

NVIDIA Unveils AI Blueprint for Efficient Model Distillation and Cost Management in Agentic Workflows

vor 5 Tagen

As enterprise adoption of agentic AI accelerates, the challenges of scaling intelligent applications while managing inference costs are becoming more pronounced. Large language models (LLMs) like those with 70B parameters offer strong performance but come with significant computational demands, leading to high latency and costs. Moreover, many development workflows, such as evaluation, data curation, and fine-tuning, remain manual and inefficient, further complicating the process. To tackle these issues, NVIDIA has introduced the NVIDIA AI Blueprint for building data flywheels. This reference architecture leverages NVIDIA NeMo microservices to continuously distill larger LLMs into smaller, more efficient models without sacrificing accuracy. The blueprint automates end-to-end processes, making it easier to manage AI workflows and scale effectively. How the Data Flywheel Blueprint Works The blueprint operates through a series of interconnected steps managed by the Flywheel Orchestrator Service, which serves as the central control plane. Here's a breakdown of the process: Log Ingestion: Production prompt/response logs from the larger "teacher" model (e.g., a 70B parameter model) are ingested into an Elasticsearch index. These logs follow the OpenAI-compliant format, ensuring compatibility and ease of integration. Tagging for Partitioning: Each log is tagged with metadata, such as workload_id, to isolate and process data by task for each agent node. This ensures that the system can handle multiple tasks efficiently. Dataset Creation: The orchestrator de-duplicates the logs and transforms them into task-aligned datasets for training and evaluation. Importantly, these datasets do not require external ground-truth labels, reducing the need for manual intervention. Fine-Tuning Jobs: Using the NeMo Customizer, supervised fine-tuning jobs are launched with LoRA (Low-Rank Adaptation) adapters. These adapters help distill knowledge from the larger teacher model into smaller, task-specific candidates. Evaluate Runs: The NeMo Evaluator benchmarks multiple candidate models using three evaluation methods: zero-shot prompting, in-context learning, and supervised fine-tuning with LoRA. Each method provides a different level of insight into model performance. Zero-Shot Prompting (base-eval): Models are evaluated on production-like prompts without any prior examples or customization, serving as a baseline. In-Context Learning (icl-eval): Few-shot examples are added to each prompt, allowing the system to automatically sample and format real production traffic to test model improvement through context. Supervised Fine-Tuning with LoRA (customized-eval): Models are fine-tuned with LoRA adapters using curated task-specific datasets derived from production logs, measuring performance gains over the baseline and in-context methods. Scoring and Aggregation: Model outputs are scored using the NeMo Evaluator's LLM-as-judge capabilities, which automatically assess performance without human labels. Key metrics, such as function_name_and_args_accuracy and tool_calling_correctness, are logged and accessible through the Orchestrator API for review and comparison. Review and Promotion: Developers and administrators can programmatically access metrics, download artifacts, launch follow-up experiments, or promote top-performing candidates to production, replacing the larger NIM. This loop can be scheduled or triggered on demand, creating an automated and scalable system. Applying the Blueprint to Agentic Tool-Calling NVIDIA demonstrated the blueprint's effectiveness in a high-impact use case: Agentic Tool Calling. This is crucial for production AI agents that must interact reliably with external systems via structured API calls. The initial setup involved a customer support multi-tool agent powered by a large Llama-3.3-70B-instruct model, which performed tool-calling tasks accurately but at a high cost. To simulate production traffic, natural language queries were synthetically generated, and the agent's tool-calling behavior was captured in OpenAI-compatible logs. These logs formed the basis for both training and evaluation datasets. Three optimization experiments were conducted to assess the tool-calling performance of smaller candidate models: Zero-Shot Prompting: Baseline performance of models without any prior examples or customization. In-Context Learning: Improvement in performance by providing few-shot examples. Supervised Fine-Tuning with LoRA: Further performance gains through fine-tuning on task-specific datasets derived from production logs. The NeMo Evaluator automatically scored all model outputs, and the system surfaced detailed metrics for comparison. The result was a fine-tuned Llama-3.2-1B model that achieved 98% of the tool-calling accuracy of the original 70B model. This model required only one GPU for serving, compared to the two needed for the 70B model, significantly reducing latency and cost. Configuring and Running the Blueprint Setting up the Data FlywheelBlueprint involves deploying the necessary environment and services. Detailed instructions are available in the GitHub repo readme, but the general steps include: Generate a Personal API Key: Needed to deploy NeMo microservices, access models, and download them on-premises. Deploy NeMo Microservices Platform: Set up the microservices needed for the flywheel. Install and Configure the Data Flywheel Orchestrator: This service coordinates the entire workflow. Configuration is done via a config.yaml file, which specifies model settings, fine-tuning parameters, in-context learning settings, and evaluation settings. The file loads when the system starts, and any updates require stopping the services, modifying the YAML, and redeploying. Once configured, launching the flywheel job is straightforward, made via a simple API call to the microservice. A successful submission returns tool-calling accuracy metrics, which can be used to compare performance across various models. Extending the Blueprint to Custom Workflows The blueprint is a reference workflow that can be easily adapted for any downstream task. Early adoption by NVIDIA partners showcases the blueprint's flexibility and potential: Weights & Biases: Enhanced the blueprint with tools for agent traceability, observability, model experiment tracking, evaluation, and reporting. Iguazio: Integrated AI orchestration and monitoring components to build a custom data flywheel for its platform. Amdocs: Incorporated LLM fine-tuning and evaluation into its amAIz platform's CI/CD pipeline, enabling continuous improvement and early issue detection. EY: Integrated the blueprint to enhance its EY.ai Agentic Platform with real-time model optimization, improving efficiency in tax, risk, and finance domains. VAST: Designed custom data flywheels by integrating the VAST AI Operating System, accelerating intelligent AI pipelines for finance, healthcare, and scientific research. Industry Response and Evaluation Industry insiders have praised NVIDIA's Data Flywheel Blueprint for its ability to streamline AI development and deployment processes. By automating key tasks and continuously optimizing models, the blueprint helps enterprises reduce costs and improve performance. This is particularly valuable for companies dealing with large-scale AI applications, where manual workflow management is impractical. NVIDIA, a leader in AI and deep learning technologies, continues to innovate by providing tools that make advanced AI accessible to a broader audience. The Data Flywheel Blueprint is another step in this direction, offering a practical solution to the challenges of scaling and optimizing AI agents in production environments. For developers interested in building agentic workflows, the NVIDIA NeMo Agent toolkit provides seamless integration with the Data Flywheel Blueprint, leveraging its evaluation and profiling capabilities. NVIDIA encourages participation in webinars and Q&A sessions, scheduled for June 18 and June 26, to gain deeper insights into the blueprint's features and benefits. By adopting the Data Flywheel Blueprint, enterprises can build more efficient, accurate, and cost-effective AI agents, staying ahead in the competitive landscape of AI-driven applications.

Related Links