The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...

The definitive roadmap for .NET developers who want to master Artificial Intelligence. Get all 10 volumes of the "C# & AI Masterclass" series in one package. From basic syntax to orchestrating Autonomous Agents, Vector Databases, and Kubernetes swarms. Stop scripting in Python; start engineering in C#.
Bought separately
$242.97
Minimum price
$79.00
$99.00
About the Bundle
⚠️ THE SOFTWARE LANDSCAPE HAS CHANGED FOREVER.
It is no longer enough to know how to write a loop or a class. To survive and thrive in the new era of development, top engineers must know how to integrate Large Language Models (LLMs), orchestrate Autonomous Agents, and build high-performance Vector Systems directly into their .NET applications.
You don't need to switch to Python to build Enterprise AI.
This bundle collects the entire 10-volume C# & AI Masterclass series into a single, comprehensive curriculum. It is designed to take you from writing your first line of code to architecting distributed, cloud-native AI systems using the stack you already love: C# and .NET.
🚀 Why buy this Bundle?
📚 What is included?
This bundle includes all 10 eBooks and access to the complete Source Code Repository with examples, solution to exercises.
PHASE 1: THE FOUNDATIONS (Build the Muscle)
PHASE 2: MODERN ARCHITECTURE (Scale the System)
PHASE 3: AI ENGINEERING (Architect the Future)
🛠️ About the Practical Code
Theoretical knowledge is useless without execution. This series is backed by a comprehensive GitHub Repository containing:
👨💻 Who is this for?
Start your journey today. Become the Architect of the AI Era.
About the Books
Unlock the Power of Modern C#—From Your First Line of Code to Building Custom Objects!
Are you ready to master one of the most powerful and versatile programming languages in the world, but don't know where to start? Do you find other programming books too abstract or outdated? The C# Foundations is your practical, hands-on guide to learning C# from the ground up, designed specifically for the modern developer.
This book isn't just about syntax; it's about building a rock-solid mental model of how software works. Through clear explanations, real-world analogies, and step-by-step examples, you will journey from writing your first "Hello, World!" to designing your own custom data types with classes. This volume lays the essential groundwork for advanced topics like AI, cloud development with Azure, and game engineering with Unity.
Inside This Volume, You Will Discover:
Who Is This Book For?
Whether you're a complete beginner with zero programming experience, a student in a computer science course, or a developer transitioning from another language like Python or JavaScript, this book provides the structured, foundational knowledge you need to succeed. Each chapter builds logically on the last, ensuring you never feel lost.
Don't just learn to code—learn to think like a modern developer. Your journey to becoming a proficient C# programmer starts now.
Get the complete discounted "C# & Ai Masterclass" 10-Volumes set!
Table of contents
Chapter 1: The .NET Runtime & 'Hello World' - Understanding the Console
Chapter 2: Variables & Primitives - Integers, Doubles, and Storing Values
Chapter 3: Text Handling - Strings, Concatenation, and Interpolation
Chapter 4: Basic Math - Operators, Arithmetic, and Precedence
Chapter 5: Interacting with Humans - Console.ReadLine and Conversion
Chapter 6: Making Decisions - Booleans, Comparison, and 'if/else'
Chapter 7: Complex Decisions - Logical Operators (&&, ||) and Switch Statements
Chapter 8: The Loop of Logic - 'while' and 'do-while' Iterations
Chapter 9: The Counted Loop - Mastering the 'for' Loop
Chapter 10: Debugging & Logic - Finding Errors and Stepping Through Code
Chapter 11: Arrays - Storing Fixed Sequences of Data (Vectors)
Chapter 12: Iterating Data - The 'foreach' Loop and Array Traversal
Chapter 13: Defining Methods - Writing Reusable Code Blocks (Void)
Chapter 14: Data Flow - Parameters, Arguments, and Return Values
Chapter 15: Scope & Memory - Stack vs Heap and Variable Lifetime
Chapter 16: The Class Blueprint - Defining Custom Types
Chapter 17: Objects & State - Fields, Properties, and Encapsulation
Chapter 18: Constructors - strict Object Initialization
Chapter 19: Static vs Instance - Shared Data vs Individual Data
Chapter 20: Introduction to Lists - Moving beyond Fixed Arrays
Chapter 21: Math for AI - Using System.Math for Sigmoids and Distance
Chapter 22: Data Normalization - Converting Ranges (Loops + Math)
Chapter 23: Text Processing - Splitting Strings and Basic Tokenization
Chapter 24: File I/O - Saving and Loading Training Data (Simple Text)
Chapter 25: Capstone Project - Building a Rule-Based NLP Chatbot
If printed, this ebook would span over 300 pages. Each chapter is structured into theoretical foundations, an annotated basic example, an annotated advanced example, and five coding exercises based on real-world scenarios with complete solutions.
Ready to bridge the gap between foundational C# and professional AI development?
Many developers master the basics of object-oriented programming but struggle to build the complex, resilient, and high-performance systems required for modern Artificial Intelligence. Simple class hierarchies and basic memory management are not enough when you're dealing with massive datasets, GPU resources, and asynchronous API calls. This is where most developers get stuck.
Volume 2 of the C# and .NET Masterclass Series is your comprehensive guide to moving beyond the fundamentals. This book is meticulously crafted for intermediate C# developers who are ready to design and build the architectural backbone of production-ready AI applications. You will learn not just the "what" but the "why" behind the advanced patterns that separate hobby projects from enterprise-grade AI systems.
Inside, you will master:
This is more than a coding manual—it's an architectural playbook. Each chapter builds upon the last, culminating in a capstone project where you will design a complete, plugin-based chatbot architecture that applies all the principles you've learned.
Whether you're a .NET developer breaking into AI, an engineer transitioning from Python, or a student ready to build real-world systems, this book will give you the tools and confidence to architect sophisticated AI applications in C#.
Unlock the power of .NET for AI.
Check also the other books in this series
Table of contents
Chapter 1: Inheritance - Creating a Base 'Model' Class
Chapter 2: Polymorphism - Swapping Inference Engines (Virtual/Override)
Chapter 3: Abstract Classes vs Interfaces - The 'ILanguageModel' Contract
Chapter 4: Composition - Agents Having Tools vs Being Tools
Chapter 5: The Ultimate Base Class - System.Object and Boxing
Chapter 6: Enums and Flags - Managing Agent States (Idle, Thinking, Error)
Chapter 7: Generics <T> - Creating Reusable Data Pipelines
Chapter 8: Generic Constraints - Enforcing Type Safety in ML Pipelines
Chapter 9: Records - Immutable Data for Chat History (Messages)
Chapter 10: Nullable Reference Types - Handling Hallucinations and Empty Responses
Chapter 11: Delegates - Callbacks for Token Streaming
Chapter 12: Lambda Expressions - Inline Logic for Data Filtering
Chapter 13: Events - Reacting to 'ModelFinishedThinking' Signals
Chapter 14: Func<> and Action<> - Passing Logic as Parameters
Chapter 15: Extension Methods - Building Fluent Interfaces for AI Chains
Chapter 16: Exception Handling - Managing API Timeouts and Rate Limits
Chapter 17: File I/O - Saving and Loading Conversation Contexts
Chapter 18: Serialization (JSON) - Communicating with OpenAI/REST APIs
Chapter 19: Garbage Collection & IDisposable - Cleaning up GPU/Memory Resources
Chapter 20: Capstone Project - Building a Plugin-Based Chatbot Architecture
If printed, this ebook would span over 300 pages. Each chapter is structured into theoretical foundations, an annotated basic example, an annotated advanced example, and five coding exercises based on real-world scenarios with complete solutions.
Unlock the high-performance C# skills that power modern Artificial Intelligence.
Are you a C# developer ready to move beyond standard application development and dive into the world of high-performance data manipulation and AI? This book is your essential guide to bridging the gap between traditional collections and the powerful vector embeddings that are the lifeblood of today's neural networks.
In Volume 3 of the C# & AI Masterclass series, we leave the basics behind and explore the internal mechanics of .NET's most powerful data structures. You won't just learn how to use a Dictionary; you'll understand the hashing, collision resolution, and memory management that make it fast. You won't just write a LINQ query; you'll build clean, declarative, and scalable data pipelines that are the foundation of professional AI development.
What you will master in this volume:
This book is for intermediate C# developers who are serious about performance and want to apply their skills to the exciting and rapidly growing field of Artificial Intelligence. If you're ready to stop just using collections and start commanding them, this book is your next step.
Start your journey from collections to embeddings today and transform the way you handle data in C#.
Check also the other books in this series
Table of contents
Chapter 1: Lists, Dictionaries, and HashSets in Depth
Chapter 2: Custom Collections and Enumerators
Chapter 3: Introduction to Vectors - Arrays vs Tensors
Chapter 4: Immutable Collections for Thread-Safe Data
Chapter 5: Memory<T> and Span<T> - Zero Allocation Slicing
Chapter 6: LINQ Method Syntax vs Query Syntax
Chapter 7: Filtering and Projection (Select/Where)
Chapter 8: Sorting and Grouping Complex Data
Chapter 9: Parallel LINQ (PLINQ) for Big Data
Chapter 10: Building a Custom LINQ Provider
Chapter 11: System.Numerics.Tensors - The Foundation of AI
Chapter 12: Calculating Cosine Similarity with C#
Chapter 13: Matrix Multiplication Basics in .NET
Chapter 14: Distance Algorithms (Euclidean vs Manhattan)
Chapter 15: Normalizing Data for Machine Learning
Chapter 16: Parsing CSV/JSON Datasets for Fine-Tuning
Chapter 17: Tokenization Basics - Counting Words vs Tokens
Chapter 18: Streaming Data Processing with IAsyncEnumerable
Chapter 19: Handling Missing Data in Datasets
Chapter 20: Project - Building a Keyword Extraction Engine with LINQ
If printed, this ebook would span over 300 pages. Each chapter is structured into theoretical foundations, an annotated basic example, an annotated advanced example, and five coding exercises based on real-world scenarios with complete solutions.
Master High-Performance C# to Build the Next Generation of AI-Powered Applications
The AI revolution is here, but is your C# code ready for it? Modern AI systems, powered by Large Language Models (LLMs), demand more than just functional code—they require high-throughput, low-latency, and massively concurrent architectures. A simple blocking API call or an unhandled race condition can bring a sophisticated AI pipeline to its knees. This book is your definitive guide to mastering the advanced asynchronous and parallel programming techniques required to build production-grade AI systems in .NET.
Moving far beyond basic async/await, this volume deconstructs the patterns and primitives that power scalable software. Through practical examples, deep architectural insights, and a comprehensive capstone project, you will learn how to architect resilient pipelines that can ingest, process, and stream data efficiently, all while maintaining a responsive user experience.
Inside, you will discover how to:
This book is for intermediate to advanced C# developers and architects who are ready to move beyond theory and build the scalable, high-performance backend systems that the AI era demands. If you're tired of fighting with unresponsive applications, memory leaks, and flaky tests in your async code, this is the guide you've been waiting for.
Unlock the full potential of .NET and start building the next generation of intelligent, responsive, and resilient AI services today.
Check also the other books in this series
Table of contents
Chapter 1: The Cost of Latency - CPU vs I/O Bound in AI Inference
Chapter 2: The State Machine - How 'async' and 'await' really work
Chapter 3: Task vs ValueTask - Optimizing Memory in Hot Loops
Chapter 4: Context and Deadlocks - ConfigureAwait(false) in Libraries
Chapter 5: Converting Legacy Sync Code to Async Patterns
Chapter 6: From Lists to Streams - Introduction to IAsyncEnumerable<T>
Chapter 7: The 'await foreach' Loop - Consuming Data Asynchronously
Chapter 8: Streaming LLM Tokens - Implementing the 'Typewriter Effect'
Chapter 9: System.Threading.Channels - Building Producer/Consumer AI Pipelines
Chapter 10: Handling Backpressure - When the AI Generates Faster than the UI
Chapter 11: Concurrency vs Parallelism - Managing Threads in .NET
Chapter 12: Parallel.ForEachAsync - Batch Processing Embeddings efficiently
Chapter 13: The Scatter-Gather Pattern - Querying Multiple Models Simultaneously (Task.WhenAll)
Chapter 14: Thread Safety - Locks, Monitors, and Concurrent Collections
Chapter 15: Throttling - Using SemaphoreSlim to Respect API Rate Limits
Chapter 16: The CancellationToken - Stopping an Hallucinating Model Mid-Stream
Chapter 17: Timeouts and Delays - Avoiding Forever-Hanging Requests
Chapter 18: Exception Handling in Async Tasks - Unwrapping AggregateException
Chapter 19: Testing Async Code - Deterministic Testing for Non-Deterministic AI
Chapter 20: Capstone Project - Building a High-Throughput Async Document Ingestion Engine (ETL for RAG)
If printed, this ebook would span over 300 pages. Each chapter is structured into theoretical foundations, an annotated basic example, an annotated advanced example, and five coding exercises based on real-world scenarios with complete solutions.
Unlock the Future of Application Development by Mastering AI Backend APIs with ASP.NET Core!
The AI revolution is here, but powerful models are useless without robust, scalable, and secure backend infrastructure to serve them. This book is the definitive guide for experienced .NET developers looking to bridge the gap between traditional web development and the high-performance demands of modern AI applications. Move beyond simple CRUD APIs and learn to build the backbone of the next generation of intelligent software.
Written for production-focused engineers, this comprehensive volume deconstructs every critical component of an enterprise-grade AI Web API. You will progress from foundational architectural decisions to advanced real-time communication patterns, culminating in the creation of a complete backend for a ChatGPT-clone.
Inside, you will master:
This is not a theoretical overview; it is a practical, hands-on guide packed with code examples, architectural diagrams, and best practices forged in real-world scenarios. By the time you finish this book, you will have the skills and confidence to design, build, and deploy AI backend APIs that are not only intelligent but also scalable, secure, and resilient.
Stop just using AI—start building the platforms that power it. Grab your copy and become a leader in the new era of software development!
Check also the other books in this series
Table of contents
Chapter 1: Anatomy of an ASP.NET Core Project
Chapter 2: Controllers vs Minimal APIs - Performance Choices
Chapter 3: Dependency Injection (DI) Service Lifetimes
Chapter 4: Middleware Pipelines and Request Handling
Chapter 5: Configuration and Options Pattern (Managing API Keys)
Chapter 6: Server-Sent Events (SSE) for Streaming LLM Tokens
Chapter 7: SignalR - Building Real-Time Chat Channels
Chapter 8: WebSockets - Low Latency Audio Streaming
Chapter 9: gRPC for High-Performance Inter-Service AI Calls
Chapter 10: Background Services (IHostedService) for Model Loading
Chapter 11: Consuming OpenAI/Azure APIs with HttpClientFactory
Chapter 12: Resilience Patterns - Retries and Circuit Breakers (Polly)
Chapter 13: Caching Responses to Save API Costs (HybridCache)
Chapter 14: Rate Limiting Users in AI Applications
Chapter 15: Creating an OpenAI-Compatible Plugin Specification
Chapter 16: Authentication (JWT) & API Key Management
Chapter 17: Logging & Telemetry with OpenTelemetry
Chapter 18: API Documentation with Swagger/OpenAPI
Chapter 19: Error Handling and ProblemDetails
Chapter 20: Capstone - Building a 'ChatGPT-Clone' Backend API
If printed, this ebook would span over 300 pages. Each chapter is structured into theoretical foundations, an annotated basic example, an annotated advanced example, and five coding exercises based on real-world scenarios with complete solutions.
Transform Your Data Layer into the Brain of Your AI Application
The era of "dumb" databases is over. In the age of Generative AI, your application's data access layer must do more than just CRUD operations—it must understand meaning, manage context, and fuel intelligent decisions. Volume 6 of the C# & AI Masterclass is the definitive guide for .NET developers who need to bridge the gap between traditional Entity Framework Core architectures and the cutting-edge world of Vector Databases and Retrieval-Augmented Generation (RAG).
Unlock the Power of Intelligent Data Access
This book moves beyond simple tutorials. It dives deep into the architectural patterns required to build enterprise-grade AI systems. You will learn how to hybridize your SQL databases with vector search capabilities, ensuring your AI applications are not only smart but also scalable, secure, and transactional.
What's Inside:
Whether you are building a semantic search engine, an intelligent chatbot, or an automated document analysis system, this book provides the blueprint for your data infrastructure.
Stop building prototypes. Start architecting intelligent systems with C# and EF Core today.
Check also the other books in this series
Table of contents
Chapter 1: ORM Basics - Context, Models, and SQL
Chapter 2: Code-First Migrations and Database Design
Chapter 3: Relationships (One-to-Many, Many-to-Many)
Chapter 4: Querying with LINQ to SQL
Chapter 5: Change Tracking and Saving Data
Chapter 6: Introduction to Vector Stores - Why SQL isn't enough
Chapter 7: Using pgvector with PostgreSQL and EF Core
Chapter 8: Storing Embeddings (List<float>) in SQL Server
Chapter 9: Implementing Nearest Neighbor Search (ANN)
Chapter 10: Hybrid Search - Combining Keywords + Vectors
Chapter 11: Designing a Schema for Chat History
Chapter 12: Storing Structured Logs from LLM Chains
Chapter 13: Concurrency Control in Multi-User Chat
Chapter 14: Transactions and Rollbacks
Chapter 15: Performance Tuning - Indexing Vector Columns
Chapter 16: Repository Pattern vs Direct Context
Chapter 17: Multi-Tenancy for SaaS AI Apps
Chapter 18: Seeding Databases with Synthetic Data
Chapter 19: Interceptors - Auditing AI Prompts
Chapter 20: Capstone - Building a Semantic Search Engine for Documentation
If printed, this ebook would span over 300 pages. Each chapter is structured into theoretical foundations, an annotated basic example, an annotated advanced example, and five coding exercises based on real-world scenarios with complete solutions.
Architect the Future of Intelligent Systems with C# and Kubernetes
The era of the monolithic AI script is over. To build the next generation of enterprise software, you must stop treating AI agents as experimental toys and start treating them as resilient, scalable cloud-native microservices.
Cloud-Native AI Agents with C# is the definitive guide for .NET architects and developers who need to operationalize Artificial Intelligence at scale. This advanced volume moves beyond the basics of API calls, taking you deep into the engineering challenges of orchestrating distributed agent swarms.
In this book, you will not just write code; you will design systems. You will learn how to decouple cognitive logic from execution environments, manage expensive GPU resources efficiently, and build self-healing infrastructure that adapts to bursty inference workloads.
What You Will Build and Master:
Whether you are building a customer support bot that handles thousands of concurrent users or a complex multi-agent system for automated reasoning, this book provides the architectural patterns, C# code samples, and Kubernetes manifests you need to succeed.
Stop scripting. Start engineering. Scale your intelligence.
Check also the other books in this series
Table of contents
Chapter 1: Foundations of Cloud-Native AI: From Monoliths to Microservices
Chapter 2: Your First Agent: Containerizing a Simple C# Microservice
Chapter 3: The AI Agent as a Microservice: Core Principles and Design Patterns
Chapter 4: Advanced Containerization: Optimizing Runtimes for AI Workloads
Chapter 5: Scaling Principles: Latency, Throughput, and State Management
Chapter 6: Architecting for Inference: The Role of C# and Modern .NET
Chapter 7: Stateful Intelligence: Managing Agent Lifecycles with Kubernetes Operators
Chapter 8: Building the Control Plane: Agent Orchestration in C#
Chapter 9: The Distributed Nervous System: Inter-Agent Communication Patterns
Chapter 10: Dynamic Scaling: Orchestration with Kubernetes Autoscalers
Chapter 11: Scaling Inference Pipelines: From Theory to Practice
Chapter 12: High-Throughput Inference: Implementing Asynchronous Pipelines
Chapter 13: The Agent's Toolbox: Integrating External Services with MCP and .NET
Chapter 14: High-Performance Patterns: GPU Resource Management and Batching
Chapter 15: Scaling Inference Workloads: From HPA to Event-Driven Autoscaling
Chapter 16: Production-Ready Agents: CI/CD and Zero-Downtime Model Updates
Chapter 17: Infrastructure as Code: Managing Agent Deployments with Kubernetes Operators
Chapter 18: The Service Mesh: Resilience and Observability with Istio
Chapter 19: Persistent Intelligence: Managing Model Weights with Kubernetes Storage
Chapter 20: Orchestrating Agent Swarms: High-Throughput Inference with KEDA
Chapter 21: Advanced Orchestration: Building Custom Controllers and Schedulers
Chapter 22: Operationalizing Agent Lifecycles: Health Checks and Graceful Shutdowns
Chapter 23: Architecting Distributed Inference: Dynamic Batching and Stateful Orchestration
Chapter 24: From Agent to Swarm: Managing State and Communication at Scale
Chapter 25: Advanced Orchestration: GPU Partitioning and Stateful Agent Swarms
Chapter 26: Capstone Project: Building a Distributed Retrieval-Augmented Generation (RAG) Pipeline
If printed, this ebook would span over 300 pages. Each chapter is structured into theoretical foundations, an annotated basic example, an annotated advanced example, and five coding exercises based on real-world scenarios with complete solutions.
Unlock the Power of Agentic AI with C# and Microsoft Semantic Kernel
Are you a .NET developer ready to evolve from building static applications to architecting cognitive systems? The Core of AI Engineering is your definitive guide to mastering the Microsoft Semantic Kernel SDK.
This volume goes far beyond simple chatbots. It creates a bridge between the deterministic world of C# code and the probabilistic reasoning of Large Language Models (LLMs). Through rigorous theoretical foundations and production-ready code examples, you will learn to build Autonomous Agents that can plan, execute, and adapt.
What's Inside:
Whether you are connecting to Azure OpenAI or running local models via Ollama, this book provides the engineering patterns necessary to build enterprise-grade AI software. Stop writing scripts; start engineering intelligence.
Perfect for Senior Developers and Software Architects looking to define the future of .NET development.
Get the complete discounted "C# & Ai Masterclass" 10-Volumes set!
Table of contents
Chapter 1: Introduction to Semantic Kernel (SK) for .NET
Chapter 2: Configuring the Kernel - Azure OpenAI vs Ollama
Chapter 3: Prompt Templates and Semantic Functions
Chapter 4: The ChatCompletion Service
Chapter 5: Connector Handling and Dependency Injection
Chapter 6: Native Functions - Calling C# Code from LLMs
Chapter 7: Converting Existing APIs into Plugins
Chapter 8: The Handlebars Template Engine for Prompts
Chapter 9: Prompt Engineering Techniques in C# (Few-Shot, CoT)
Chapter 10: YAML Prompts and Serialization
Chapter 11: The Planner Concept - Auto-Orchestration
Chapter 12: Stepwise Planner vs Handlebars Planner
Chapter 13: Creating Autonomous Agents with Loops
Chapter 14: Multi-Agent Systems - The Persona Pattern
Chapter 15: Handling Hallucinations and Errors in Plans
Chapter 16: TextMemory and Volatile Memory Store
Chapter 17: Building a RAG Pipeline with Kernel Memory
Chapter 18: Chunking Strategies for PDF/Text
Chapter 19: Filters and Hooks - Intercepting Agent Thoughts
Chapter 20: Capstone - Building a Full 'Jarvis' Assistant for Windows
If printed, this ebook would span over 300 pages. Each chapter is structured into theoretical foundations, an annotated basic example, an annotated advanced example, and five coding exercises based on real-world scenarios with complete solutions.
Unleash the Power of Local AI with C# and .NET
Are you a C# developer looking to integrate cutting-edge AI without relying on expensive, slow, and privacy-invading cloud APIs? Book 9: Edge AI & Local Inference is the definitive guide to running Large Language Models (LLMs), Computer Vision, and Audio models directly on your user's hardware.
Move beyond Python wrappers. This volume teaches you how to architect high-performance, native .NET solutions using ONNX Runtime, LlamaSharp, and Microsoft.ML. You will learn to build applications that are offline-capable, lightning-fast, and completely private.
What's Inside:
Whether you are building a smart IoT gateway, a privacy-focused desktop tool, or a high-throughput local server, this book provides the production-ready code and architectural patterns you need.
Stop paying per token. Start building on the Edge.
Table of contents
Chapter 1: Cloud vs Local - Privacy, Latency, and Cost
Chapter 2: Understanding Model Formats - ONNX vs GGUF
Chapter 3: Quantization Explained (FP16, INT8, INT4)
Chapter 4: Hardware Acceleration - CUDA, DirectML, and NPUs
Chapter 5: Setting up the Local Environment
Chapter 6: Introduction to LlamaSharp
Chapter 7: Loading GGUF Models (Llama 3, Phi-3)
Chapter 8: Managing Context Windows Locally
Chapter 9: Streaming Inference to the Console
Chapter 10: Stateful Chat Sessions in Local Memory
Chapter 11: Introduction to Microsoft.ML
Chapter 12: Running BERT for Text Classification
Chapter 13: Object Detection with YOLO and ONNX
Chapter 14: Text-to-Speech (TTS) with Local Models
Chapter 15: Whisper.net - Local Audio Transcription
Chapter 16: Integrating AI into WPF/Windows Forms
Chapter 17: Background Processing without Freezing UI
Chapter 18: Offline RAG - Querying Local Files
Chapter 19: Fine-Tuning Basics (LoRA concepts)
Chapter 20: Capstone - Building a Private, Offline Coding Assistant
If printed, this ebook would span over 350 pages. Each chapter is structured into theoretical foundations, an annotated basic example, an annotated advanced example, and five coding exercises based on real-world scenarios with complete solutions.
Check also the other books in this series
Table of contents
Chapter 1: Cloud vs Local - Privacy, Latency, and Cost
Chapter 2: Understanding Model Formats - ONNX vs GGUF
Chapter 3: Quantization Explained (FP16, INT8, INT4)
Chapter 4: Hardware Acceleration - CUDA, DirectML, and NPUs
Chapter 5: Setting up the Local Environment
Chapter 6: Introduction to LlamaSharp
Chapter 7: Loading GGUF Models (Llama 3, Phi-3)
Chapter 8: Managing Context Windows Locally
Chapter 9: Streaming Inference to the Console
Chapter 10: Stateful Chat Sessions in Local Memory
Chapter 11: Introduction to Microsoft.ML
Chapter 12: Running BERT for Text Classification
Chapter 13: Object Detection with YOLO and ONNX
Chapter 14: Text-to-Speech (TTS) with Local Models
Chapter 15: Whisper.net - Local Audio Transcription
Chapter 16: Integrating AI into WPF/Windows Forms
Chapter 17: Background Processing without Freezing UI
Chapter 18: Offline RAG - Querying Local Files
Chapter 19: Fine-Tuning Basics (LoRA concepts)
Chapter 20: Capstone - Building a Private, Offline Coding Assistant
If printed, this ebook would span over 300 pages. Each chapter is structured into theoretical foundations, an annotated basic example, an annotated advanced example, and five coding exercises based on real-world scenarios with complete solutions.
Are you hitting the performance wall in your C# applications? Do Garbage Collection pauses kill your real-time AI inference latency? In the age of Large Language Models, standard coding practices aren't enough. You need to go deeper.
High-Performance C# for AI is not a beginner's guide—it is a masterclass in squeezing every nanosecond of performance out of the .NET runtime. This volume bridges the gap between high-level application development and low-level systems programming, equipping you with the tools to build blazing-fast tokenizers, tensor processors, and inference engines.
In this volume, you will master:
Whether you are building a local LLM runner, a high-frequency trading bot, or a real-time data processing pipeline, this book provides the architectural patterns and low-level techniques required to compete with C++ and Rust.
Stop waiting for the Garbage Collector. Take control of your memory. Build the next generation of AI infrastructure in C#.
Check also the other books in this series
Table of contents
Chapter 1: The Cost of Allocation - Measuring GC Pressure in AI Loops
Chapter 2: Span<T> - The Universal View for Zero-Allocation Slicing
Chapter 3: Memory<T> - The Asynchronous & Heap-Stable Counterpart
Chapter 4: ReadOnlySpan<char> - High-Performance String and Token Processing
Chapter 5: Renting Memory - ArrayPool<T> and Reusable Buffers
Chapter 6: Parallelism on a Single Core - Introduction to SIMD with Vector<T>
Chapter 7: Vectorizing Math - Writing Custom High-Performance Vector Operations
Chapter 8: The 'unsafe' Context - When and How to Use Pointers
Chapter 9: The 'fixed' Statement - Pinning Managed Memory for Native Interop
Chapter 10: stackalloc - Blazing-Fast, Temporary Memory on the Stack
Chapter 11: GC Internals - Generations, LOH, and Concurrent Collection
Chapter 12: Structs vs. Classes - A Performance Deep Dive
Chapter 13: The 'ref struct' Pattern - Enforcing Stack-Only Lifetime
Chapter 14: Avoiding Defensive Copies - 'in' Parameters and 'readonly' Members
Chapter 15: Low-Latency GC - Tuning the Runtime for Real-Time Inference
Chapter 16: The Art of Measurement - Mastering BenchmarkDotNet
Chapter 17: Profiling in Production - Using dotnet-trace and dotnet-counters
Chapter 18: Case Study - Optimizing a GPT-2 Tokenizer from Scratch
Chapter 19: Case Study - Accelerating Cosine Similarity with SIMD and Span<T>
Chapter 20: Capstone - Building a High-Performance Inference Pipeline for a Local LLM
If printed, this ebook would span over 300 pages. Each chapter is structured into theoretical foundations, an annotated basic example, an annotated advanced example, and five coding exercises based on real-world scenarios with complete solutions.
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.
Learn more about writing on Leanpub
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.