Skip to Content
Building Agentic Solutions with Microsoft Foundry
book

Building Agentic Solutions with Microsoft Foundry

by Colby T. Ford
September 2026
Intermediate to advanced
260 pages
5h 50m
English
O'Reilly Media, Inc.
Content preview from Building Agentic Solutions with Microsoft Foundry

Chapter 8. Local Inferencing and Edge-Deployed AI

In this chapter, we will learn about local model inferencing through Foundry Local. We will also walk through the process of preparing and running models from Hugging Face locally on your laptop. Technically, for many of the open source models available on repositories like Hugging Face, you can run them locally using inferencing logic built on the Transformers framework or using PyTorch directly without any optimization or special deployment logic. However, even when a model runs, it may not be running as well as it could. In production, AI engineers may need to set up tokenizer handling, chat templates, KV cache management, quantization, execution providers, memory planning, batching strategies, etc., to get optimal performance.

Thus, if we don’t wish to manage the complexities of inferencing logic and want to ensure optimal performance on our hardware, using local inferencing tools like Foundry Local and optimization pipelines like Olive can make the process much easier and more efficient. Planning for different hardware capabilities and optimizing models accordingly is crucial for a good experience when running AI models locally, especially as model sizes and capabilities continue to grow.

Scenarios for Local Deployment

There are many scenarios where running AI models locally on your device can be beneficial compared to relying on cloud-based inference. Some of the key themes include: privacy, remote settings, and cost/latency ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Microsoft Foundry in Action

Microsoft Foundry in Action

Eduardo Sojo
Agentic AI with Microsoft Foundry

Agentic AI with Microsoft Foundry

Balamurugan Balakreshnan, Sina Fakhraee, Jay Padhya, Minsoo Thigpen
Developing Apps with GPT-4 and ChatGPT

Developing Apps with GPT-4 and ChatGPT

Olivier Caelen, Marie-Alice Blete
AWS for Solutions Architects - Third Edition

AWS for Solutions Architects - Third Edition

Saurabh Shrivastava, Neelanjali Srivastav, Dhiraj Thakur

Publisher Resources

ISBN: 0642572309817Errata Page