<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[The AI Merge]]></title><description><![CDATA[A technical publication for engineers designing, building, and deploying AI systems beyond demos. Delivered weekly.]]></description><link>https://read.theaimerge.com</link><image><url>https://substackcdn.com/image/fetch/$s_!YHcT!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1e32bad-63e7-43b3-8e62-80de774828de_1280x1280.png</url><title>The AI Merge</title><link>https://read.theaimerge.com</link></image><generator>Substack</generator><lastBuildDate>Sun, 05 Apr 2026 20:47:48 GMT</lastBuildDate><atom:link href="https://read.theaimerge.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Alex Razvant]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[theaimerge@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[theaimerge@substack.com]]></itunes:email><itunes:name><![CDATA[Alex Razvant]]></itunes:name></itunes:owner><itunes:author><![CDATA[Alex Razvant]]></itunes:author><googleplay:owner><![CDATA[theaimerge@substack.com]]></googleplay:owner><googleplay:email><![CDATA[theaimerge@substack.com]]></googleplay:email><googleplay:author><![CDATA[Alex Razvant]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Building a Local AI Task Manager with PydanticAI and Ollama]]></title><description><![CDATA[A practical introduction to agent-based architectures using typed models, tools, and runtime context in Pydantic AI.]]></description><link>https://read.theaimerge.com/p/building-a-local-ai-task-manager</link><guid isPermaLink="false">https://read.theaimerge.com/p/building-a-local-ai-task-manager</guid><dc:creator><![CDATA[Alex Razvant]]></dc:creator><pubDate>Sun, 22 Mar 2026 14:03:18 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/9298843b-bbc8-47a2-8ba9-c0db6a180182_6000x3375.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="pullquote"><p><em>Welcome to The AI Merge. Where you learn practical, production-ready AI/ML Engineering. Join over <strong><a href="https://multimodalai.substack.com/subscribe">9000+ engineers</a></strong> and build real-world AI Systems.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/subscribe?"><span>Subscribe now</span></a></p></div><p>In <strong>MAVS&nbsp;(Multi-Agent Vision System)</strong>, my upcoming course, a part of the architecture is an A2A agent network. The agents coordinate on tasks, decide what needs to happen next, and split execution across the system.</p><p>While building that layer, I looked at a few frameworks: CrewAI, Google ADK, PydanticAI, and LangGraph. LangGraph was the first candidate and a strong fit for complex agent systems, giving you a lot of control over how agents move through a workflow. But I felt there were already a ton of examples on building LG Agents, and I wanted to try something new.</p><p><strong>I ended up choosing PydanticAI.</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dUan!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0397cbc0-bcf6-4865-b98c-9b309ecba77b_3375x4219.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dUan!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0397cbc0-bcf6-4865-b98c-9b309ecba77b_3375x4219.png 424w, https://substackcdn.com/image/fetch/$s_!dUan!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0397cbc0-bcf6-4865-b98c-9b309ecba77b_3375x4219.png 848w, https://substackcdn.com/image/fetch/$s_!dUan!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0397cbc0-bcf6-4865-b98c-9b309ecba77b_3375x4219.png 1272w, https://substackcdn.com/image/fetch/$s_!dUan!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0397cbc0-bcf6-4865-b98c-9b309ecba77b_3375x4219.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dUan!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0397cbc0-bcf6-4865-b98c-9b309ecba77b_3375x4219.png" width="1456" height="1820" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0397cbc0-bcf6-4865-b98c-9b309ecba77b_3375x4219.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1820,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:549764,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://read.theaimerge.com/i/189547957?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0397cbc0-bcf6-4865-b98c-9b309ecba77b_3375x4219.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dUan!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0397cbc0-bcf6-4865-b98c-9b309ecba77b_3375x4219.png 424w, https://substackcdn.com/image/fetch/$s_!dUan!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0397cbc0-bcf6-4865-b98c-9b309ecba77b_3375x4219.png 848w, https://substackcdn.com/image/fetch/$s_!dUan!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0397cbc0-bcf6-4865-b98c-9b309ecba77b_3375x4219.png 1272w, https://substackcdn.com/image/fetch/$s_!dUan!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0397cbc0-bcf6-4865-b98c-9b309ecba77b_3375x4219.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>It is not as flexible or as mature as LangGraph, but it felt much closer to the way I already build Python applications. If you know Pydantic or FastAPI, the dev experience is similar: typed models, explicit structure, clear tool definitions, and code that is easy to follow.</p><p>PydanticAI does have real limits. In my experience, wiring native agent tools can feel rigid, and the flow control is more manual than it should be, but it&#8217;s still a good fit. </p><p>As an exercise to get familiar with the course&#8217;s tech stack, I decided to write a series of articles with quick end-to-end examples of actual tools and frameworks I&#8217;ve used in the course.</p><p>In this article, we will start with a small agent-powered app, a Task Manager that runs local models through Ollama and uses PydanticAI for the agent layer. The AI handles intent such as adding a task, marking work complete, or listing overdue items.</p><p>I will break the app down piece by piece and show how the PydanticAI concepts map to a real application architecture.</p><div><hr></div><h3>Table of Contents</h3><ul><li><p>The LLM Engine</p></li><li><p>Project Scaffolding</p></li><li><p>Defining Agent Schemas</p></li><li><p>Agents Runtime Context</p></li><li><p>Defining the Task &amp; Report Agents</p></li><li><p>Adding Tools</p></li><li><p>The Agent Execution Flow</p></li><li><p>Demo</p></li></ul><blockquote><p>Please use the navigation bar on the left to go through the article sections.</p></blockquote><div><hr></div><h2>Step 1 - The LLM Engine</h2><p>We&#8217;ll use Ollama to run the local LLMs powering our Pydantic AI Agents. Ollama is one of the most popular solutions for running LLMs locally. It&#8217;s straightforward and super easy to set up.</p><blockquote><p>tl;dr Ollama is built in Go, as an optimized serving layer on top of actual LLM models running in llama.cpp. You can consider Ollama as a wrapper over llama.cpp, which abstracts the setup complexity of a llama.cpp server.</p><p>For a complete guide on how Ollama works, <a href="https://read.theaimerge.com/p/the-complete-guide-to-ollama-local">see this article.</a></p></blockquote><p>For the context of this article, however, we can simply install and use Ollama following these 3 steps:</p><p><strong>Step 1.1 - Install Ollama on your Machine</strong></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">curl -fsSL https://ollama.com/install.sh | sh</code></pre></div><p><strong>Step 1.2 - Start the Ollama Server</strong></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">ollama serve</code></pre></div><p><strong>Step 1.3 - Pull Qwen3:4B from Ollama Registry</strong></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">ollama pull qwen3:4b</code></pre></div><div><hr></div><h2>Step 2 - Project Scaffolding</h2><p>At this step, we need to set up a new Python project, install the required dependencies upfront, and prepare the project structure before starting to implement the components one by one.</p><p>For that, we&#8217;ll use <em><strong>astral/uv</strong></em>, a fast Python Project &amp; Dependency manager built in Rust, that&#8217;s a drop-in replacement for other package managers (e.g., Conda, Poetry, requirements.txt). </p><blockquote><p>If you&#8217;re working with Python and still use requirements.txt/poetry/conda to manage your dependencies, I strongly recommend porting to UV.</p></blockquote><p><strong>Step 2.0 - Install Uv</strong></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">curl -LsSf https://astral.sh/uv/install.sh | sh</code></pre></div><p><strong>Step 2.1 - Creating a new Project</strong></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">uv init --package pyai-starter</code></pre></div><p><strong>Step 2.2 - Installing the Dependencies</strong></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">uv add pydantic httpx pydantic-ai</code></pre></div><p><strong>Step 2.3 - Activating the Environment</strong></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">cd pyai-starter &amp;&amp; source .venv/bin/activate</code></pre></div><div><hr></div><h2>Step 3 - Defining Agent Schemas</h2><p>Before reaching the LLMs &amp; Agents part, we start with the contract schema that will keep the AI layer grounded. </p><p>In our application, the schema does more than validate the data as it defines the domain. Once we have a clear Task model, every tool and agent can operate against the same data contract.</p><p>In doing that, we make our Agent work towards typed data structures that our application already understands.</p><p><strong>Step 3.1 - Data Contracts for a Task</strong></p><p>The following models will help us define the <code>state</code> of a Task, and will help the Agent understand how to map and interpret what a Task is.</p><ul><li><p><strong>Task</strong> - the core Pydantic Model with typed fields (id, title, status, priority, etc.)</p></li><li><p><strong>TaskStatus</strong> - a string enum with Pending | InProgress | Cancelled | Completed.</p></li><li><p><strong>TaskPriority</strong> - a string enum with Low | Medium | High | Urgent</p></li></ul><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">class TaskStatus(str, Enum):
    """Task completion status."""
    PENDING = "pending"
    IN_PROGRESS = "in_progress"
    COMPLETED = "completed"
    CANCELLED = "cancelled"


class TaskPriority(str, Enum):
    """Task priority levels."""
    LOW = "low"
    MEDIUM = "medium"
    HIGH = "high"
    URGENT = "urgent"


class Task(BaseModel):
    """
    Domain model for a task.
    """
    id: int = Field(description="Unique task identifier")
    title: str = Field(description="Short description of what needs to be done")
    status: TaskStatus = Field(default=TaskStatus.PENDING, description="Current task status")
    priority: TaskPriority = Field(default=TaskPriority.MEDIUM, description="Task priority level")
    due_date: date | None = Field(default=None, description="Optional deadline (YYYY-MM-DD)")
    notes: str | None = Field(default=None, description="Additional details about the task")
    tags: list[str] = Field(default_factory=list, description="A label assigned to the Task")
    created_at: datetime = Field(default_factory=datetime.now, description="When the task was created")</code></pre></div><p>When defining BaseModels for the Agent to use when serializing structured output, one useful tip is to always populate description fields, as it introduces additional context for the agent, making it understand how to manage/populate a field on output.</p><blockquote><p>Although in low measure, keep in mind that these still have an impact on model&#8217;s context window. It may not be obvious on short turns, but on long enough conversations, every token counts.</p></blockquote><p><strong>Step 3.2 - The Results Object</strong></p><p>Here, we&#8217;ll define two additional Pydantic Models to describe a TaskReport for getting overview details on all tasks, and a ReportNarrative for a summary across multiple tasks. Both of these Pydantic models will help the LLM format its responses in structured output.</p><ul><li><p>TaskReport - the structured result returned by the Task Agent.</p></li><li><p>ReportNarrative - the structured status report across multiple tasks.</p></li></ul><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">class TaskReport(BaseModel):
    """Structured summary report of task status."""
    total_tasks: int = Field(description="Total number of tasks")
    pending_count: int = Field(description="Tasks not yet started")
    in_progress_count: int = Field(description="Tasks currently being worked on")
    completed_count: int = Field(description="Tasks that are done")
    urgent_pending: list[str] = Field(description="Titles of urgent tasks not yet completed")
    summary: str = Field(description="Brief 1-2 sentence status summary")
    recommendation: str = Field(description="One clear next action for the user")


class ReportNarrative(BaseModel):
    """LLM-authored narrative grounded in provided task stats."""
    summary: str = Field(description="Brief 1-2 sentence status summary based only on provided stats")
    recommendation: str = Field(description="One clear next action based only on provided stats")</code></pre></div><h2>Step 4 - Agents Runtime Context</h2><p>Agents will need to have access to the runtime state created or modified during a session. This runtime state shouldn&#8217;t live in a prompt directly, but be invoked on demand.</p><blockquote><p>The <strong>runtime context</strong> is the <em>extra data we pass into an agent at run time</em> that is not part of the prompt or output schema. That is still accessible to tools, validators, and logic while the agent runs.</p></blockquote><p>One example that helps with this idea is how Coding Agents work. During a session, the internal state is modified multiple times (list_directory, create_file, delete_file). </p><p>The Agent will be aware of these actions, and will mention them in its history - but won&#8217;t keep the log loaded in its prompt context, as it might get it confused.</p><p>All these dynamic actions are passed between Agent steps as a runtime state, a log that the Agent could interrogate to see what has been modified during its execution.</p><p>In PydanticAI, we can define a custom object that contains sub-objects we want to track in state, and then use dependency injection to make it available to the Agent&#8217;s runtime context.</p><p><strong>Step 4.1 - Defining the TaskRepository</strong></p><p>This is our in-memory task storage, with CRUD operations to enable actions that&#8217;ll modify the state.</p><p>We&#8217;ll have actions such as:</p><ul><li><p><strong>Create</strong> - adding a new task to the repository.</p></li><li><p><strong>Get</strong> - fetching a task by ID.</p></li><li><p><strong>ListAll</strong> - lists all tasks in the repository.</p></li><li><p><strong>ListByStatus</strong> - filter tasks given a state.</p></li><li><p><strong>ListPending</strong> - filter tasks in the Pending state.</p></li><li><p><strong>Search</strong> - to search by title.</p></li><li><p><strong>GetStats</strong> - to aggregate and display a report.</p></li></ul><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;1cd48f41-9297-4b45-8062-c653b64cb94a&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">class TaskRepository:
    def __init__(self):
        self._tasks: dict[int, Task] = {}
        self._next_id: int = 1
    
    def create(self, title: str, priority: TaskPriority = TaskPriority.MEDIUM,
               due_date: date | None = None, notes: str | None = None,
               tags: list[str] | None = None) -&gt; Task:
        task = Task(
            id=self._next_id,
            title=title,
            priority=priority,
            due_date=due_date,
            notes=notes,
            tags=tags or [],
        )
        self._tasks[task.id] = task
        self._next_id += 1
        return task
    
    def get(self, task_id: int) -&gt; Task | None:
        return self._tasks.get(task_id)
    
    def list_all(self) -&gt; list[Task]:
        priority_order = {TaskPriority.URGENT: 0, TaskPriority.HIGH: 1, 
                         TaskPriority.MEDIUM: 2, TaskPriority.LOW: 3}
        return sorted(
            self._tasks.values(),
            key=lambda t: (priority_order[t.priority], t.created_at)
        )
    
    def list_by_status(self, status: TaskStatus) -&gt; list[Task]:
        return [t for t in self.list_all() if t.status == status]
    
    def update_status(self, task_id: int, status: TaskStatus) -&gt; Task | None:
        task = self._tasks.get(task_id)
        if task:
            task.status = status
        return task
    
    def delete(self, task_id: int) -&gt; bool:
        if task_id in self._tasks:
            del self._tasks[task_id]
            return True
        return False
    
    def search(self, query: str) -&gt; list[Task]:
        query_lower = query.lower()
        return [t for t in self.list_all() if query_lower in t.title.lower()]
    
    def get_stats(self) -&gt; dict:
        all_tasks = self.list_all()
        return {
            "total": len(all_tasks),
            "pending": sum(1 for t in all_tasks if t.status == TaskStatus.PENDING),
            "in_progress": sum(1 for t in all_tasks if t.status == TaskStatus.IN_PROGRESS),
            "completed": sum(1 for t in all_tasks if t.status == TaskStatus.COMPLETED),
            "urgent_pending": [t.title for t in all_tasks 
                              if t.priority == TaskPriority.URGENT 
                              and t.status not in (TaskStatus.COMPLETED, TaskStatus.CANCELLED)],
        }</code></pre></div><p><strong>Step 4.2 - Defining the TaskDeps</strong></p><p>With TaskDeps, we&#8217;ll keep track of the runtime dependencies we want to pass to our Agent via dependency injection. This can be a simple dataclass, where we instantiate:</p><ul><li><p><strong>TaskRepository</strong> - such that the Agent would have access to add/modify/delete entire tasks or their states, and have the baseline to generate a report.</p></li></ul><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">@dataclass
class TaskDeps:
    """
    Runtime dependencies for the task agent. Injected into Agent's runtime context.
    """
    task_repo: TaskRepository</code></pre></div><blockquote><p>We&#8217;re using dataclass and not BaseModel, since dependencies are for runtime injection, not really used by the Agent for output schema generation.</p></blockquote><h2>Step 5 - Defining the Task &amp; Report Agents</h2><p>At this step, since we&#8217;ve already defined the Runtime State for our Agents and the Pydantic Base models for structured Inputs/Outputs, we need to create the actual Agents.</p><p>For that, we&#8217;ll have to do two things:</p><ol><li><p>Create an OpenAI API Compatible Connection</p></li><li><p>Compose the Agents</p></li></ol><p><strong>Step 5.1 - The BuildModel Function</strong></p><p>Since we&#8217;re using Ollama to serve LLMs, and it being OpenAI API compatible, the setup becomes as simple as specifying the Model Provider, and then during the Pydantic AI Agent instantiation, we&#8217;ll wire up the model tag and provider URL.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">OLLAMA_URL = "http://localhost:11434/v1"
MODEL_NAME = "qwen3:4b"

def build_model() -&gt; OpenAIChatModel:
    return OpenAIChatModel(
        model_name=MODEL_NAME,
        provider=OpenAIProvider(
            base_url=OLLAMA_URL
        ),
    )</code></pre></div><p><strong>Step 5.1 - The Task Agent</strong></p><p>The anatomy of any PydanticAI Agent is composed of:</p><ul><li><p><strong>Model</strong> - here we pass the <code>OpenAIModel</code> created above.</p></li><li><p><strong>DepsType</strong> - the runtime state model TaskDeps we&#8217;ve defined above.</p></li><li><p><strong>Retries</strong> - a safeguard to tell the model how many times it can retry a failed run, such as failing to serialize the correct Pydantic model.</p></li><li><p><strong>SystemPrompt</strong> - the base instructions for the Agent.</p></li></ul><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">task_agent = Agent[TaskDeps, str](
    model=build_model(),
    deps_type=TaskDeps,
    retries=2,
    system_prompt="""You are a task management assistant. You help users manage their to-do list. You should be concise and to the point, answers should be fast.

Your capabilities:
- Create new tasks with title, priority, due date, and notes
- List tasks (all, pending, or by status)
- Mark tasks as in-progress, completed, or cancelled
- Search tasks by keyword
- Get the current time in any timezone

Guidelines:
- Use the appropriate priority level based on user language (urgent, high, medium, low)
- Format task lists clearly with status indicators

Available tools will let you perform these operations on the user's task list.""",
)</code></pre></div><p><strong>Step 5.1 - The Report Agent</strong></p><p>Same as the above, only changing the base instructions in the SystemPrompt.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">report_agent = Agent[TaskDeps, ReportNarrative](
    model=build_model(),
    deps_type=TaskDeps,
    output_type=ReportNarrative,
    retries=1,
    system_prompt="""You write short task status narratives from provided repository stats.

Rules:
- Use only the numbers and task titles provided in the prompt.
- Do not invent tasks, counts, percentages, or priorities.
- Keep the summary to 1-2 sentences.
- Give exactly one actionable recommendation.
- If there are no tasks, say so plainly.
""",
)</code></pre></div><p>Notice that, when defining an Agent, we&#8217;ve used square brackets (Template Style) to specify the I/O schemas the Agent should consider when parsing/composing responses.</p><ul><li><p><strong>For the TaskAgent</strong> <em><strong>[TaskDeps, str]</strong></em>- we&#8217;re passing TaskDeps as input, and expect plain str as output. That&#8217;s because this is our main Agent entry point, and we&#8217;ll chat with it.</p></li><li><p><strong>For the ReportAgent</strong> <em><strong>[TaskDeps, ReportNarrative]</strong></em>- we&#8217;ve used TaskDeps as input, such that the Agent can access our TaskRepository, but passed the <em><strong>ReportNarrative</strong></em> model as output. That means the ReportAgent will always try to serialize its output following the ReportNarrative Pydantic model we have.</p></li></ul><h2>Step 6 - Adding Tools</h2><p>At this stage, our Agents will hallucinate. They understand the schemas and what they can/should do - but don&#8217;t yet have the means to accomplish that. That&#8217;s why we need to define a set of tools to enable our Agents to manipulate and work with Tasks in our TaskRepository.</p><p>In PydanticAI, we can define two types of tools using decorators:</p><ul><li><p>Plain Tools <em><strong>(@agent.tool_plain) </strong>- </em>for when the Agent doesn&#8217;t need to know about its runtime context. For example, telling the current time.</p></li><li><p>Tools <em><strong>(@agent.tool) </strong>- </em>for when the Agent has a dependency on the runtime context. For example, moving a Task from the Pending state to the completed state implies access to the TaskRepository from the runtime context.</p></li></ul><p><strong>Step 6.1 - Adding tools to the Task Agent</strong></p><p>We&#8217;ll add a set of 6 different tools:</p><ol><li><p><strong>GetCurrentTime</strong> - plain text tool to get the current timestamp, without accessing the full Context.</p></li><li><p><strong>CreateTask</strong> - used to add a new task to our in-memory TaskRepository</p></li><li><p><strong>ListTasks</strong> - used to list all tasks in the TaskRepository</p></li><li><p><strong>UpdateTaskStatus</strong> - used to move any Task between states.</p></li><li><p><strong>SearchTasks</strong> - used to search by title.</p></li><li><p><strong>DeleteTask</strong> - used to remove a task from the Repository.</p></li></ol><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">@task_agent.tool_plain
async def get_current_time(timezone: str = "UTC") -&gt; str:
    """
    Get the current date and time in a specific timezone.
    
    Use this when the user asks about the time, or when you need
    to determine "today" or "tomorrow" for due dates.
    
    Args:
        timezone: IANA timezone name (e.g., "America/New_York", "Europe/London", "Asia/Tokyo")
    
    Returns:
        Current date and time as a formatted string
    """
    try:
        tz = ZoneInfo(timezone)
        now = datetime.now(tz)
        return f"Current time in {timezone}: {now.strftime('%Y-%m-%d %H:%M:%S %Z')} (weekday: {now.strftime('%A')})"
    except Exception:
        return f"Unknown timezone '{timezone}'. Use IANA names like 'America/New_York', 'Europe/London', 'Asia/Tokyo'."

@task_agent.tool
async def create_task(
    ctx: RunContext[TaskDeps],
    title: str,
    priority: Literal["low", "medium", "high", "urgent"] = "medium",
    notes: str | None = None,
) -&gt; str:
    """
    Create a new task. Today's date is provided in the response for reference.
    
    Args:
        title: What needs to be done
        priority: low, medium, high, or urgent
        notes: Optional details
    """
    today = date.today()
    task = ctx.deps.task_repo.create(
        title=title,
        priority=TaskPriority(priority),
        due_date=today,
        notes=notes,
        tags=[],
    )
    
    due_str = f", due {task.due_date}" if task.due_date else ""
    return f"Created task #{task.id}: '{task.title}' [{task.priority.value}]{due_str}. (Today is {today})"


@task_agent.tool
async def list_tasks(
    ctx: RunContext[TaskDeps],
    filter_status: Literal["all", "pending", "in_progress", "completed"] = "pending",
) -&gt; str:
    """
    List tasks from the to-do list.
    
    Use this when the user asks to see their tasks, to-do list, or what needs to be done.
    
    Args:
        filter_status: Which tasks to show
            - "pending": tasks not started (default, most useful)
            - "in_progress": tasks being worked on
            - "completed": finished tasks
            - "all": everything
    
    Returns:
        Formatted list of tasks with status, priority, and due dates
    """
    if filter_status == "all":
        tasks = ctx.deps.task_repo.list_all()
    elif filter_status == "pending":
        tasks = ctx.deps.task_repo.list_by_status(TaskStatus.PENDING)
    elif filter_status == "in_progress":
        tasks = ctx.deps.task_repo.list_by_status(TaskStatus.IN_PROGRESS)
    else:
        tasks = ctx.deps.task_repo.list_by_status(TaskStatus.COMPLETED)
    
    if not tasks:
        if filter_status == "pending":
            return "No pending tasks. You're all caught up!"
        return f"No {filter_status} tasks found."
    
    status_icons = {
        TaskStatus.PENDING: "&#9675;",
        TaskStatus.IN_PROGRESS: "&#9680;", 
        TaskStatus.COMPLETED: "&#10003;",
        TaskStatus.CANCELLED: "&#10007;",
    }
    
    lines = []
    for t in tasks:
        icon = status_icons.get(t.status, "?")
        due = f" (due: {t.due_date})" if t.due_date else ""
        lines.append(f"{icon} #{t.id}: {t.title} [{t.priority.value}]{due}")
    
    return "\n".join(lines)


@task_agent.tool
async def update_task_status(
    ctx: RunContext[TaskDeps],
    task_id: int,
    new_status: Literal["pending", "in_progress", "completed", "cancelled"],
) -&gt; str:
    """
    Update a task's status.
    
    Use this when the user wants to:
    - Start working on a task &#8594; "in_progress"
    - Mark a task as done/finished &#8594; "completed"
    - Cancel or remove a task &#8594; "cancelled"
    - Reset a task &#8594; "pending"
    
    Args:
        task_id: The task number (e.g., 1, 2, 3)
        new_status: The new status to set
    
    Returns:
        Confirmation message or error if task not found
    """
    task = ctx.deps.task_repo.update_status(task_id, TaskStatus(new_status))
    if task:
        return f"Task #{task.id} '{task.title}' is now {task.status.value}."
    return f"Task #{task_id} not found. Use list_tasks to see available tasks."


@task_agent.tool
async def search_tasks(ctx: RunContext[TaskDeps], query: str) -&gt; str:
    """
    Search tasks by keyword in the title.
    
    Use this when the user wants to find a specific task or tasks
    related to a topic.
    
    Args:
        query: Search term to look for in task titles
    
    Returns:
        List of matching tasks or message if none found
    """
    tasks = ctx.deps.task_repo.search(query)
    if not tasks:
        return f"No tasks found matching '{query}'."
    
    lines = [f"Found {len(tasks)} task(s) matching '{query}':"]
    status_icons = {
        TaskStatus.PENDING: "&#9675;",
        TaskStatus.IN_PROGRESS: "&#9680;",
        TaskStatus.COMPLETED: "&#10003;",
        TaskStatus.CANCELLED: "&#10007;",
    }
    for t in tasks:
        status = status_icons.get(t.status, "?")
        lines.append(f"  {status} #{t.id}: {t.title} [{t.priority.value}]")
    return "\n".join(lines)


@task_agent.tool
async def delete_task(ctx: RunContext[TaskDeps], task_id: int) -&gt; str:
    """
    Permanently delete a task.
    Use this only when the user explicitly wants to remove a task entirely.
    """
    if ctx.deps.task_repo.delete(task_id):
        return f"Task #{task_id} has been deleted."
    return f"Task #{task_id} not found."
</code></pre></div><p>After adding tools, we can make an important and interesting distinction. </p><p>This is strikingly similar to how MCPs standardize tool access for LLMs. In any Agent framework, using an  &#8220;<em>agent.tool&#8221; </em>decorator will register the Python method for the Agent&#8217;s execution context, as a callable function. </p><p>Similarly, when using MCP, the state is kept inside the MCP server, instead of the Agent&#8217;s runtime context. Both approaches provide schema-defined functions that an LLM can choose to invoke, making their interfaces conceptually similar, only that MCP is gated by a protocol boundary, with agents sending function names and attributes via JSON-RPC.</p><blockquote><p>Find more details on how MCPs work, in this <a href="https://read.theaimerge.com/p/mcp-is-just-a-fancy-api">MCP is Just A Fancy API</a> article.</p></blockquote><p><strong>Step 6.2 - Adding helpers for the Report Agent</strong></p><p>The scope for this sub-agent is narrow, that is, taking the current TaskRepository state and generating a summary report. Usually, here we&#8217;d use an intent classifier (small classifier LLM) to figure out from the user&#8217;s message if it should do a task report or not.</p><p>We&#8217;ll be doing that manually, using hardcoded key terms.</p><p>The Report Agent will use these two helpers:</p><ul><li><p><strong>IsReportRequest</strong> - figure out if the Report agent should be invoked.</p></li></ul><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">
def is_report_request(user_input: str) -&gt; bool:
    normalized = user_input.strip().lower()
    report_terms = (
        "report",
        "summary",
        "summarize",
        "status",
        "overview",
        "stats",
        "statistics",
    )
    return any(term in normalized for term in report_terms)</code></pre></div><ul><li><p><strong>DumpTasksForReport</strong> - a simple serializer method that takes the TaskRepository state and extracts it as plain text.</p></li></ul><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">def dump_tasks_for_report(task_repo: TaskRepository) -&gt; str:
    tasks = task_repo.list_all()
    if not tasks:
        return "Current task repository: no tasks."

    lines = ["Current task repository:"]
    for task in tasks:
        due = task.due_date.isoformat() if task.due_date else "none"
        notes = task.notes or "none"
        tags = ", ".join(task.tags) if task.tags else "none"
        lines.append(
            f"- id={task.id}; title={task.title}; status={task.status.value}; "
            f"priority={task.priority.value}; due_date={due}; tags={tags}; notes={notes}"
        )
    return "\n".join(lines)</code></pre></div><blockquote><p>We could have added this serialization to the TaskRepository BaseModel directly, or use the built-in .model_dump_json(). To separate boundaries between Agents, we&#8217;ll serialize outside the Pydantic model.</p></blockquote><h2>Step 7 - The Execution Flow</h2><p>At this point, we&#8217;ve already defined the core building blocks of the app: the task schema, runtime dependency object, model setup, agent definitions, and the tools the main agent can call.</p><p>The last step is wiring everything into an execution flow through a simple Gradio chat interface, where:</p><ul><li><p>The main task_agent handles task operations with streaming</p></li><li><p>The report_agent handles report-style requests</p></li><li><p>The UI decides which path to invoke</p></li></ul><blockquote><p>Gradio is an open-source Python library used to rapidly create customizable, shareable web-based user interfaces (UIs) for AI/ML usecases.</p></blockquote><p>For that, customized to our project example, we&#8217;ll need 2 methods:</p><ol><li><p>GenerateReport - executed whenever the ReportAgent is invoked.</p></li><li><p>CreateUIApp - this is where we wire together the Agent loop, UI components, and workflows.</p></li></ol><p><strong>Step 7.1 - Add the GenerateReport Function</strong></p><p>Instead of computing a separate stats object and converting it into a report model, we now pass the current repository state directly to the report agent.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">  def dump_tasks_for_report(task_repo: TaskRepository) -&gt; str:
      tasks = task_repo.list_all()
      if not tasks:
          return "Current task repository: no tasks."

      lines = ["Current task repository:"]
      for task in tasks:
          due = task.due_date.isoformat() if task.due_date else "none"
          notes = task.notes or "none"
          tags = ", ".join(task.tags) if task.tags else "none"
          lines.append(
              f"- id={task.id}; title={task.title}; status={task.status.value}; "
              f"priority={task.priority.value}; due_date={due}; tags={tags}; notes={notes}"
          )
      return "\n".join(lines)</code></pre></div><p>  What this does:</p><ul><li><p>reads the current in-memory tasks from TaskRepository</p></li><li><p>converts them into a compact plain-text dump</p></li><li><p>gives the report_agent the exact repository contents as prompt context</p></li><li><p>avoids extra report-only helpers and schemas</p></li></ul><p><strong>Step 7.2 - Step by Step Gradio UI (With Token Streaming)</strong></p><p>The main UI is still built inside create_ui_app(). This is where we store app state, define the async chat handler, and connect it to Gradio components.</p><ul><li><p><strong>RunStream</strong> (run_stream) - this is where Pydantic AI executes the agent loop.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">async with task_agent.run_stream(
    user_input,
    deps=state["deps"],
    message_history=state["history"],
    usage_limits=UsageLimits(request_limit=10),
) as stream:</code></pre></div><p><em><strong>What happens inside this context manager:</strong></em></p><ul><li><p>The agent sends the user input + message history to the LLM</p></li><li><p>The LLM decides whether to respond directly or call a tool</p></li><li><p>If a tool is called, the agent executes it and loops back to the LLM</p></li><li><p>This continues until the LLM produces a final text response</p></li></ul></li></ul><p>The run_stream method gives us access to this process <strong>as it happens</strong>, rather than waiting for the entire loop to complete.</p><ul><li><p><strong>Streaming Text Tokens to the UI </strong>- we iterate over text chunks as they arrive from the LLM.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">async for message in stream.stream_text(delta=True):
    streamed_text += message
    
    display = ""
    if tool_calls_shown:
        display = "\n".join(tool_calls_shown) + "\n\n"
    display += streamed_text
    
    updated_history = history + [{"role": "assistant", "content": display}]
    yield "", updated_history</code></pre></div><p><em><strong>What&#8217;s happening:</strong></em></p><ul><li><p>stream.stream_text(delta=True) yields incremental text tokens (e.g., &#8220;I&#8221;, &#8220;&#8217;ve&#8221;, &#8220; added&#8221;, &#8220; the&#8221;, &#8220; task&#8221;)</p></li><li><p>We accumulate these into streamed_text</p></li><li><p>Each iteration, we yield the updated history to Gradio</p></li><li><p>Gradio receives the yield and immediately updates the chatbot UI</p></li><li><p>The user sees tokens appear one by one, creating a &#8220;typing&#8221; effect</p></li></ul></li></ul><p><strong>Why delta=True?</strong> Without it, each iteration would return the full text so far. With delta=True, we get only the new characters, which we accumulate ourselves.</p><ul><li><p><strong>Extracting Tool Calls After Completion </strong>- we get the tool_calls from the message history, to show what the Agent did.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">state["history"] = stream.all_messages()

for msg in state["history"]:
    if hasattr(msg, 'parts'):
        for part in msg.parts:
            if isinstance(part, ToolCallPart):
                tool_str = f"&#128295; `{part.tool_name}({part.args})`"
                if tool_str not in tool_calls_shown:
                    tool_calls_shown.append(tool_str)

final_display = ""
if tool_calls_shown:
    final_display = "\n".join(tool_calls_shown) + "\n\n"
final_display += stream.response.text or ""</code></pre></div><p><em><strong>What&#8217;s happening:</strong></em></p><ul><li><p><code>stream.all_messages()</code> returns the complete conversation history, including tool calls and responses</p></li><li><p>We iterate through messages looking for <code>ToolCallPart</code> objects</p></li><li><p>We prepend these to the final display so users can see what tools were invoked.</p></li></ul></li><li><p><strong>Report Requests </strong>- figuring out if the agent should generate a task report.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">if is_report_request(user_input):
    try:
        result = await report_agent.run(
            f"{user_input}\n\n{dump_tasks_for_report(state['deps'].task_repo)}",
            deps=state["deps"],
            usage_limits=UsageLimits(request_limit=2),
        )
        response = result.output if isinstance(result.output, str) else str(result.output)
    except Exception as e:
        response = f"Error generating report: {e}"
    history = history + [{"role": "assistant", "content": response}]
    yield "", history
    return</code></pre></div><p><em><strong>What&#8217;s happening:</strong></em></p><ul><li><p>is_report_request(...) detects report-like prompts such as &#8220;report&#8221; or &#8220;summary&#8221;</p></li><li><p>We dump the current repository into text</p></li><li><p>We append that dump to the report prompt</p></li><li><p>report_agent.run(...) returns a plain text report</p></li><li><p>The response is added to chat history and shown in the UI</p></li></ul></li><li><p><strong>The UI Wiring (Gradio)</strong> - where we define the UI Gradio blocks.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">with gr.Blocks(title="Task List Agent") as app:
    chatbot = gr.Chatbot(height=450, type="messages")
    msg = gr.Textbox(placeholder="Add a task...", label="Message")
    clear = gr.Button("Clear All")
    
    msg.submit(chat_stream, [msg, chatbot], [msg, chatbot])
    clear.click(clear_all, outputs=[chatbot, msg])</code></pre></div><p><em><strong>What&#8217;s happening:</strong></em></p><ul><li><p><code>gr.Chatbot(type=&#8221;messages&#8221;)</code> expects the new dict format: <code>{&#8221;role&#8221;: &#8220;user/assistant&#8221;, &#8220;content&#8221;: &#8220;...&#8221;}</code></p></li><li><p><code>msg.submit()</code> connects the textbox to our chat_stream generator</p></li><li><p>Because <code>chat_stream</code> uses yield, Gradio automatically streams updates to the chatbot</p></li></ul></li></ul><p><strong>Step 7.3 - Full UI Code</strong></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">def create_ui_app():
    import gradio as gr
    from pydantic_ai.messages import ToolCallPart
    
    # Shared state
    state = {"deps": TaskDeps(task_repo=TaskRepository()), "history": []}
    
    async def chat_stream(user_input: str, history: list):
        if not user_input.strip():
            yield "", history
            return
        
        history = history + [{"role": "user", "content": user_input}]
        yield "", history
        
        if is_report_request(user_input):
            try:
                result = await report_agent.run(
                    f"{user_input}\n\n{dump_tasks_for_report(state['deps'].task_repo)}",
                    deps=state["deps"],
                    usage_limits=UsageLimits(request_limit=2),
                )
                response = result.output if isinstance(result.output, str) else str(result.output)
            except Exception as e:
                response = f"Error generating report: {e}"
            history = history + [{"role": "assistant", "content": response}]
            yield "", history
            return
        
        tool_calls_shown = []
        streamed_text = ""
        
        try:
            async with task_agent.run_stream(
                user_input,
                deps=state["deps"],
                message_history=state["history"],
                usage_limits=UsageLimits(request_limit=3),  # Limit LLM calls for speed
            ) as stream:
                async for message in stream.stream_text(delta=True):
                    streamed_text += message
                    
                    display = ""
                    if tool_calls_shown:
                        display = "\n".join(tool_calls_shown) + "\n\n"
                    display += streamed_text
                    
                    updated_history = history + [{"role": "assistant", "content": display}]
                    yield "", updated_history
                
                state["history"] = stream.all_messages()
                
                for msg in state["history"]:
                    if hasattr(msg, 'parts'):
                        for part in msg.parts:
                            if isinstance(part, ToolCallPart):
                                tool_str = f"&#128295; `{part.tool_name}({part.args})`"
                                if tool_str not in tool_calls_shown:
                                    tool_calls_shown.append(tool_str)
                
                final_display = ""
                if tool_calls_shown:
                    final_display = "\n".join(tool_calls_shown) + "\n\n"
                final_display += stream.response.text or ""
                
                history = history + [{"role": "assistant", "content": final_display}]
                yield "", history
                
        except Exception as e:
            history = history + [{"role": "assistant", "content": f"Error: {e}"}]
            yield "", history
    
    def clear_all():
        state["deps"] = TaskDeps(task_repo=TaskRepository())
        state["history"] = []
        return [], ""
    
    with gr.Blocks(title="Task List Agent") as app:
        gr.Markdown("# PydanticAI Task List Agent\nManage tasks with AI. Type `report` for a summary.")
        
        chatbot = gr.Chatbot(height=450)
        msg = gr.Textbox(placeholder="Add a task, list tasks, mark done...", label="Message")
        
        with gr.Row():
            clear = gr.Button("&#128465;&#65039; Clear All")
            gr.Examples(
                examples=["Add a high priority task: Review PR", "List my tasks", "Mark task 1 as done", "report"],
                inputs=msg,
            )
        
        msg.submit(chat_stream, [msg, chatbot], [msg, chatbot])
        clear.click(clear_all, outputs=[chatbot, msg])
    
    return app</code></pre></div><p><strong>Step 7.4 - Gradio Entrypoint</strong></p><p>Here we&#8217;ll wire the main entry point, set the server name, and the port on which the Gradio app will start.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:null}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">if __name__ == "__main__":
    app = create_ui_app()
    app.launch(server_name="0.0.0.0", server_port=7860, share=False)</code></pre></div><p>Then, since we&#8217;ve activated the Python virtual environment at Step 2.3, we can run our app using <code>python main.py</code>.</p><h2>Step 8 - Project Demo</h2><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;65c2f275-dbde-4509-8bc8-09a40d5a1ebe&quot;,&quot;duration&quot;:null}"></div><div><hr></div><h2>Conclusion</h2><p>In this article, we&#8217;ve built a fully working local AI application: a task manager powered by <strong>PydanticAI</strong>, running on a local <strong>Ollama</strong> model, and surfaced through a simple <strong>Gradio</strong> interface.</p><p>In practice, most AI engineers won&#8217;t stick to a single framework forever. Some will use LangGraph, others CrewAI, Mastra, ADK, and others will build their own loops in plain Python.</p><p>If you&#8217;re coming from a Python/FastAPI background, using PydanticAI should feel natural. It&#8217;s the same BaseModels, Pydantic Validations, typed data, and explicit structures.</p><p>In the context of the upcoming MAVS course, this is a small step into understanding the tech stack, frameworks, and tools used to build it, and acts as a short intro on the key concepts before diving into the full end-to-end system building.</p><p>The framework doesn&#8217;t matter as much as the architecture.</p><p>Hope you enjoyed this article!</p><div><hr></div><p>Images and Media were created by the author, if not otherwise stated.</p><div><hr></div><h4><strong>References</strong></h4><p><em>[1] Pydantic AI. (2024). Pydantic.dev. <a href="https://ai.pydantic.dev/">https://ai.pydantic.dev/</a></em></p><p><em>[2] Team, G. (2020). Gradio. Gradio.app. <a href="https://www.gradio.app/">https://www.gradio.app/</a></em></p><p><em>[3] Ollama. (2026). Ollama. <a href="https://ollama.com/">https://ollama.com/</a></em></p><p><em>[4] </em>The AI Merge. (2025, October 25). <em>The Complete Guide to Ollama: Local LLM Inference Made Simple (VIDEO)</em>. Theaimerge.com; The AI Merge. <a href="https://read.theaimerge.com/p/the-complete-guide-to-ollama-local">https://read.theaimerge.com/p/the-complete-guide-to-ollama-local</a></p>]]></content:encoded></item><item><title><![CDATA[Win an NVIDIA DGX Spark by joining me for Virtual NVIDIA GTC 2026]]></title><description><![CDATA[How to enter the giveaway - and what to expect if you&#8217;re an AI engineer building on DGX Spark.]]></description><link>https://read.theaimerge.com/p/win-an-nvidia-dgx-spark-by-joining</link><guid isPermaLink="false">https://read.theaimerge.com/p/win-an-nvidia-dgx-spark-by-joining</guid><dc:creator><![CDATA[Alex Razvant]]></dc:creator><pubDate>Sat, 14 Mar 2026 09:30:39 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!fyWR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa04318bf-67ab-4a16-9566-52034083a109_6000x3375.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>In this article, you&#8217;ll learn about:</strong></p><ul><li><p>How the giveaway works (and what counts as an entry)</p></li><li><p>A few Virtual GTC 2026 sessions I find interesting</p></li><li><p>What the DGX Spark is good for when you&#8217;re building AI systems locally</p></li><li><p>What I&#8217;ve been working on with it (and why local iteration still matters)</p></li><li><p>Where to find my DGX Spark unboxing + capabilities breakdown</p></li></ul><p>If you&#8217;ve deployed AI systems, you already know the fastest way to make progress is to shorten the &#8220;idea &#8594; run &#8594; inspect &#8594; iterate&#8221; loop. AI requires a lot of GPU compute, even for basic experiments. </p><p>Cloud is great and gives you the compute, but it costs you every time you want to debug. Local compute on the other hand gives you a different kind of control, especially when you&#8217;re iterating on data pipelines, model behavior, and end-to-end latency.</p><p>That&#8217;s the main reason I&#8217;ve enjoyed building on the <strong>NVIDIA DGX Spark</strong> for the past 6 months. It&#8217;s been a very practical machine for AI, learning, prototyping, fine-tuning, and building small-to-mid AI systems without having to rent cloud compute to test small bits of my code.</p><h2>The surprise: I&#8217;m giving away 1&#215; NVIDIA DGX Spark (Europe Only)</h2><p>For NVIDIA GTC 2026 (March 16&#8211;19), I&#8217;m doing a giveaway for my European audience. If you join me for Virtual GTC, you&#8217;ll have a chance to win <strong>a DGX Spark</strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fyWR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa04318bf-67ab-4a16-9566-52034083a109_6000x3375.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fyWR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa04318bf-67ab-4a16-9566-52034083a109_6000x3375.png 424w, https://substackcdn.com/image/fetch/$s_!fyWR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa04318bf-67ab-4a16-9566-52034083a109_6000x3375.png 848w, https://substackcdn.com/image/fetch/$s_!fyWR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa04318bf-67ab-4a16-9566-52034083a109_6000x3375.png 1272w, https://substackcdn.com/image/fetch/$s_!fyWR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa04318bf-67ab-4a16-9566-52034083a109_6000x3375.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fyWR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa04318bf-67ab-4a16-9566-52034083a109_6000x3375.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a04318bf-67ab-4a16-9566-52034083a109_6000x3375.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1624854,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://read.theaimerge.com/i/190913410?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa04318bf-67ab-4a16-9566-52034083a109_6000x3375.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fyWR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa04318bf-67ab-4a16-9566-52034083a109_6000x3375.png 424w, https://substackcdn.com/image/fetch/$s_!fyWR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa04318bf-67ab-4a16-9566-52034083a109_6000x3375.png 848w, https://substackcdn.com/image/fetch/$s_!fyWR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa04318bf-67ab-4a16-9566-52034083a109_6000x3375.png 1272w, https://substackcdn.com/image/fetch/$s_!fyWR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa04318bf-67ab-4a16-9566-52034083a109_6000x3375.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><blockquote><p>&#127873; Courtesy of NVIDIA.</p></blockquote><p>The Virtual GTC is free. And the entry rules are simple (details below).</p><h2>How to enter the DGX Spark giveaway</h2><ol><li><p><strong>Register for GTC 2026</strong> using my link. <strong><a href="https://nvda.ws/4qTY2Bn">https://nvda.ws/4qTY2Bn</a></strong></p></li><li><p><strong>Attend at least 1 virtual session</strong> <em>(Jensen&#8217;s Keynote does not count)</em></p></li><li><p><strong>Be a free subscriber to this newsletter. <a href="https://read.theaimerge.com/subscribe">Subscribe</a></strong></p></li><li><p><strong>Fill out my giveaway form after attending </strong><em><strong><a href="https://docs.google.com/forms/d/e/1FAIpQLScxXCbshzZ4pvPIsyjoPeqeD2TarzhSJeHdJ9ZE1nixP1er3w/viewform?usp=sharing&amp;ouid=117912100996776816274">Google Form</a></strong></em></p><ul><li><p>your <strong>name</strong></p></li><li><p>your <strong>country (Europe only)</strong></p></li><li><p>your <strong>email</strong></p></li><li><p><strong>which session</strong> you attended</p></li><li><p>a <strong>screenshot</strong> showing you attended that session</p></li><li><p>your <strong>favorite takeaway</strong> from that session</p></li></ul></li></ol><blockquote><p>Please read the form now (1min), to learn the extra steps required.</p></blockquote><div><hr></div><h3><strong>Quick FAQ:</strong></h3><ul><li><p><strong>Is Virtual GTC free?</strong> <br>Yes.</p></li><li><p><strong>Does the keynote count?</strong> <br>No. To qualify, you need to attend at least <strong>one virtual session</strong> (not the keynote).</p></li><li><p><strong>How do I fill in the form?</strong> <strong><br></strong>You&#8217;ll have to register with my link, attend a virtual session, take a screenshot of your attendance in the session, and fill-in the <em><a href="https://docs.google.com/forms/d/e/1FAIpQLScxXCbshzZ4pvPIsyjoPeqeD2TarzhSJeHdJ9ZE1nixP1er3w/viewform?usp=sharing&amp;ouid=117912100996776816274">Google Form</a>.</em></p></li><li><p><strong>I subscribed after attending a session, is that fine?</strong><br><strong>Yes.</strong> As long as you&#8217;re subscribed by the time you submit the giveaway form.</p></li><li><p><strong>Do I have to be a paid subscriber?</strong><br>Nope, free subscription is enough.</p></li><li><p><strong>Is this Europe Only?</strong> <br>Yes, this giveaway is for my European audience.</p></li><li><p><strong>Do I need to attend a specific session?</strong><br>No, any eligible virtual session counts (as long as it&#8217;s not the keynote).</p></li><li><p><strong>How do you verify subscription?</strong><br>The giveaway form will ask for the email you used to subscribe, so I can confirm eligibility.</p></li></ul><div><hr></div><h2>A few interesting Virtual GTC sessions</h2><p>Here are a few sessions that caught my eye, maybe you&#8217;ll find them interesting as well.</p><ol><li><p>AI Factories in Europe: Building the Foundations for Scalable Intelligence <a href="https://buff.ly/GofA3xa">S81899</a></p></li><li><p>Accelerate AI Through Open-Source Inference <a href="https://buff.ly/gMgq5fs">S81902</a></p></li><li><p>Teach AI to Code in Every Language With NVIDIA NeMo <a href="https://buff.ly/7l3i9si">S82306</a></p></li><li><p>From Data to Meaning: Vision-Language Models Shaping the Cities of Tomorrow <a href="https://buff.ly/gmFQeQs">S81867</a></p></li><li><p>Your Learning Pathway: Get Certified for Career Success <a href="https://buff.ly/1aczJHS">C81544</a></p></li></ol><div><hr></div><h2>Behind The Scenes and what I&#8217;ve been building on the Spark</h2><p>To describe it shortly, I&#8217;ve been using the Spark as my main AI development machine for a good few months. Before it, I had a PC with an RTX4080 (16GB VRAM) and an M1 Max for building with AI locally.</p><p>The Spark, with 128GB of unified memory tops that, allowing me to run multiple models and heavy processing workloads without looking at <code>nvtop</code> or GPU load charts.</p><p>Below you can find the main threads I&#8217;ve been tested and worked on with the Spark:</p><ol><li><p><strong>Local Finetuning</strong> - going through <a href="https://build.nvidia.com/spark">the 30+ Spark Playbooks</a> and <a href="https://unsloth.ai/docs/blog/fine-tuning-llms-with-nvidia-dgx-spark-and-unsloth">Unsloth Tutorials.</a></p></li><li><p><strong>Local Inference</strong> - with Ollama, LMStudio and llama.cpp</p></li><li><p><strong>Multi Agent Systems</strong> - with SLMs (Qwen3.5, GPT-OSS-20B/120B, and NVIDIA Nemotron Nano 30B-A3B)</p></li><li><p><strong>AI Systems</strong> - with Inference, Application, UI &amp; Backend as docker stacks, closely mirroring setups you&#8217;d see in real deployments.</p></li><li><p><strong>Edge AI</strong> - with Vision Models, Audio, LLMs and pretty much any multimodal pipelines and workflows.</p></li><li><p><strong>Agentic AI</strong> - MCP, A2A, PydanticAI, LangGraph, LangSmith, Opik.</p></li><li><p><strong>RAG &amp; Multimodal RAG</strong> - a few small projects, mainly on VSS (Video Search and Summarization)</p></li><li><p><strong>Computer Vision</strong> -  my old passion, running any workload from Object Detection, Multi-Camera Tracking, Instance Segmentation etc.</p></li><li><p><strong>Image/Video Generation</strong> - ComfyUI (Spark Playbooks)</p></li></ol><p>Bottom line is, you can do a lot with the Spark, from tiny PoC projects up to solid AI Systems that you can build &amp; validate, and then scale to real heavy workloads in cloud.</p><blockquote><p>If you&#8217;re curious on how the Spark looks like, it&#8217;s hardware and architecture details and what it can do. &#128071;</p></blockquote><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;6b859867-ded0-4d2e-9771-e656cc173146&quot;,&quot;caption&quot;:&quot;&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;lg&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Unboxing the NVIDIA DGX Spark: First Impressions&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:102147316,&quot;name&quot;:&quot;Alex Razvant&quot;,&quot;bio&quot;:&quot;Senior AI Engineer | Writing The AI Merge | Helping Engineers Build AI Beyond Demos&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e98b89ac-97e9-4875-88b6-2a5039668cb2_1700x1700.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-12-20T14:15:48.739Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!7urH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aa5c3b9-eb95-413b-99be-45bca760ab1c_1280x685.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://read.theaimerge.com/p/unboxing-my-nvidia-dgx-spark-first&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:181503991,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:15,&quot;comment_count&quot;:5,&quot;publication_id&quot;:2799726,&quot;publication_name&quot;:&quot;The AI Merge&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!iQW5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1dd942e3-bbf3-4bf7-8fbd-69b07006f323_1280x1280.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div><hr></div><h2>Wrap-up</h2><ul><li><p>Register for Virtual GTC with my link</p></li><li><p>Attend at least one virtual session <em>(not the keynote)</em></p></li><li><p>Submit the giveaway form <strong>attached in this article</strong></p></li><li><p>Make sure you&#8217;re a <strong>free subscriber</strong> so I can reach you if you win</p></li></ul><p>I&#8217;ll announce the winner <strong>shortly after GTC ends</strong>. In the meantime, if you want the practical breakdown of what the Spark can do (and what I&#8217;m building on it), the unboxing/capabilities article is linked above.</p><p>Register here: <a href="https://nvda.ws/4qTY2Bn">https://nvda.ws/4qTY2Bn</a></p><p>Good luck! &#129782;<br>Alex</p>]]></content:encoded></item><item><title><![CDATA[Local LLM Inference : llama.cpp, GGUF, Quantizations and GGML Explained]]></title><description><![CDATA[Learn how the llama.cpp runtime, GGML backend concepts, and GGUF model format fit together for fast local inference across devices.]]></description><link>https://read.theaimerge.com/p/an-ai-engineers-guide-to-running</link><guid isPermaLink="false">https://read.theaimerge.com/p/an-ai-engineers-guide-to-running</guid><dc:creator><![CDATA[Alex Razvant]]></dc:creator><pubDate>Tue, 03 Mar 2026 11:31:04 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/9e4192af-bb65-4f7b-92a2-65fbd9a38a93_5760x3240.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Welcome to TheAIMerge. I write about practical, production-ready AI/ML Engineering. Join over <strong><a href="https://substack.com/redirect/e9aea8cd-aa38-4b49-af8f-389aa0118bb7?j=eyJ1IjoiMW90ZGRnIn0.HKJMFtOiePuvPM5kD7mJ1rGHBeRyR0QKnoPnRGvcT8E">8500 engineers</a></strong> and build real-world AI Systems.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p>AI is moving closer to where data resides, at the edge.</p><p>Currently, in the industry, there seem to be two directions AI is taking, which both pull on different ends. One is chasing AGI, a mission for which the big AI Research labs are stacking on compute power, with examples from xAI&#8217;s Collosus [9] cluster, to Meta AI&#8217;s 600k order for Blackwell GPUs, to NScale AI [8] supercluster in Europe this year, and the list could go on.</p><p>However, the second one, which is more interesting, is <strong>Edge AI</strong>. And we&#8217;re seeing that with Meta Ray-Ban, Apple Intelligence, Figure AI Robots, Tesla Bots, or the famous Unitree G1 Robot. In the end, AI is going to run at the edge, or at least a big part of what we now need Cloud Compute for will sit on small, compute-efficient edge devices.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZZlP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7331af3-02ff-440b-a433-b3fab691b23e_1024x576.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZZlP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7331af3-02ff-440b-a433-b3fab691b23e_1024x576.png 424w, https://substackcdn.com/image/fetch/$s_!ZZlP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7331af3-02ff-440b-a433-b3fab691b23e_1024x576.png 848w, https://substackcdn.com/image/fetch/$s_!ZZlP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7331af3-02ff-440b-a433-b3fab691b23e_1024x576.png 1272w, https://substackcdn.com/image/fetch/$s_!ZZlP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7331af3-02ff-440b-a433-b3fab691b23e_1024x576.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZZlP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7331af3-02ff-440b-a433-b3fab691b23e_1024x576.png" width="1024" height="576" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e7331af3-02ff-440b-a433-b3fab691b23e_1024x576.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:576,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Edge AI market size by region, and growth forecast (2025-2030)&quot;,&quot;title&quot;:&quot;Edge AI market size by region, and growth forecast (2025-2030)&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Edge AI market size by region, and growth forecast (2025-2030)" title="Edge AI market size by region, and growth forecast (2025-2030)" srcset="https://substackcdn.com/image/fetch/$s_!ZZlP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7331af3-02ff-440b-a433-b3fab691b23e_1024x576.png 424w, https://substackcdn.com/image/fetch/$s_!ZZlP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7331af3-02ff-440b-a433-b3fab691b23e_1024x576.png 848w, https://substackcdn.com/image/fetch/$s_!ZZlP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7331af3-02ff-440b-a433-b3fab691b23e_1024x576.png 1272w, https://substackcdn.com/image/fetch/$s_!ZZlP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe7331af3-02ff-440b-a433-b3fab691b23e_1024x576.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 1: Analysis and projection of the Edge AI Market over the next 5 years.</figcaption></figure></div><p>That&#8217;s why in this Article, we&#8217;re going to dive into the most popular library that allows developers to run LLMs on small devices, <strong>llama.cpp</strong>. I genuinely think AI will end up sitting there next to the camera sensor, the drone controller, or the car&#8217;s embedded chip, making predictions in real-time.</p><p>Therefore, we&#8217;ll be unpacking <strong>llama.cpp, GGUF, and GGML</strong>, and see how everything connects into a framework for running LLMs efficiently on the Edge.</p><div><hr></div><h2><strong>Table of Contents</strong></h2><ol><li><p>What is GGUF?</p></li><li><p>What Quantizations does GGUF Support?</p></li><li><p>What is GGML? (tl;dr)</p></li><li><p>The Llama.cpp Library Workflow</p></li><li><p><strong>The High-Level Architecture</strong></p></li><li><p>Conclusion</p></li></ol><div><hr></div><h2><strong>1. What is GGUF?</strong></h2><p>GGUF [5] is a model file format that optimizes LLM checkpoints for efficient storage and quick deployment.</p><p>The GGUF format works well with specific LLM Inference Engines, especially those based on `llama.cpp`, since it is native to the framework. Lately, other Inference Engines started adding support for it, with <a href="https://substack.com/redirect/7f1134a0-8854-4ca5-9cbb-e1d606b56336?j=eyJ1IjoiMW90ZGRnIn0.HKJMFtOiePuvPM5kD7mJ1rGHBeRyR0QKnoPnRGvcT8E">vLLM being one example</a> [6], where, although it&#8217;s still an experimental feature, it marks the maturity and larger adoption of GGUF.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2IOP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb738e817-0c07-43a7-a180-90b9690a408a_1100x801.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2IOP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb738e817-0c07-43a7-a180-90b9690a408a_1100x801.jpeg 424w, https://substackcdn.com/image/fetch/$s_!2IOP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb738e817-0c07-43a7-a180-90b9690a408a_1100x801.jpeg 848w, https://substackcdn.com/image/fetch/$s_!2IOP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb738e817-0c07-43a7-a180-90b9690a408a_1100x801.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!2IOP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb738e817-0c07-43a7-a180-90b9690a408a_1100x801.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2IOP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb738e817-0c07-43a7-a180-90b9690a408a_1100x801.jpeg" width="1100" height="801" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b738e817-0c07-43a7-a180-90b9690a408a_1100x801.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:801,&quot;width&quot;:1100,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!2IOP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb738e817-0c07-43a7-a180-90b9690a408a_1100x801.jpeg 424w, https://substackcdn.com/image/fetch/$s_!2IOP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb738e817-0c07-43a7-a180-90b9690a408a_1100x801.jpeg 848w, https://substackcdn.com/image/fetch/$s_!2IOP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb738e817-0c07-43a7-a180-90b9690a408a_1100x801.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!2IOP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb738e817-0c07-43a7-a180-90b9690a408a_1100x801.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 2: The GGUF binary format structure, representing how model weights are compressed and organized.</figcaption></figure></div><p>As a summary of the advantages of the GGUF format:</p><ul><li><p>Smaller file sizes compared to other formats.</p></li><li><p>Faster loading times.</p></li><li><p>Improved cross-platform compatibility.</p></li><li><p>Rich built-in support for different quantization levels.</p></li></ul><p>One of the most important features in GGUF is its quantization setups. These span across various settings and configurations, from high-level legacy quants that are applied equally to each weight, up to low-level customizable quants, where specific weights in a layer could be quantized differently or with mixed precision.</p><p>In the following section, I&#8217;ll go through the GGUF quantization types, providing a short description with bullet points for each type, as this is a low-level, advanced concept that an AI Engineer probably won&#8217;t work too much on.</p><blockquote><p>If you want to dive into the nits &amp; bits of quant types, check <a href="https://substack.com/redirect/730fb3e2-976c-4689-8718-a10ecaa8bf3b?j=eyJ1IjoiMW90ZGRnIn0.HKJMFtOiePuvPM5kD7mJ1rGHBeRyR0QKnoPnRGvcT8E">this Table.</a></p></blockquote><h3><strong>2. What Quantizations does GGUF Support?</strong></h3><p>When working with any GGUF model, you might see the model name has a suffix attached, such as Q4, Q5_K, IQ2_K_S, etc. Each of these names stands for an identifier of what type and class of quantization the model was compressed and stored as.</p><blockquote><p><strong>Tip: </strong>The next section dives deep into Floating Point precision and maths, feel free to skip it.</p></blockquote><p>Let&#8217;s take the <em>`microsoft/Phi-3-mini-4k-instruct`</em> model as an example. It comes in 2 variants, an FP16 non-quant, and a Q4 GGUF quant.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lnaD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c32d12-c1e5-4799-adbd-a05d972d9291_1100x224.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lnaD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c32d12-c1e5-4799-adbd-a05d972d9291_1100x224.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lnaD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c32d12-c1e5-4799-adbd-a05d972d9291_1100x224.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lnaD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c32d12-c1e5-4799-adbd-a05d972d9291_1100x224.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lnaD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c32d12-c1e5-4799-adbd-a05d972d9291_1100x224.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lnaD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c32d12-c1e5-4799-adbd-a05d972d9291_1100x224.jpeg" width="1100" height="224" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/01c32d12-c1e5-4799-adbd-a05d972d9291_1100x224.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:224,&quot;width&quot;:1100,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!lnaD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c32d12-c1e5-4799-adbd-a05d972d9291_1100x224.jpeg 424w, https://substackcdn.com/image/fetch/$s_!lnaD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c32d12-c1e5-4799-adbd-a05d972d9291_1100x224.jpeg 848w, https://substackcdn.com/image/fetch/$s_!lnaD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c32d12-c1e5-4799-adbd-a05d972d9291_1100x224.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!lnaD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01c32d12-c1e5-4799-adbd-a05d972d9291_1100x224.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Figure 3: A screenshot from HuggingFace of the Files &amp; Versions tab for Phi3-mini-4k-instruct-gguf model.</figcaption></figure></div><p>That means that for FP16, each `weight` is represented in 16 bits:</p><ul><li><p>1 bit for Sign (+/-).</p></li><li><p>5 bits for the <a href="https://substack.com/redirect/74560f8d-0f4e-419e-86a6-661d01130938?j=eyJ1IjoiMW90ZGRnIn0.HKJMFtOiePuvPM5kD7mJ1rGHBeRyR0QKnoPnRGvcT8E">Exponent</a>.</p></li><li><p>10 + 1 <a href="https://substack.com/redirect/3a357095-6420-41a3-a482-b22c55c7a55a?j=eyJ1IjoiMW90ZGRnIn0.HKJMFtOiePuvPM5kD7mJ1rGHBeRyR0QKnoPnRGvcT8E">Mantissa</a> bits.</p></li></ul><p>Whereas for Q4, each `weight` is represented in 4 bits, but with a trick:</p><ul><li><p>All 4 bits store an integer code, no separate sign/exponent/mantissa in those 4 bits, we&#8217;ll call this <em>QuantizedWeight</em>.</p></li><li><p>Instead, a shared scale is stored per block of weights, let&#8217;s call it <em>SharedScale</em>.</p></li><li><p>The <strong>real value</strong> of each weight is reconstructed during inference as</p></li></ul><pre><code><code>Weight = SharedScale * QuantizedWeight</code></code></pre><p><em>But first, why does GGUF have so many quant variations?</em></p><p>The main reason is that some layers within the model&#8217;s architecture, such as those for EMB (embeddings), are <em>very sensitive to precision loss</em>, whereas other layers as some FFN (feed forward ones), can be <em>heavily quantized with minimal effect on outputs.</em></p><blockquote><p><strong>Tip: </strong>The key goal here is to customize and squeeze the most quality out of the model, while keeping its memory and compute footprint as low as possible.</p></blockquote><p>Let&#8217;s take the`<strong>Q4_K_S</strong>` variant as an example, and unpack what that means:</p><ul><li><p><strong>Q</strong> stands for Quantization.</p></li><li><p>The digit <strong>4</strong> stands for the number of bits the weights are quantized in.</p></li><li><p><strong>K</strong> shows that the layers of the model were quantized in a block-wise structure. The layer weights are split into blocks, and each of the blocks is quantized using a different factor for that block.</p></li><li><p><strong>S/M/L</strong> is a block size, and it helps determine the tradeoff between accuracy and compression. Larger blocks = more compression = lower accuracy.</p></li></ul><p>Although there are many configurations, we can generally split the quants into 3 distinct groups: Legacy, K-Quants, and I-Quants, ordered from the oldest to the newest added.</p><p><strong>Legacy Quants </strong>(<code>Q4_0</code>, <code>Q4_1</code>, <code>Q8_0</code>)</p><ul><li><p>These are block quantization: the layer&#8217;s weights are divided into fixed-size blocks.</p></li><li><p>Uses one (<code>_0</code>) or two (<code>_1</code>) extra constants per block, to scale weight values back from their quantized value.</p></li><li><p>Fast and straightforward, but less precise than modern methods.</p></li></ul><p><strong>K-Quants </strong>(<code>Q3_K_S</code>, <code>Q5_K_M</code>)</p><ul><li><p>A <strong>K</strong> quant is a block-wise quantization, with weights split into blocks and scaled with per-block factors.</p></li><li><p>These also support mixed quantization, where some layers could be compressed more in order to give more bits to critical layers.</p></li></ul><p><strong>I-Quants </strong>(<code>IQ2_XXS</code>, <code>IQ3_S)</code></p><ul><li><p>In simple terms, an <strong>I</strong> quant builds on top of a <strong>K</strong> quant, introduces an Importance Matrix with lookup tables to preserve critical weights.</p></li><li><p>An importance matrix is basically used to identify which weights carry more value for the model output quality, such that the weight is quantized less, whereas the &#8220;less important&#8221; weights are quantized more.</p></li><li><p>Best for memory-limited environments with sufficient compute power.</p></li></ul><p>A large majority of GGUF models are quantized with K Quants or I Quants, especially for the larger models, which makes sense as they require more optimizations to reduce the memory footprint.</p><p>At this point, we already have an understanding of what GGUF is and how LLM checkpoints are quantized and stored in the GGUF format. To complete the core picture, we need to further understand how <strong>llama.cpp</strong> works as a framework, through loading, parsing, and interpreting the GGUF model checkpoint.</p><p>Let&#8217;s get into the interesting details!</p><div><hr></div><h2><strong>3. What is GGML? (tl;dr)</strong></h2><blockquote><p><strong>tl;dr: <a href="https://substack.com/redirect/3ec4bced-a0e7-499c-9591-a4dff042b24f?j=eyJ1IjoiMW90ZGRnIn0.HKJMFtOiePuvPM5kD7mJ1rGHBeRyR0QKnoPnRGvcT8E">ggml</a> </strong>[1] is a machine learning (ML) library written in C and C++ with a focus on Transformer inference. ggml is similar to ML libraries such as PyTorch and TensorFlow.</p></blockquote><p>GGML [1] is the actual backbone, the core library that provides and executes all the tensor operations and provides all the optimizations necessary for high-performance computation, as it can be seen in the following sequence:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HqmY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80aa347-6545-418d-a453-6577e535357c_1100x77.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HqmY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80aa347-6545-418d-a453-6577e535357c_1100x77.png 424w, https://substackcdn.com/image/fetch/$s_!HqmY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80aa347-6545-418d-a453-6577e535357c_1100x77.png 848w, https://substackcdn.com/image/fetch/$s_!HqmY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80aa347-6545-418d-a453-6577e535357c_1100x77.png 1272w, https://substackcdn.com/image/fetch/$s_!HqmY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80aa347-6545-418d-a453-6577e535357c_1100x77.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HqmY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80aa347-6545-418d-a453-6577e535357c_1100x77.png" width="1100" height="77" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f80aa347-6545-418d-a453-6577e535357c_1100x77.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:77,&quot;width&quot;:1100,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!HqmY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80aa347-6545-418d-a453-6577e535357c_1100x77.png 424w, https://substackcdn.com/image/fetch/$s_!HqmY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80aa347-6545-418d-a453-6577e535357c_1100x77.png 848w, https://substackcdn.com/image/fetch/$s_!HqmY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80aa347-6545-418d-a453-6577e535357c_1100x77.png 1272w, https://substackcdn.com/image/fetch/$s_!HqmY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80aa347-6545-418d-a453-6577e535357c_1100x77.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Figure 4: The scope of GGML within llama.cpp is represented in yellow.</figcaption></figure></div><p>An equally important detail to note about GGML is its <strong>extensibility and portability.</strong><br>As it&#8217;s written in C++, GGML (and llama.cpp) can be compiled for virtually any hardware platform, from x86_64 (AMD/Intel) to ARM64 (M1, M2, M3), and other architectures.</p><p>The primary hardware target is the CPU, as GGML supports SIMD (Single Instruction Multiple Data) for newer CPUs, which in short means parallel computation leveraging the CPU&#8217;s multi-core threading.</p><blockquote><p><strong>Note: SIMD</strong> will take the same instruction, and run it across multiple data slices at the same time.</p></blockquote><p>On the GPU side, ggml supports accelerators such as <code>ggml-cuda</code> for NVIDIA GPUs and <code>ggml-metal</code> for Apple&#8217;s hardware. These accelerators enable llama.cpp to execute the GGML computation graph on GPU hardware, by basically translating the instructions to the GPU&#8217;s own &#8220;<em>language</em>&#8221; which for CUDA is <strong>PTX</strong>, and for Apple is <strong>Metal</strong>.</p><p>With those in mind, we can conclude the following about GGML:</p><ol><li><p>Can be compiled to multiple architectures (arm64, x64, x86)</p></li><li><p>It&#8217;s an ML Library, similar to PyTorch or Tensorflow</p></li><li><p>Runs fast on CPUs, but also supports GPU accelerators.</p></li><li><p>It&#8217;s the core of llama.cpp, executing all the tensor operations.</p></li></ol><p>Now we&#8217;ve learned that GGUF is the format of storing the model weights, and GGML is the actual Tensor Library that parses, loads, and executes the LLM model.</p><p>The third and last missing piece is llama.cpp and how everything fits together. We&#8217;ll cover that next.</p><div><hr></div><h2><strong>4. The Llama.cpp Library Workflow</strong></h2><p>First off, I have to say - the llama.cpp codebase is <strong>quite large</strong>. For the writing and diagrams of this section, I&#8217;ve analyzed bits of the llama.cpp codebase, official discussion threads, closed/open PRs to get a feeling of what are the core components powering it.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!k2uV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c3083cd-0b0c-42a8-881b-94877aba6999_1100x441.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!k2uV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c3083cd-0b0c-42a8-881b-94877aba6999_1100x441.jpeg 424w, https://substackcdn.com/image/fetch/$s_!k2uV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c3083cd-0b0c-42a8-881b-94877aba6999_1100x441.jpeg 848w, https://substackcdn.com/image/fetch/$s_!k2uV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c3083cd-0b0c-42a8-881b-94877aba6999_1100x441.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!k2uV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c3083cd-0b0c-42a8-881b-94877aba6999_1100x441.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!k2uV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c3083cd-0b0c-42a8-881b-94877aba6999_1100x441.jpeg" width="1100" height="441" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4c3083cd-0b0c-42a8-881b-94877aba6999_1100x441.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:441,&quot;width&quot;:1100,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!k2uV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c3083cd-0b0c-42a8-881b-94877aba6999_1100x441.jpeg 424w, https://substackcdn.com/image/fetch/$s_!k2uV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c3083cd-0b0c-42a8-881b-94877aba6999_1100x441.jpeg 848w, https://substackcdn.com/image/fetch/$s_!k2uV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c3083cd-0b0c-42a8-881b-94877aba6999_1100x441.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!k2uV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c3083cd-0b0c-42a8-881b-94877aba6999_1100x441.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 5: The distribution of commits on llama.cpp codebase, over the 2023-2025 period. Each candle represents a Week.</figcaption></figure></div><p>We&#8217;re not aiming to fully grasp every detail, <em><strong>&#8220;We only care about how it works.&#8221;</strong></em></p><p>And to get there, we&#8217;ll cover only 4 components at a high level that make the entire workflow just click.</p><ol><li><p>Model Loading &#8594; parsing GGUF, loading config, architecture, etc.</p></li><li><p>Populating Weights &#8594; how the execution graph is compiled for inference.</p></li><li><p>KV Cache Handling &#8594; how KV cache is handled during inference.</p></li><li><p>Token Sampling &#8594; how a token gets selected from the distribution.</p></li></ol><p>Let&#8217;s start with them in order.</p><h4><strong>1. GGML Model Loading</strong></h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EEvq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faaa87e14-27d4-4abe-b9af-05f128b4201a_1100x793.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EEvq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faaa87e14-27d4-4abe-b9af-05f128b4201a_1100x793.png 424w, https://substackcdn.com/image/fetch/$s_!EEvq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faaa87e14-27d4-4abe-b9af-05f128b4201a_1100x793.png 848w, https://substackcdn.com/image/fetch/$s_!EEvq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faaa87e14-27d4-4abe-b9af-05f128b4201a_1100x793.png 1272w, https://substackcdn.com/image/fetch/$s_!EEvq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faaa87e14-27d4-4abe-b9af-05f128b4201a_1100x793.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!EEvq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faaa87e14-27d4-4abe-b9af-05f128b4201a_1100x793.png" width="1100" height="793" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aaa87e14-27d4-4abe-b9af-05f128b4201a_1100x793.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:793,&quot;width&quot;:1100,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!EEvq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faaa87e14-27d4-4abe-b9af-05f128b4201a_1100x793.png 424w, https://substackcdn.com/image/fetch/$s_!EEvq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faaa87e14-27d4-4abe-b9af-05f128b4201a_1100x793.png 848w, https://substackcdn.com/image/fetch/$s_!EEvq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faaa87e14-27d4-4abe-b9af-05f128b4201a_1100x793.png 1272w, https://substackcdn.com/image/fetch/$s_!EEvq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faaa87e14-27d4-4abe-b9af-05f128b4201a_1100x793.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 6: An annotated image of the llamacpp/src/llama.cpp implementation, showing the GGUF model loading entrypoint.</figcaption></figure></div><p>After defining the model architecture type, which is usually inferred from the GGUF metadata fields, the next step is to start defining the execution graph of the model, as after this step, we&#8217;ll be able to load weights for each tensor.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Tzho!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb02a4c2a-65b3-46d5-bb92-47bdd48f41bf_1100x976.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Tzho!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb02a4c2a-65b3-46d5-bb92-47bdd48f41bf_1100x976.png 424w, https://substackcdn.com/image/fetch/$s_!Tzho!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb02a4c2a-65b3-46d5-bb92-47bdd48f41bf_1100x976.png 848w, https://substackcdn.com/image/fetch/$s_!Tzho!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb02a4c2a-65b3-46d5-bb92-47bdd48f41bf_1100x976.png 1272w, https://substackcdn.com/image/fetch/$s_!Tzho!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb02a4c2a-65b3-46d5-bb92-47bdd48f41bf_1100x976.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Tzho!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb02a4c2a-65b3-46d5-bb92-47bdd48f41bf_1100x976.png" width="1100" height="976" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b02a4c2a-65b3-46d5-bb92-47bdd48f41bf_1100x976.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:976,&quot;width&quot;:1100,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Tzho!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb02a4c2a-65b3-46d5-bb92-47bdd48f41bf_1100x976.png 424w, https://substackcdn.com/image/fetch/$s_!Tzho!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb02a4c2a-65b3-46d5-bb92-47bdd48f41bf_1100x976.png 848w, https://substackcdn.com/image/fetch/$s_!Tzho!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb02a4c2a-65b3-46d5-bb92-47bdd48f41bf_1100x976.png 1272w, https://substackcdn.com/image/fetch/$s_!Tzho!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb02a4c2a-65b3-46d5-bb92-47bdd48f41bf_1100x976.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 7: An annotated image of the llamacpp/src/llama-graph.h header file, where the utilities for defining the Model Graph are defined.</figcaption></figure></div><h4><strong>2. GGML Populating Weights</strong></h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NL0K!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e616b2b-a850-4c0b-948d-f2331c79f416_1100x710.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NL0K!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e616b2b-a850-4c0b-948d-f2331c79f416_1100x710.jpeg 424w, https://substackcdn.com/image/fetch/$s_!NL0K!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e616b2b-a850-4c0b-948d-f2331c79f416_1100x710.jpeg 848w, https://substackcdn.com/image/fetch/$s_!NL0K!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e616b2b-a850-4c0b-948d-f2331c79f416_1100x710.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!NL0K!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e616b2b-a850-4c0b-948d-f2331c79f416_1100x710.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NL0K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e616b2b-a850-4c0b-948d-f2331c79f416_1100x710.jpeg" width="1100" height="710" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4e616b2b-a850-4c0b-948d-f2331c79f416_1100x710.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:710,&quot;width&quot;:1100,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!NL0K!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e616b2b-a850-4c0b-948d-f2331c79f416_1100x710.jpeg 424w, https://substackcdn.com/image/fetch/$s_!NL0K!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e616b2b-a850-4c0b-948d-f2331c79f416_1100x710.jpeg 848w, https://substackcdn.com/image/fetch/$s_!NL0K!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e616b2b-a850-4c0b-948d-f2331c79f416_1100x710.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!NL0K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e616b2b-a850-4c0b-948d-f2331c79f416_1100x710.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 8: An annotated image of llamacpp/src/llama-model-loader.cpp implementation, going through the logic of loading tensor Weights for a given layer.</figcaption></figure></div><p>For each layer within the model graph, we&#8217;re loading the weights from the GGUF file using `mmap`, or Memory Mapping.</p><blockquote><p><strong>Def: </strong>mmap is <em>a POSIX-compliant Unix system call that maps files or devices into memory</em>. It is a method of memory-mapped file I/O.</p></blockquote><p>This approach allows the model to access weight data without fully loading it into RAM, enabling efficient, on-demand retrieval from disk.</p><div><hr></div><h4><strong>3. GGML KV Cache Handling</strong></h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8iLF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47036df4-8014-4b05-a641-109470b4989e_1100x485.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8iLF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47036df4-8014-4b05-a641-109470b4989e_1100x485.png 424w, https://substackcdn.com/image/fetch/$s_!8iLF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47036df4-8014-4b05-a641-109470b4989e_1100x485.png 848w, https://substackcdn.com/image/fetch/$s_!8iLF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47036df4-8014-4b05-a641-109470b4989e_1100x485.png 1272w, https://substackcdn.com/image/fetch/$s_!8iLF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47036df4-8014-4b05-a641-109470b4989e_1100x485.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8iLF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47036df4-8014-4b05-a641-109470b4989e_1100x485.png" width="1100" height="485" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/47036df4-8014-4b05-a641-109470b4989e_1100x485.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:485,&quot;width&quot;:1100,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!8iLF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47036df4-8014-4b05-a641-109470b4989e_1100x485.png 424w, https://substackcdn.com/image/fetch/$s_!8iLF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47036df4-8014-4b05-a641-109470b4989e_1100x485.png 848w, https://substackcdn.com/image/fetch/$s_!8iLF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47036df4-8014-4b05-a641-109470b4989e_1100x485.png 1272w, https://substackcdn.com/image/fetch/$s_!8iLF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47036df4-8014-4b05-a641-109470b4989e_1100x485.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 9: Annotated image of llama-kv-cache.h definition, showcasing the functions used to READ and WRITE from the KV cache.</figcaption></figure></div><h4><strong>4. GGML Token Sampling</strong></h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CeRA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F662359f8-d43a-406a-a48c-5e10502bf5da_1100x613.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CeRA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F662359f8-d43a-406a-a48c-5e10502bf5da_1100x613.png 424w, https://substackcdn.com/image/fetch/$s_!CeRA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F662359f8-d43a-406a-a48c-5e10502bf5da_1100x613.png 848w, https://substackcdn.com/image/fetch/$s_!CeRA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F662359f8-d43a-406a-a48c-5e10502bf5da_1100x613.png 1272w, https://substackcdn.com/image/fetch/$s_!CeRA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F662359f8-d43a-406a-a48c-5e10502bf5da_1100x613.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CeRA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F662359f8-d43a-406a-a48c-5e10502bf5da_1100x613.png" width="1100" height="613" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/662359f8-d43a-406a-a48c-5e10502bf5da_1100x613.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:613,&quot;width&quot;:1100,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!CeRA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F662359f8-d43a-406a-a48c-5e10502bf5da_1100x613.png 424w, https://substackcdn.com/image/fetch/$s_!CeRA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F662359f8-d43a-406a-a48c-5e10502bf5da_1100x613.png 848w, https://substackcdn.com/image/fetch/$s_!CeRA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F662359f8-d43a-406a-a48c-5e10502bf5da_1100x613.png 1272w, https://substackcdn.com/image/fetch/$s_!CeRA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F662359f8-d43a-406a-a48c-5e10502bf5da_1100x613.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 10: Annotated image of llama-sampling.cpp, showing the last step of a token generation iteration, to sample a token from the vocabulary, using the popular sampling methods (TopK, TopP, Temperature).</figcaption></figure></div><div><hr></div><h2><strong>5. The High-Level Architecture</strong></h2><p>The succession of steps in <strong>llama.cpp [2]</strong>, is to load the model architecture, define the execution graph, and populate weights for each tensor in the graph. Further, the model is ready for inference, and the last two steps from those described above come into place during LLM, generating a new token.</p><blockquote><p><strong>Tip:</strong> For a complete understanding on how LLMs generate tokens, <strong><a href="https://substack.com/redirect/702f35b3-2bb2-4501-8baa-5890a078d364?j=eyJ1IjoiMW90ZGRnIn0.HKJMFtOiePuvPM5kD7mJ1rGHBeRyR0QKnoPnRGvcT8E">read this</a> [10]</strong>.</p></blockquote><p>Now, after going through all the core steps and their order, we can finally represent everything as a complete workflow in the sequence diagram below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CVD5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F488ef8c3-9ddb-42b5-9c46-ddd68cb77eaa_1100x691.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CVD5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F488ef8c3-9ddb-42b5-9c46-ddd68cb77eaa_1100x691.png 424w, https://substackcdn.com/image/fetch/$s_!CVD5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F488ef8c3-9ddb-42b5-9c46-ddd68cb77eaa_1100x691.png 848w, https://substackcdn.com/image/fetch/$s_!CVD5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F488ef8c3-9ddb-42b5-9c46-ddd68cb77eaa_1100x691.png 1272w, https://substackcdn.com/image/fetch/$s_!CVD5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F488ef8c3-9ddb-42b5-9c46-ddd68cb77eaa_1100x691.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CVD5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F488ef8c3-9ddb-42b5-9c46-ddd68cb77eaa_1100x691.png" width="1100" height="691" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/488ef8c3-9ddb-42b5-9c46-ddd68cb77eaa_1100x691.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:691,&quot;width&quot;:1100,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!CVD5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F488ef8c3-9ddb-42b5-9c46-ddd68cb77eaa_1100x691.png 424w, https://substackcdn.com/image/fetch/$s_!CVD5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F488ef8c3-9ddb-42b5-9c46-ddd68cb77eaa_1100x691.png 848w, https://substackcdn.com/image/fetch/$s_!CVD5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F488ef8c3-9ddb-42b5-9c46-ddd68cb77eaa_1100x691.png 1272w, https://substackcdn.com/image/fetch/$s_!CVD5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F488ef8c3-9ddb-42b5-9c46-ddd68cb77eaa_1100x691.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>To solidify our understanding one last time, we have this workflow to describe the end-to-end template of how llama.cpp, GGML, and GGUF come in together:</p><ol><li><p>The GGUF model is loaded by llama.cpp</p></li><li><p>The GGUF binary file is parsed, and GGML allocates placeholders for tensors.</p></li><li><p>Then the execution graph of the LLM model is constructed.</p></li><li><p>Next, we load the weights for each tensor in the graph.</p></li><li><p>At this point, the model is <strong>ready for inference</strong>.</p></li><li><p>The user sends an input prompt.</p></li><li><p>The prompt is tokenized, and token_ids are passed through the model.</p></li><li><p>The Model graph is executed with initial tokens.</p></li><li><p>The KV Cache state for the initial iteration is saved.</p></li><li><p>A new token is sampled from the probability distribution of the vocabulary.</p></li><li><p>The new sampled token is detokenized and streamed to the client.</p></li><li><p>The updated sequence (initial + new token) is passed through the graph loop.</p></li><li><p>After finishing the generation, we release the memory buffers.</p></li><li><p>The user gets the final output text.</p></li></ol><div><hr></div><h2><strong>6. Conclusion</strong></h2><p>In this article, we&#8217;ve learned the most popular stack of running LLMs on resource-limited hardware, CPUs, and Edge Devices. Multiple options allow you to deploy models locally, and all of them are powered by <strong>llama.cpp</strong>, with the best example being Ollama, which has over 150k stars.</p><p>And that actually connects with the upcoming article, as we&#8217;ll be covering <strong>Ollama</strong>, but with more hands-on coding, and practical tips you could apply to your own projects and systems.</p><p>We&#8217;ve covered the core components of llama.cpp: GGUF and GGML, with GGUF being an actively adopted format seen in other frameworks such as vLLM.</p><p>For AI engineers, learning about Edge AI is one of the most strategic moves you can make today. AI shows signs (OSS, smaller models, etc.) of increasingly moving towards processing data closer to where it&#8217;s generated.</p><p>Understanding how to optimize models for local and edge deployment will position you strongly for the coming years. This may not happen in the next year, but investing in this knowledge now will give you a significant upper hand.</p><p>Hope you enjoyed this article!</p><div><hr></div><p><em><strong>Images and Media were created by the author, if not otherwise stated.</strong></em></p><div><hr></div><h4><strong>References</strong></h4><p><em>[1] Introduction to ggml</em>. (2025, February 24). Huggingface.co. <a href="https://substack.com/redirect/f02196ee-cd99-46a8-b309-94cbf1691e6a?j=eyJ1IjoiMW90ZGRnIn0.HKJMFtOiePuvPM5kD7mJ1rGHBeRyR0QKnoPnRGvcT8E">https://huggingface.co/blog/introduction-to-ggml</a></p><p>[2] <em>ggml-org/llama.cpp: LLM inference in C/C++</em>. (2025). GitHub. <a href="https://substack.com/redirect/5a03ee86-ed5f-4a78-8880-52d29737d9ee?j=eyJ1IjoiMW90ZGRnIn0.HKJMFtOiePuvPM5kD7mJ1rGHBeRyR0QKnoPnRGvcT8E">https://github.com/ggml-org/llama.cpp</a></p><p>&#8204;[3] <em>LLM Visualization</em>. (2025). Bbycroft.net. <a href="https://substack.com/redirect/9ca3ec8d-5f90-43f9-8a19-0b0f25ababc2?j=eyJ1IjoiMW90ZGRnIn0.HKJMFtOiePuvPM5kD7mJ1rGHBeRyR0QKnoPnRGvcT8E">https://bbycroft.net/llm</a></p><p>&#8204;[4] <em>Edge AI Market Size, Share &amp; Growth | Industry Report, 2030</em>. (2024). Grandviewresearch.com. <a href="https://substack.com/redirect/2e0f0de2-f417-447a-87fc-eaf543d2e115?j=eyJ1IjoiMW90ZGRnIn0.HKJMFtOiePuvPM5kD7mJ1rGHBeRyR0QKnoPnRGvcT8E">https://www.grandviewresearch.com/industry-analysis/edge-ai-market-report</a></p><p>&#8204;[5] <em>GGUF</em>. (2025). Huggingface.co. <a href="https://substack.com/redirect/ace8e94d-874c-41d0-9f19-9bbff9ec95f5?j=eyJ1IjoiMW90ZGRnIn0.HKJMFtOiePuvPM5kD7mJ1rGHBeRyR0QKnoPnRGvcT8E">https://huggingface.co/docs/hub/en/gguf</a></p><p>[6] <em>GGUF - vLLM</em>. (2025). Vllm.ai. <a href="https://substack.com/redirect/7f1134a0-8854-4ca5-9cbb-e1d606b56336?j=eyJ1IjoiMW90ZGRnIn0.HKJMFtOiePuvPM5kD7mJ1rGHBeRyR0QKnoPnRGvcT8E">https://docs.vllm.ai/en/stable/features/quantization/gguf.html</a></p><p>&#8204;[7] <em>Nscale Contracts Approximately 200,000 NVIDIA GB300 GPUs with Microsoft to Deliver NVIDIA AI Infrastructure Across Europe and the U.S. | Press Release | Nscale</em>. (2025). Nscale.com. <a href="https://substack.com/redirect/c6c63819-ae22-4f55-9aff-a5cbe2d6ab71?j=eyJ1IjoiMW90ZGRnIn0.HKJMFtOiePuvPM5kD7mJ1rGHBeRyR0QKnoPnRGvcT8E">https://www.nscale.com/press-releases/nscale-microsoft-2025</a></p><p>&#8204;[8] <em>Colossus | xAI</em>. (2024). X.ai. <a href="https://substack.com/redirect/90f6f955-debb-4be9-8e62-32b2807bcdaf?j=eyJ1IjoiMW90ZGRnIn0.HKJMFtOiePuvPM5kD7mJ1rGHBeRyR0QKnoPnRGvcT8E">https://x.ai/colossus</a></p><p>&#8204;[9] <em>Helix: A Vision-Language-Action Model for Generalist Humanoid Control</em>. (2025, February 20). FigureAI. <a href="https://substack.com/redirect/8a065e48-5ffb-4f2c-9ae2-b021e2e5c406?j=eyJ1IjoiMW90ZGRnIn0.HKJMFtOiePuvPM5kD7mJ1rGHBeRyR0QKnoPnRGvcT8E">https://www.figure.ai/news/helix</a></p><p>&#8204;[10] Razvant, A. (2025, February 20). <em>Understanding LLM Inference</em>. <a href="https://read.theaimerge.com/p/understanding-llm-inference">https://read.theaimerge.com/p/understanding-llm-inference</a></p>]]></content:encoded></item><item><title><![CDATA[The Engineer’s Guide to AI-Assisted Productivity]]></title><description><![CDATA[Six habits that keep you fast and maintainable. Cursor Rules, Claude Code Skills, Agent Plugins, PR rules, non-nitpicky reviews, hooks, and Daily memory dump with Obsidian.]]></description><link>https://read.theaimerge.com/p/the-engineers-guide-to-ai-assisted</link><guid isPermaLink="false">https://read.theaimerge.com/p/the-engineers-guide-to-ai-assisted</guid><dc:creator><![CDATA[Alex Razvant]]></dc:creator><pubDate>Thu, 12 Feb 2026 12:01:56 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/80773619-7143-4ce8-8248-89c1eb440e2d_3840x2160.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>There are a few things most engineers can probably agree on:</p><ul><li><p>Code is cheap nowadays. Design and Planning is not.</p></li><li><p>AI without a harness is &#8220;stupid&#8221; and dangerous.</p></li><li><p>Hype is for marketing. Engineering ships.</p></li></ul><p>And in this article, I&#8217;ll try to provide efficient safeguards for each point mentioned.</p><h2>The Problem of <em>&#8220;Developer Productivity&#8221;</em></h2><p>Across blogs, and all social media channels, there&#8217;s a strange obsession with output measured in volume. New libraries built in a day, <a href="https://arstechnica.com/ai/2026/02/sixteen-claude-ai-agents-working-together-created-a-new-c-compiler/">AI &#8220;building&#8221; a Compiler</a>, <a href="https://github.com/openclaw/openclaw">OpenClaw</a> hype and CEOs claiming they don&#8217;t need SWEs and Engineers anymore, everything is written by AI nowadays.</p><p>If you&#8217;ve seen claims like these, you&#8217;re not alone. A large chunk of these claims are either marketing, hype, or people making optimistic claims too soon.</p><p>At the core of this obsession, sits a flawed idea: <strong>Lines of Code.</strong></p><p>AI can spill-out 1000 lines of functionality, or that could be done with 200 lines of smartly planned and engineering design. Both will work initially, but the gap will grow in time and at scale. More code means more surface area. More edge cases. More friction when requirements change.</p><blockquote><p>Software is not written to be done &#8220;once&#8221;. It&#8217;s designed to evolve, that&#8217;s why we plan roadmaps, allocate budgets and expect systems to change long after their first release.</p></blockquote><p>This is where the real work has always been. Writing code is not the difficult part, designing, planning and building - always was.</p><h2>AI and Lines of Code</h2><p>It&#8217;s foolish to think that in a real codebase, quality of the code is about &#8220;how many lines you can push&#8221;, and there are people boasting they push 10k lines to prod everyday. Lines of Code (LoC) have never been a meaningful productivity metric. At best, they&#8217;re irrelevant.</p><p>Linus Torvalds (creator and lead developer of the Linux Kernel) <a href="https://youtu.be/mfv0V1SxbNA?si=5Yfm2k2E0f1eydb-&amp;t=2215">once put it bluntly:</a></p><blockquote><p><em>&#8220;Measuring productivity in LoC is just incompetence. Anybody who thinks that&#8217;s a valid metric, is too stupid to work at a tech-company&#8221;.</em></p></blockquote><p><em>Harsh? </em>Yes. But its also true as good engineering is about reducing complexity, and I think a lot of engineers out there will share that view.</p><p>As a concrete example, let&#8217;s take this PR.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!h1oB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f76f9df-dec6-48d6-897e-6773aefb38c8_2716x1526.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!h1oB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f76f9df-dec6-48d6-897e-6773aefb38c8_2716x1526.png 424w, https://substackcdn.com/image/fetch/$s_!h1oB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f76f9df-dec6-48d6-897e-6773aefb38c8_2716x1526.png 848w, https://substackcdn.com/image/fetch/$s_!h1oB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f76f9df-dec6-48d6-897e-6773aefb38c8_2716x1526.png 1272w, https://substackcdn.com/image/fetch/$s_!h1oB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f76f9df-dec6-48d6-897e-6773aefb38c8_2716x1526.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!h1oB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f76f9df-dec6-48d6-897e-6773aefb38c8_2716x1526.png" width="1456" height="818" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8f76f9df-dec6-48d6-897e-6773aefb38c8_2716x1526.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:818,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:978334,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://read.theaimerge.com/i/185531461?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f76f9df-dec6-48d6-897e-6773aefb38c8_2716x1526.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!h1oB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f76f9df-dec6-48d6-897e-6773aefb38c8_2716x1526.png 424w, https://substackcdn.com/image/fetch/$s_!h1oB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f76f9df-dec6-48d6-897e-6773aefb38c8_2716x1526.png 848w, https://substackcdn.com/image/fetch/$s_!h1oB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f76f9df-dec6-48d6-897e-6773aefb38c8_2716x1526.png 1272w, https://substackcdn.com/image/fetch/$s_!h1oB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f76f9df-dec6-48d6-897e-6773aefb38c8_2716x1526.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 1: A 13k LoC PR being raised on <a href="https://github.com/ocaml/ocaml/pull/14369">ocaml</a> repository. Plus, AI should never write all the code, an engineer should be able to explain everything that happens in a PR.</figcaption></figure></div><p>The author, openly admitting he &#8220;<em>didn&#8217;t write a single line of code&#8221;,</em> dumped a 13k LoC fully AI-generated Pull Request, expecting the code owners to review, approve and merge it to the codebase.</p><blockquote><p>That&#8217;s wrong and a bad practice that you should avoid. Regardless if you contribute to open-source or work on a codebase, as part of a team.</p></blockquote><p>As an engineer, <strong>the important metric you should follow</strong> <strong>is &#8220;ship changes that are consistent and safe to release&#8220;</strong>. If you can make it fast, on top of that, props to you.</p><p>Anyone uses AI to write code, at this point - it&#8217;ll be a lie to say otherwise. But if you don&#8217;t set constraints, AI will happily produce slop code that&#8217;s off-pattern and weirdly expensive to maintain.</p><p><strong>So I&#8217;m writing this article with that in mind.</strong></p><div><hr></div><h2>Tips, Routines and Advice</h2><p>In this article, I&#8217;ll share the routines and practices that most consistently increase my output as an engineer when using AI - across tooling, workflow, and review.</p><p>If you&#8217;re not already applying these, you can adopt them quickly - especially if you&#8217;re moving fast in a real codebase or collaborating in a larger team.</p><p>I&#8217;ll break it down into six parts:</p><ol><li><p><em>How do I get the best out of Cursor IDE</em></p></li><li><p><em>How I use CLI agents (Codex, ClaudeCode)</em></p></li><li><p><em>What I&#8217;ve learned on how to treat PRs</em></p></li><li><p><em>Code Review without Nitpicking</em></p></li><li><p><em>Using Squash Commits and pre-commit Hooks</em></p></li><li><p><em>My end-of-day &#8220;agent memory dump&#8221; workflow with Obsidian <strong>(big win)</strong></em></p></li></ol><div><hr></div><h3>What &#8220;using AI for coding&#8221; means in my day-to-day</h3><p>I don&#8217;t treat AI as &#8220;the engineer.&#8221; </p><p>Yes, it can generate code quite quickly, but I still don&#8217;t fully trust the outputs and have to check and reiterate to make sure the code does what it&#8217;s intended to do. The goal is <strong>the right code, in the right shape, that will keep working as the system evolves</strong>.</p><p>In practice, I like to stay in control of the workflow, especially when juggling shared codebases and multiple moving parts.</p><p>I&#8217;ve never measured it precisely, but based on day-to-day observation, I tend to keep roughly a <strong>60/40 split</strong> between code AI writes and the code I write.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Xc9m!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d6ce25-2ae9-41c6-898b-9c023a28807b_1946x1136.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Xc9m!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d6ce25-2ae9-41c6-898b-9c023a28807b_1946x1136.png 424w, https://substackcdn.com/image/fetch/$s_!Xc9m!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d6ce25-2ae9-41c6-898b-9c023a28807b_1946x1136.png 848w, https://substackcdn.com/image/fetch/$s_!Xc9m!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d6ce25-2ae9-41c6-898b-9c023a28807b_1946x1136.png 1272w, https://substackcdn.com/image/fetch/$s_!Xc9m!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d6ce25-2ae9-41c6-898b-9c023a28807b_1946x1136.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Xc9m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d6ce25-2ae9-41c6-898b-9c023a28807b_1946x1136.png" width="1456" height="850" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/40d6ce25-2ae9-41c6-898b-9c023a28807b_1946x1136.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:850,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:144183,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://read.theaimerge.com/i/185531461?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d6ce25-2ae9-41c6-898b-9c023a28807b_1946x1136.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Xc9m!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d6ce25-2ae9-41c6-898b-9c023a28807b_1946x1136.png 424w, https://substackcdn.com/image/fetch/$s_!Xc9m!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d6ce25-2ae9-41c6-898b-9c023a28807b_1946x1136.png 848w, https://substackcdn.com/image/fetch/$s_!Xc9m!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d6ce25-2ae9-41c6-898b-9c023a28807b_1946x1136.png 1272w, https://substackcdn.com/image/fetch/$s_!Xc9m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d6ce25-2ae9-41c6-898b-9c023a28807b_1946x1136.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 2. My recent month usage dashboard in Cursor. The rate of changes I accept is way lower than lines making it being commited and added to the codebase.</figcaption></figure></div><p>For example, here&#8217;s what my Cursor analytics looked like over the past month.</p><p>It shows thousands of lines and tokens consumed, but the ratio of accepted changes into my branches is below 50%.</p><blockquote><p>A good rule of thumb, is to treat AI Generated code as &#8220;proposed&#8221; solution and not source of truth. Don&#8217;t accept changes blindly, understand it first.</p></blockquote><p>AI will help me with Design and Planning, and write a lot of the low &#8594; mid-low complexity code, which is simpler and more or less repetitive.</p><p>All that while I analyse and guide through, or even write the hard-path logic. This aligns with the &#8220;plan first&#8221; advice you&#8217;ll see in most serious guidance around AI coding assistants: generate a plan in read-only mode, then execute it step-by-step.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption"><strong>The AI Merge</strong> helps you understand and build AI Systems, the engineer&#8217;s way. Before diving into Tips, if you&#8217;ve enjoyed this article so far, please consider subscribing.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h2>Tip #1 - Using Cursor And Cursor Rules Standards</h2><p>Before switching to Cursor, I&#8217;ve been mostly using VS Code + Copilot Pro plugin. In my current team, we&#8217;re mostly using Cursor Enterprise and Claude Code CLI Agent.</p><p>In this section, I&#8217;ll describe a few best practices I&#8217;m using, that work for me when setting the Cursor IDE with specific repo rules.</p><p><strong>What are Cursor Rules?</strong></p><p>Think of Cursor Rules as targeted sections of a big system prompt for your Agent. </p><p>These are one of the highest-leverage tools you can benefit from working with AI in a real codebase, as it helps the coding agent scope each iteration, or list of TODOs it plans out to map to your actual project requirements.</p><p>Cursor supports both <code>.md</code> and <code>.mdc</code> files, but I recommend <code>.mdc</code><strong> (Markdown Components) </strong>because it supports frontmatter. </p><blockquote><p>Frontmatter is a block of YAML, JSON, or TOML metadata located at the very top of Markdown files, enclosed by triple-dashed lines (<code>---</code>), allowing you to add metadata.</p></blockquote><p>For instance, in MDC files, you can specify the path globs <em><strong>**/*.py</strong></em>, to target and apply a rule only to Python files, or filter by folder/subfolder using <em><strong>services/*/*.py</strong></em> to apply a rule to all Python files under services.</p><p>Here is a 3-step plan to prepare your Cursor rules:</p><ol><li><p><strong>Keep rules small, or split into multiple files.</strong></p></li><li><p><strong>Add the rule only after observed failures</strong></p></li><li><p><strong>Treat rules as guardrails </strong>(scope with globs per language, folder, files)</p></li></ol><p>Here&#8217;s a minimal example I&#8217;m using for my personal projects with Python codebases:</p><pre><code><code># .cursor/rules/base-python.mdc
---
description: Specific rules for handling scaffolding of new Python packages.
globs: src/**/*.py
---

You are an expert in Python, FastAPI, and scalable API development. The Python components you are building will communicate with other services, particularly Inference Engines.

## Always
- Prefer iteration and modularization over code duplication.
- Follow existing patterns in the codebase. Do not invent new styles or structures.
- If unsure about design or placement, move to Cursor Plan mode and ask before implementing.
- Use descriptive variable names with auxiliary verbs (e.g., is_active, has_permission).
- Don't write summaries, improvement plans, refactoring plans as Markdown files, unless asked.

## Formatting &amp; Style
- Follow PEP 8.
- Assume Ruff formatting by running `uv run ruff format`

## Imports
- Prefer absolute imports, use the isort plugin to sort imports in order.
- Avoid circular dependencies.

## Types &amp; Interfaces
- Use type hints on all function signatures, use the `typing` module.
- Always use Pydantic BaseModels over dataclasses.

## Logging &amp; Errors
- Use structured logging (no prints).
- Log required context (e.g. correlation_id) in API calls.
- Always log error when catching a specific exception, never use bare `except`.

## Testing
- New behavior must include a test.
- Place tests in the `tests/unit` folder of the Python Package.</code></code></pre><p><strong>Rules should be short, targeted and enforceable</strong>. Keep the .mdc file light, with one rule per line, as even if your coding agent has up to 200k tokens of context, you don&#8217;t want to clutter it or confuse it with complex rules that spawn multiple lines or instructions.</p><blockquote><p>Places where you can find Cursor Rules:</p><ol><li><p><a href="https://github.com/PatrickJS/awesome-cursorrules/tree/main/rules">Awesome Cursor Rules</a></p></li><li><p><a href="https://cursor.directory/rules/fastapi">Cursor Directory</a></p></li></ol><p>Tip: Don&#8217;t copy paste them directly from these sources, but rather customize based on your project needs. Keep the rules targeted and actionable.</p></blockquote><div><hr></div><h2>Tip #2 - Agent Skills (Claude/Codex)</h2><p>Apart from Cursor, in my team we&#8217;re also using Claude Code, and a few colleagues use Codex, on their personal subscription plan.</p><p>In this section, I&#8217;ll compare Claude Code with Cursor on how to set them up, and what is different between the two, while also providing a few examples on how you can structure Agent Skills for Claude.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PywV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896e5fe3-9161-4612-afc4-921e68d5c1f4_1400x788.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PywV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896e5fe3-9161-4612-afc4-921e68d5c1f4_1400x788.jpeg 424w, https://substackcdn.com/image/fetch/$s_!PywV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896e5fe3-9161-4612-afc4-921e68d5c1f4_1400x788.jpeg 848w, https://substackcdn.com/image/fetch/$s_!PywV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896e5fe3-9161-4612-afc4-921e68d5c1f4_1400x788.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!PywV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896e5fe3-9161-4612-afc4-921e68d5c1f4_1400x788.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PywV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896e5fe3-9161-4612-afc4-921e68d5c1f4_1400x788.jpeg" width="1400" height="788" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/896e5fe3-9161-4612-afc4-921e68d5c1f4_1400x788.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:788,&quot;width&quot;:1400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PywV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896e5fe3-9161-4612-afc4-921e68d5c1f4_1400x788.jpeg 424w, https://substackcdn.com/image/fetch/$s_!PywV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896e5fe3-9161-4612-afc4-921e68d5c1f4_1400x788.jpeg 848w, https://substackcdn.com/image/fetch/$s_!PywV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896e5fe3-9161-4612-afc4-921e68d5c1f4_1400x788.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!PywV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F896e5fe3-9161-4612-afc4-921e68d5c1f4_1400x788.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 3. The Claude Skills Architecture, showing how the Agent interacts with the Skills on File System. (<a href="https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview">From Anthropic Skills Overview</a>)</figcaption></figure></div><blockquote><p><em>There are two approaches for teaching agents framework knowledge.</em></p></blockquote><p><strong>First</strong>, configuring Agent context at the project root level. (AGENTS.md/CLAUDE.md)<br><strong>Second</strong>, configuring Agent context using modular domain knowledge. (Skills)</p><h4>AGENTS.md/CLAUDE.md</h4><p>Targeted at general agents, also compatible in Cursor is a markdown file in your project root that provides persistent context to coding agents. Whatever you put in <code>AGENTS.md</code> is available to the agent on every turn, without the agent needing to decide to load it. Claude Code uses <code>CLAUDE.md</code> for the same purpose.</p><h4>Agent SKILLS</h4><p>Skills on the other hand, are an open standard for packaging domain knowledge that coding agents can invoke and use. A skill bundles prompts, tools, scripts and documentation that can be invoked on demand, as the Agent sees fit.</p><blockquote><p>Think of Agent Skills, similarly to how an MCP Server works. The concept is similar.</p></blockquote><h3>Understanding CLAUDE.md vs SKILLS vs COMMANDS</h3><ol><li><p><strong>CLAUDE.md</strong></p><p>This is the simplest one, it&#8217;s a set of files that get treated as the default prompt for Claude Code, loaded at the beginning of every conversation.</p></li><li><p><strong>Agent Skills</strong></p><p>Skills are better-structured CLAUDE.md files. They are invoked by Claude automatically when relevant (when agent decides to) or invoked manually by the user using <code>/&lt;skill&gt;</code>. Compared to CLAUDE.md, Skills are more token-efficient, as they don&#8217;t glob the Agent&#8217;s context with every new session.</p></li><li><p><strong>Slash Commands</strong> <a href="https://x.com/trq212/status/2014836841846132761">(In Jan 2026, they were merged with Skills)</a></p><p>Before the merge, these <strong>were</strong> similar to Skills in the way they&#8217;re packaging instructions separately, which also can be invoked by Claude when needed or manually by the user. </p><p></p><p>In a sense, the difference I see between Command and Skill, is that a Slash command is &#8220;intended&#8221; to be invoked manually by the user, whereas an Agent Skill should be invoked by the Agent on demand (and not manually)</p></li><li><p><strong>Agent Plugins</strong></p><p>Plugins can be considered as an interface to package skills, slash commands, agents, hooks, and MCP servers together. At any point in time, a plugin doesn&#8217;t have to use all of them. Similarly, this can be distributed as a standalone Skill, but the Plugin format makes it easy to install.</p></li></ol><p>Let&#8217;s continue with an example of a Skill I&#8217;m using on my current project I&#8217;m working on. The scope of this skill is to manage the API layer and Database integration, with FastAPI and PyMongo.</p><h4>The Structure</h4><p>The standard structure of a Skill is referenced in the official Anthropic&#8217;s <a href="https://github.com/anthropics/skills/tree/main/skills/mcp-builder">Skills repository</a>. Each skill has it&#8217;s own folder, with a SKILL.md file at the root.</p><p>Additionally, a Skill folder could contain helpers and references, such as Scripts that can be executed or small targeted &#8220;CLAUDE.MD&#8221; files as a reference for the Skill to look-up to.</p><p>For instance, here&#8217;s my FastAPI-Backend Claude Skill:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!39ul!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fd8f077-5074-49e8-ad0b-1f4a81693a33_1704x486.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!39ul!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fd8f077-5074-49e8-ad0b-1f4a81693a33_1704x486.png 424w, https://substackcdn.com/image/fetch/$s_!39ul!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fd8f077-5074-49e8-ad0b-1f4a81693a33_1704x486.png 848w, https://substackcdn.com/image/fetch/$s_!39ul!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fd8f077-5074-49e8-ad0b-1f4a81693a33_1704x486.png 1272w, https://substackcdn.com/image/fetch/$s_!39ul!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fd8f077-5074-49e8-ad0b-1f4a81693a33_1704x486.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!39ul!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fd8f077-5074-49e8-ad0b-1f4a81693a33_1704x486.png" width="1456" height="415" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7fd8f077-5074-49e8-ad0b-1f4a81693a33_1704x486.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:415,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:129290,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://read.theaimerge.com/i/185531461?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fd8f077-5074-49e8-ad0b-1f4a81693a33_1704x486.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!39ul!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fd8f077-5074-49e8-ad0b-1f4a81693a33_1704x486.png 424w, https://substackcdn.com/image/fetch/$s_!39ul!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fd8f077-5074-49e8-ad0b-1f4a81693a33_1704x486.png 848w, https://substackcdn.com/image/fetch/$s_!39ul!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fd8f077-5074-49e8-ad0b-1f4a81693a33_1704x486.png 1272w, https://substackcdn.com/image/fetch/$s_!39ul!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7fd8f077-5074-49e8-ad0b-1f4a81693a33_1704x486.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ol><li><p>The skill name <em><strong>&#8216;api-developer&#8217;</strong> </em>under the <strong>.claude/skills</strong> folder.</p></li><li><p>A <em><strong>&#8216;references&#8217;</strong> </em>folder that contains individual, reference context or &#8220;prompts&#8221; for the Agent to look-up.</p></li><li><p>A <em><strong>&#8216;scripts&#8217; </strong></em>folder where I attach a &#8216;health_check.sh&#8217; script the Agent could run, if it decides to.</p></li><li><p>The &#8216;SKILL.md&#8217; that describes the actual <em><strong>&#8216;api-developer&#8217;</strong></em> agent skill</p></li></ol><p>I won&#8217;t add the contents of each file, but I&#8217;ll unpack the core structure of how this Skill is composed, how to tie in references and scripts and its overall instructions and metadata.</p><h4>The SKILL.md</h4><pre><code>---
name: fastapi-mongo
description: Build async FastAPI APIs using MongoDB and Pydantic v2.
metadata:
  domain: backend
  role: specialist
  scope: implementation
  output-format: code
---

# FastAPI + Mongo Specialist

You are a senior Python backend engineer focused on **FastAPI**, **Pydantic v2**, and **MongoDB**.

You build clean, async, production-ready REST APIs with strong validation and automatic OpenAPI docs.

## When to Use
- Creating REST APIs with FastAPI
- Defining request/response schemas with Pydantic v2
- Performing async MongoDB CRUD operations
- Structuring small to medium backend services

## Tech Stack
- Python 3.11+
- FastAPI
- Pydantic v2
- MongoDB (Motor / async PyMongo)

## Core Workflow
1. Define Pydantic models for input/output
2. Implement async FastAPI endpoints
3. Perform MongoDB operations using async drivers
4. Return proper HTTP status codes and responses

To verify the API is up (e.g. before running tests or debugging), run `scripts/health_check.sh` from the skill directory (optionally set `BASE_URL`).


## Reference Guide

Load detailed guidance based on context:

| Topic | Reference | Load When |
|-------|-----------|-----------|
| Pydantic V2 | `references/pydantic-v2.md` | Creating schemas, validation, model_config |
| Mongo | `references/database.md` | Async database, models, CRUD operations |
| Endpoints | `references/endpoints-routing.md` | APIRouter, dependencies, routing |
| Testing | `references/testing.md` | pytest-asyncio, httpx, fixtures |
| Health check | `scripts/health_check.sh` | Verify API is up before tests or manual checks |

## Constraints

### Must Do
- Use async/await for all I/O
- Use Pydantic v2 syntax (`model_config`, `field_validator`)
- Use type hints everywhere
- Use FastAPI dependency injection where appropriate
- Validate all incoming data with Pydantic
- Return JSON-serializable responses

### Must Not Do
- Use synchronous MongoDB drivers
- Use Pydantic v1 syntax
- Hardcode configuration values
- Skip schema validation
- Mix sync and async code

## Output Expectations

When implementing features, provide:

1. **Pydantic models**
2. **FastAPI router with endpoints**
3. **MongoDB CRUD helpers**
4. **Minimal explanation**

## Knowledge Scope

FastAPI routing, dependencies, response models,  
Pydantic v2 validation and serialization,  
Async MongoDB CRUD patterns,  
OpenAPI / Swagger auto-documentation
</code></pre><h4>Key Section #1 - Reference Guide</h4><p>Since I have a <em><strong>&#8216;references&#8217;</strong></em> folder and I want the Agent to look-up specific instructions for each topic, I tell it where to find the other Markdown files it should look-up, in the References section.</p><p>Upon execution, if the Agent is working on building a new Router or FastAPI endpoint, it&#8217;ll scan the <em><strong>&#8216;references/endpoints-routing.md&#8217; </strong></em>file, to load additional context.</p><p>For instance, here&#8217;s the Pydantic-V2 reference file the Agent could use, which basically contains a few hard references and code examples of using Pydantic BaseModels and built-in validators.</p><p>Nothing complex, just hardening the Agent to generate code that follows the pattern.</p><pre><code># Pydantic V2 Schemas

## Schema Patterns

```python
from pydantic import BaseModel, EmailStr, Field, field_validator, model_validator
from typing import Self

class UserCreate(BaseModel):
    email: EmailStr
    password: str = Field(min_length=8)
    username: str = Field(min_length=3, max_length=50)
    age: int = Field(ge=18, le=120)

    @field_validator('password')
    @classmethod
    def validate_password(cls, v: str) -&gt; str:
        if not any(c.isupper() for c in v):
            raise ValueError('Password must contain uppercase')
        if not any(c.isdigit() for c in v):
            raise ValueError('Password must contain digit')
        return v

    @field_validator('username')
    @classmethod
    def validate_username(cls, v: str) -&gt; str:
        if not v.isalnum():
            raise ValueError('Username must be alphanumeric')
        return v.lower()

class UserUpdate(BaseModel):
    email: EmailStr | None = None
    username: str | None = Field(None, min_length=3, max_length=50)
```
## Model Validator

```python
class OrderCreate(BaseModel):
    items: list[OrderItem]
    discount_code: str | None = None
    total: float

    @model_validator(mode='after')
    def validate_order(self) -&gt; Self:
        calculated = sum(item.price * item.quantity for item in self.items)
        if abs(self.total - calculated) &gt; 0.01:
            raise ValueError('Total does not match items')
        return self
```
## Serialization Control

```python
class User(BaseModel):
    model_config = {
        "from_attributes": True,
        "json_schema_extra": {
            "example": {"email": "user@example.com", "username": "johndoe"}
        }
    }

    id: int
    email: EmailStr
    password: str = Field(exclude=True)  # Never serialize
    internal_id: str = Field(repr=False)  # Hide from repr

## Settings (Pydantic V2)

```python
from pydantic_settings import BaseSettings, SettingsConfigDict

class Settings(BaseSettings):
    model_config = SettingsConfigDict(
        env_file=".env",
        env_file_encoding="utf-8",
        case_sensitive=True,
    )

    DATABASE_URL: str
    SECRET_KEY: str
    DEBUG: bool = False
    CORS_ORIGINS: list[str] = ["http://localhost:3000"]
    API_V1_PREFIX: str = "/api/v1"

settings = Settings()
```

## Quick Reference

| V1 Syntax | V2 Syntax |
|-----------|-----------|
| `@validator` | `@field_validator` |
| `@root_validator` | `@model_validator` |
| `class Config` | `model_config = {}` |
| `orm_mode = True` | `from_attributes = True` |
| `Optional[X]` | `X \| None` |
| `.dict()` | `.model_dump()` |
| `.parse_obj()` | `.model_validate()` |</code></pre><h4>Key Section #2 - Harness (DOs and DONTs)</h4><p>These are helpful in making the Agent not repeating the same mistakes, and enforcing rules. Usually, under this section you&#8217;d put the pathways an Agent must follow, after you noticed its drift during the Agent&#8217;s coding session.</p><h4>Key Section #3 - Scope</h4><p>This is an additional small but helpful section, where you could add more details that&#8217;ll help Claude Code decide if this skill is the appropriate one to be used.</p><p>There are a lot of Claude Code Skills examples out there, from ones that target Programming, to drawing Design Sketches or planning trips. I&#8217;ll attach a few sources from where you can find and adopt Claude Skills, programming focused.</p><p>Resources for Claude Skills:</p><ol><li><p><a href="https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview">Awesome Claude Code Skills (5.5k Stars)</a></p></li><li><p><a href="https://github.com/hesreallyhim/awesome-claude-code?tab=readme-ov-file#agent-skills-">Travisvn/awesome-claude-skills (23k Stars)</a></p></li></ol><blockquote><p>My recommendation is to customize a Skill for your codebase. </p><p>Avoid integrating Skill as Copy/Paste, and don&#8217;t install untrusted Plugins.</p></blockquote><div><hr></div><h2>Tip #3 - How to treat PRs</h2><p>The philosophy is simple here: include enough details in a PR while avoiding cluttering or bloating it. With each feature, fix or bug issue I worked on, I usually follow these 3 steps before raising a PR:</p><ol><li><p>Attaching the Ticket</p></li><li><p>Attaching the 1-pager Design Doc link (for major changes)</p></li><li><p>Attaching short one-two paragraph descriptions of what the PR does.</p></li></ol><p>In my team, we have a standard to follow, where we keep PRs light in details, covering only the core paths one would need to know in order to be able to review the code changes.</p><blockquote><p>I would lie if I said I didn&#8217;t have PRs with 1000+ lines of code. </p><p>That slowed us down a lot, both in my output speed, having to address multiple comments and on the reviewer&#8217;s time as nobody can intake and reason on how multiple changes will impact the codebase.</p></blockquote><p>If there&#8217;s too much detail to be covered, I double-down on using block or sequence diagrams that outline how the change impacts the overall behaviour, and I put these diagrams in a 1-2 pager doc, and attach the shared link in the PR.</p><p>When a team member is doing code review, he&#8217;ll usually follow these steps:</p><ol><li><p>Read the short description of the PR</p></li><li><p>Go to the design/pager doc for details and understanding context</p></li><li><p>Review the code</p></li></ol><p>We also use GitHub Copilot with common rules for Code Review, that we&#8217;ve set at the GitHub Organization level, to flag major issues only, and specifically avoid nitpicks.</p><h4>A PR Body Example</h4><pre><code><code>// PR Title: feat(PRJ-002): Parallelize embedding generation through worker pools

## Track
Ticket: PRJ-002
Design (optional): &lt;link-to-1-page-doc&gt;

## Description
This PR implements the queue payload and parallelizes the vector embedding fill through a pool of workers. The configuration parameters are defined in configs/worker.yml.

During the API call for generating embeddings (v1/embed), the workers will spawn as background tasks, compute embeddings, log statuses per `worker_id` and basic telemetry data.

## Notes
For testing, use `make test-local` with the UV environment activated, or `make test-docker` to spawn a local docker container with mock data.</code></code></pre><p>Although there are use cases when PRs transform into small threads this approach optimized the time spent reviewing or explaining design decisions.</p><p>The base idea is, provide the minimal required context (description, diagrams, decisions) upfront, such that the person reviewing will get a good enough picture of what he&#8217;s supposed to review and look at.</p><h4>Three more important aspects</h4><ol><li><p>Keep your PRs light, target one fix, one feature. <strong>Don&#8217;t flex in Lines of Code.</strong></p></li><li><p>I add proper CI stages in Github Actions workflows (lint, test and code-coverage)</p></li><li><p>In a PR, if Copilot flagged an easy fix, I raise an issue and assign it to Copilot.</p></li></ol><div><hr></div><h2>Tip #4 - Code Review without Nitpicking</h2><p>I won&#8217;t sugarcoat this.</p><p>Early in my career, I reviewed PRs like a grumpy linter.</p><p>I used to flag every optimization I could find around performance, code structure or asking for more documentation. I used to think that because I&#8217;ve seen more systems made me an authority on keeping things clean and right.</p><p>What I actually did was slow the team down.</p><p>The good thing: I learned from it.<br>The bad one: I learned a bit late.</p><p>A good review is a lever. It nudges the team toward better outcomes <strong>without blocking delivery</strong>.</p><blockquote><p>If you&#8217;re at a point in your career where you can improve this, do it now. It compounds.</p></blockquote><p>Focus on what will cause real pain later: correctness, security, reliability, maintainability. Save style and &#8220;nice-to-haves&#8221; for follow-ups (or a separate PR). I could summarize the plan I&#8217;m following at the moment into three parts:</p><ol><li><p><strong>Identify the issue</strong> (what and where)</p></li><li><p><strong>Provide a solution</strong> (a concrete alternative)</p></li><li><p><strong>Explain impact and offer to help</strong> (why it matters downstream)</p></li></ol><h4>A few examples of DOs and DONTs</h4><ol><li><p><strong>Dataclass introduced when repo uses Pydantic</strong></p><ol><li><p>&#10060; Don&#8217;t: &#8220;Use Pydantic, as dataclasses aren&#8217;t used in our code&#8221;</p></li><li><p>&#9989; Do: &#8220;The &lt;name&gt; is a dataclass and it uses custom validators under tools/validations.py. Let&#8217;s try to make it a BaseModel and benefit from model_validator hook in Pydantic. That will keep the model + validations in the same file, which is easier to navigate and reduces LoC&#8221;</p></li></ol></li><li><p><strong>Using hardcoded values or magic numbers</strong></p><ol><li><p>&#10060; Don&#8217;t: &#8220;Please remove the hardcoded ttl_backfill_sec = 10&#8221;.</p></li><li><p>&#9989; Do: &#8220;I think it&#8217;ll be better if we surface ttl_backfill_sec into the application config. Leaving it as is, would imply a new release + deployment, compared to injecting it into ENV and restarting the existing service. A second option, in case it won&#8217;t change often, is to move it to common/constants.py, we might want to re-use it in multiple places.&#8221;</p></li></ol></li><li><p><strong>PII sent to the LLM </strong></p><ul><li><p>&#10060; Don&#8217;t: &#8220;Be careful with sensitive data.&#8221;</p></li><li><p>&#9989; Do: &#8220;This call will hit the MCP and return user data emails/phone numbers. Please consider adding a PII redaction step before calling the model, we could use a Pydantic BaseModel, with a redact_pii() that obfuscates the fields before the LLM call&#8221;</p></li></ul></li></ol><p>You should always focus on critical parts that will turn-out bad downstream, and leave improvements, styling and guides for later. Always try to provide a solution to support your comment, be it code, a short snippet of documentation or design documents.</p><div><hr></div><h2>Tip #5 - Using Pre-commit + Squash Merges</h2><p>I use pre-commit locally and enforce the same checks in CI, although some are repeating, that gives me consistent code quality and fast feedback before I even raise my PR.</p><p>Here&#8217;s a real example.</p><p>On one codebase, we use <strong>Protobuf</strong> to define API contracts shared across multiple services. Some services are in Go, and any time I add a new RPC or deprecate a field - the .pb.go files have to be regenerated.</p><p>The problem I encountered is: I&#8217;d update the <code>.proto</code> files, forget to run the generator, and end up with this annoying drift where .proto files are correct but .pb.go files are outdated.</p><p>CI would catch it, but only after I pushed and waited for a GitHub Action to fail.</p><p>Adding a <strong>pre-commit hook</strong> for proto generation, fixed it before reaching CI and wasting a CI run on GitHub.</p><p>Basic <code>.pre-commit-config.yaml</code> <a href="https://github.com/pre-commit/pre-commit-hooks">example</a>:</p><pre><code><code>repos:
  - repo: https://github.com/psf/black
    rev: 24.10.0
    hooks:
      - id: black
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.6.9
    hooks:
      - id: ruff
        args: [--fix]
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.6.0
    hooks:
      - id: end-of-file-fixer
      - id: trailing-whitespace</code></code></pre><h4>One more important aspect</h4><p>When pre-commit reformats files and updates generated code, you often end up with a few &#8220;noise commits&#8221; like:</p><ul><li><p>&#8220;fix lint&#8221;</p></li><li><p>&#8220;regenerate protos&#8221;</p></li><li><p>&#8220;format, wip&#8221;</p></li></ul><p>Using <strong>squash merges</strong> keeps your main branch clean by turning that whole PR into one readable commit with a clear change narrative.</p><blockquote><p>A Squash commit, will register as a single merge commit to your target branch (e.g main). </p><p>Say you have 30 commits made during your work on a feature - you don&#8217;t want all that history to be added to your main work tree. Squash all the PR commits into a single, clear and readable commit to summarize what the fix or feature PR does.</p></blockquote><p>In my case, I don&#8217;t dump the whole commit log into the squash message box. I write one clean message that describes the PR like, similar to a <em>&#8220;manifest.json&#8221;.</em></p><p>&#10060;  Bad example:</p><pre><code><code>// By default, Git will paste all the PR commit history in the message box.
* feat: add queue payload + worker entrypoint
* feat: add vector store upsert interface
* feat: add metrics + correlation_id propagation</code></code></pre><p>&#9989;  Better example:</p><pre><code>This feature implements queuing of embedding_generation tasks, and assigns them to a pool of workers. 

Added `metrics.py` to monitor worker progress and logs and keeps track of the request's correlation_id.
</code></pre><blockquote><p>You could use AI to generate and/or summarize the commit history of your PR in a compact message that you add as the Squash Commit message.</p></blockquote><div><hr></div><h2>Tip #6 - EoD Memory and Context Dump</h2><p><strong>I&#8217;m giving a golden tip here.</strong></p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/p/the-engineers-guide-to-ai-assisted?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Enjoying this article so far? You can share it so others might benefit from it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/p/the-engineers-guide-to-ai-assisted?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/p/the-engineers-guide-to-ai-assisted?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><p>I work on multiple codebases at the same time. AI enables me to do that.</p><p>Everything runs smoothly as long as I&#8217;m inside deep focus windows. In a 1&#8211;2 hour sprint, I can code nonstop, iterate on multiple features and fixes, and steer multiple agent threads in parallel (Cursor + CLI).</p><p>However, I&#8217;ve noticed that once I take a break, I need a buffer to get back to the usual routine of understanding where I left, what I was working on and what were the next steps. </p><p><strong>That &#8220;context reload&#8221; is manageable during the work day.</strong> </p><p>But I&#8217;ve found it extremely difficult, taking on and continuing to work the next day, as it usually takes time to regain the entire context from the day before.</p><p>So, I have a trick up my sleeve: <strong>an end-of-day memory and context dump.</strong></p><h4>My Routine</h4><p>Whenever I&#8217;m ready to call it a day, I ask every agent session I touched (across Cursor or the CLI) to produce a short, structured summary, essentially a &#8220;handoff note&#8221; to my tomorrow-self.</p><p>I store each summary locally as:</p><ul><li><p><strong>&#8220;memories/[dd-mm-yyyy]-[agent-scope].md&#8221;.</strong></p></li><li><p>Max ~1 Page</p></li><li><p>Bullet points only</p></li><li><p>No rich descriptions or narrative</p></li></ul><p>Let&#8217;s go through a real example. I might have:</p><ul><li><p>Agent session: Building FastAPI endpoints</p></li><li><p>Agent session: Infra stack + Docker Compose profiles</p></li><li><p>Agent session: Integrating Triton inference server endpoints</p></li><li><p>Agent session: Telemetry during inference</p></li></ul><p>The prompt I&#8217;m using to summarize agents sessions is a custom version of the Claude&#8217;s <code>/compact</code> <a href="https://www.reddit.com/r/ClaudeAI/comments/1jr52qj/here_is_claude_codes_compact_prompt/">prompt</a>:</p><pre><code>Your task is to create a detailed summary of the conversation so far, paying close attention to the user's explicit requests and your previous actions.
This summary should be thorough in capturing architectural decisions that would be essential for continuing development work without losing context.

Before providing your final summary, wrap your analysis in &lt;analysis&gt; tags to organize your thoughts and ensure you've covered all necessary points. In your analysis process:

1. Chronologically analyze each message and section of the conversation. For each section thoroughly identify:
   - The user's explicit requests and intents
   - Key decisions, technical concepts and code patterns
   - Specific details like file names, function signatures.

2. Double-check for technical accuracy and completeness, addressing each required element thoroughly.

Your summary should include the following sections:

1. Primary Request and Intent: Capture all of the user's explicit requests and intents in detail
2. Key Technical Concepts: List all important technical concepts, technologies
3. Files and Code Sections: Enumerate specific files and code sections examined, modified, or created. Pay special attention to the most recent messages and include full code snippets where applicable and include a summary of why this file read or edit is important.
4. Problem Solving: Document problems solved and any ongoing troubleshooting efforts.
5. Pending Tasks: Outline any pending tasks that you have explicitly been asked to work on.
6. Current Work: Describe in detail precisely what was being worked on immediately before this summary request.
7. If there is a next step, include direct quotes from the most recent conversation showing exactly what task you were working on and where you left off.

Here's an example of how your output should be structured:

&lt;example&gt;
&lt;analysis&gt;
[Your thought process, ensuring all points are covered thoroughly and accurately]
&lt;/analysis&gt;

&lt;summary&gt;
1. Primary Request and Intent:
   [Detailed description]

2. Key Technical Concepts:
   - [Concept 1]
   - [Concept 2]
   - [...]

3. Files and Code Sections:
   - [File Name 1]
      - [Summary of why this file is important]
      - [Summary of the changes made to this file, if any]
      - [Important Code Snippet]
   - [File Name 2]
      - [Important Code Snippet]
   - [...]

4. Problem Solving:
   [Description of solved problems and ongoing troubleshooting]

5. Pending Tasks:
   - [Task 1]
   - [Task 2]
   - [...]

6. Current Work:
   [Precise description of current work]

&lt;/summary&gt;
&lt;/example&gt;

This should help me gain a fresh perspective on the progress and work being done.
Please provide your summary based on the conversation so far, following this structure and ensuring precision and thoroughness in your response. 
</code></pre><p>Then, I read each of these one-pagers, and move to my Obsidian board, create a note for the next day, and manually write the things I consider important.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qn3K!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1162db54-df26-4ea0-99da-66a6ea021a67_456x424.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qn3K!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1162db54-df26-4ea0-99da-66a6ea021a67_456x424.png 424w, https://substackcdn.com/image/fetch/$s_!qn3K!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1162db54-df26-4ea0-99da-66a6ea021a67_456x424.png 848w, https://substackcdn.com/image/fetch/$s_!qn3K!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1162db54-df26-4ea0-99da-66a6ea021a67_456x424.png 1272w, https://substackcdn.com/image/fetch/$s_!qn3K!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1162db54-df26-4ea0-99da-66a6ea021a67_456x424.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qn3K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1162db54-df26-4ea0-99da-66a6ea021a67_456x424.png" width="456" height="424" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1162db54-df26-4ea0-99da-66a6ea021a67_456x424.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:424,&quot;width&quot;:456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:39349,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://read.theaimerge.com/i/185531461?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1162db54-df26-4ea0-99da-66a6ea021a67_456x424.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qn3K!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1162db54-df26-4ea0-99da-66a6ea021a67_456x424.png 424w, https://substackcdn.com/image/fetch/$s_!qn3K!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1162db54-df26-4ea0-99da-66a6ea021a67_456x424.png 848w, https://substackcdn.com/image/fetch/$s_!qn3K!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1162db54-df26-4ea0-99da-66a6ea021a67_456x424.png 1272w, https://substackcdn.com/image/fetch/$s_!qn3K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1162db54-df26-4ea0-99da-66a6ea021a67_456x424.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Each note contains the &#8220;context refresh&#8221; for the upcoming day. I treat each one as a &#8220;ticket&#8221; for tomorrow&#8217;s work.</figcaption></figure></div><p>That way, on the next day - I&#8217;ll have a minimal, fresh view of everything done yesterday. It helps me:</p><ul><li><p>During the Daily Standup - giving a status overview of what I&#8217;ve done</p></li><li><p>Design Meetings, explaining decisions</p></li><li><p>Composing the PR details</p></li><li><p>Quick refresh to continue from where I&#8217;ve left</p></li></ul><p>Now I have a clear image of what I need to do, and if i need more info, I go back to that specific Agent memory I saved locally in the memories folder re-read the richer context and start working.</p><p><strong>That&#8217;s a golden nugget! Helps a lot!</strong></p><div><hr></div><h2><strong>Closing Thoughts</strong></h2><p><strong>If you&#8217;re using Cursor:</strong></p><ul><li><p>Customize the rules for your own codebase.</p></li><li><p>Don&#8217;t copy/paste rules from somewhere, without checking first.</p></li><li><p>Keep the <code>rules/&lt;rule_name&gt;</code> files light, under 500 LoC.</p></li><li><p>Keep the rules to 1 per line.</p></li><li><p>Favor using the Plan mode in Cursor first, before the Agent mode.</p></li><li><p>Switch from Agent Mode to Ask mode whenever asking questions.</p></li><li><p>When the context of your Agent is closing to full, opt for a memory-dump to save the most important details from that session.</p></li></ul><p><strong>If you&#8217;re using Claude Code or Codex:</strong></p><ul><li><p>Try using CLAUDE.md first, before Skills.</p></li><li><p>When building a Skill, keep it light, and provide small, actionable instructions.</p></li><li><p>When creating a Skill, follow the official Anthropic template</p><ul><li><p><code>&lt;skill_name&gt;</code></p><ul><li><p><code>SKILL.MD</code></p></li><li><p><code>references/</code></p></li></ul></li></ul></li><li><p>If a Skill might require executing code, create a Script for that workflow, and place it under the <code>/scripts </code>folder.</p></li><li><p>If there are complex behaviours or patterns you want the Agent to follow, place them as Markdown files under <code>references/</code> and link them in your SKILL.md</p></li><li><p>Adapt Skills for your own context and codebase.</p></li></ul><p><strong>Other Tips:</strong></p><ul><li><p>Keep PRs small, well-described, and review with &#8220;issue &#8594; solution &#8594; impact&#8221;.</p></li><li><p>On EoD, opt for doing a daily &#8220;agent memory dump&#8221; of your Agent session, to quickly summarize the context of the work you&#8217;ve done.</p></li><li><p>Summarize the memories, and prepare a plan for the next-day of work using notes to keep momentum.</p></li></ul><p>I strongly believe this will help you get up to speed when using AI for coding tasks, and will make you a better engineer overall.</p><div><hr></div><p><strong>Would love to hear your thoughts &#128172;</strong></p><p><em>How are you using AI in your day-to-day developer workflow?</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/p/the-engineers-guide-to-ai-assisted/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/p/the-engineers-guide-to-ai-assisted/comments"><span>Leave a comment</span></a></p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fA6Z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7867f281-0fb8-4ff6-9821-52ea8442ffe0_4800x1227.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fA6Z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7867f281-0fb8-4ff6-9821-52ea8442ffe0_4800x1227.jpeg 424w, https://substackcdn.com/image/fetch/$s_!fA6Z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7867f281-0fb8-4ff6-9821-52ea8442ffe0_4800x1227.jpeg 848w, https://substackcdn.com/image/fetch/$s_!fA6Z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7867f281-0fb8-4ff6-9821-52ea8442ffe0_4800x1227.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!fA6Z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7867f281-0fb8-4ff6-9821-52ea8442ffe0_4800x1227.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fA6Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7867f281-0fb8-4ff6-9821-52ea8442ffe0_4800x1227.jpeg" width="1456" height="372" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7867f281-0fb8-4ff6-9821-52ea8442ffe0_4800x1227.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:372,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:191801,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://read.theaimerge.com/i/185531461?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7867f281-0fb8-4ff6-9821-52ea8442ffe0_4800x1227.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fA6Z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7867f281-0fb8-4ff6-9821-52ea8442ffe0_4800x1227.jpeg 424w, https://substackcdn.com/image/fetch/$s_!fA6Z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7867f281-0fb8-4ff6-9821-52ea8442ffe0_4800x1227.jpeg 848w, https://substackcdn.com/image/fetch/$s_!fA6Z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7867f281-0fb8-4ff6-9821-52ea8442ffe0_4800x1227.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!fA6Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7867f281-0fb8-4ff6-9821-52ea8442ffe0_4800x1227.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div>]]></content:encoded></item><item><title><![CDATA[Upcoming Livestream: GPUs for AI (Shaped by You)]]></title><description><![CDATA[You can choose the topics for a Live Session on GPUs in AI]]></description><link>https://read.theaimerge.com/p/upcoming-livestream-gpus-for-ai-shaped</link><guid isPermaLink="false">https://read.theaimerge.com/p/upcoming-livestream-gpus-for-ai-shaped</guid><dc:creator><![CDATA[Alex Razvant]]></dc:creator><pubDate>Tue, 27 Jan 2026 09:30:49 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/3b39a134-bb5b-495d-ba6f-3bf3a3d70a5f_5760x3240.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hey everyone,</p><p>In the upcoming weeks, I&#8217;ll be hosting a <strong>live session on GPUs for AI</strong> together with <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Miguel Otero Pedrido&quot;,&quot;id&quot;:89972117,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!LZBx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b58b1f5-4d25-4dcf-9f48-b67a6e6e1316_1200x1200.jpeg&quot;,&quot;uuid&quot;:&quot;d640c86f-8f66-434d-a70f-da5826c45619&quot;}" data-component-name="MentionToDOM"></span> (from The Neural Maze), where we aim to unpack the role of GPUs in AI.</p><p>GPUs sit at the core of modern AI systems, but for many, they remain a black box. </p><p>Every AI workload there is, is powered by an accelerator, GPU, NPU, TPU, LPU, or any other chip, ASIC or not. But <em>how they actually work</em>, <em>what really matters when choosing a GPU, how to optimize the AI workloads and models, </em>are all valid questions<em> </em>that an AI Engineer should ask.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Subscribe to get notified on the upcoming live-session.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p><p>Instead of guessing what to cover, I want to <strong>build this session around your interests</strong>.</p><p>In this article, I&#8217;ll be attaching two things:</p><ol><li><p>A video overview of the topics I thought about</p></li><li><p>A set of polls, to reason about your interests</p></li></ol><p>Before diving into the polls, which I kindly ask you to take 2-3 minutes to complete, I want to shortly go over the diagrams and charts I&#8217;ve prepared, to <em>probe</em> the topics we could discuss, related to AI and GPUs.</p><div><hr></div><h3>Starting Points</h3><p>In this video, I go through a few diagrams and sketches I&#8217;ve prepared, in the order I plan to cover them in the upcoming live session.</p><p>(Your feedback can change this)</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;6dd91765-1eb5-4778-80cd-392199e29ee5&quot;,&quot;duration&quot;:null}"></div><p>The topics already outlined:</p><ul><li><p>NVIDIA GPUs</p><ul><li><p>What the hardware looks like</p></li><li><p>What is PCIe, and how does it differ from SXM</p></li><li><p>Reading a datasheet, CUDA, NVCC, Cuda Capability</p></li></ul></li><li><p>ASICs (<a href="https://en.wikipedia.org/wiki/Application-specific_integrated_circuit">Application-specific integrated circuit</a>)</p><ul><li><p>Google TPUs</p></li><li><p>Cerebras Waffer-Scale</p></li><li><p>Groq LPU</p></li></ul></li></ul><p>(Additional) Topics which might be interesting:</p><ul><li><p>Optimizing Models on GPUs</p><ul><li><p>TensorRT, GGUF</p></li><li><p>ONNX, OpenVino, Apple MLX</p></li></ul></li></ul><div><hr></div><h3>Your Feedback (helps greatly)</h3><p>Below are the questions I&#8217;ve shared as polls with the audience. Your picks can directly shape the structure, depth, and focus of the livestream.</p><blockquote><p>We&#8217;re aiming to transform the livestream into an open discussion, where we could answer all of your questions.</p></blockquote><p>So, feel free to ask <strong>ANY</strong> type of question during the session. <br>There are no stupid questions; we want to hear from everyone!</p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/p/upcoming-livestream-gpus-for-ai-shaped?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading The AI Merge! Share this post such to reach more people.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/p/upcoming-livestream-gpus-for-ai-shaped?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/p/upcoming-livestream-gpus-for-ai-shaped?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><div><hr></div><h4><strong>1. Understanding your current experience with Software and/or AI.</strong></h4><div class="poll-embed" data-attrs="{&quot;id&quot;:438446}" data-component-name="PollToDOM"></div><div class="poll-embed" data-attrs="{&quot;id&quot;:438447}" data-component-name="PollToDOM"></div><h4><strong>2. Your understanding of GPUs</strong></h4><p>The aim is to understand what GPU you&#8217;ve been mostly using, to dive into the specific details. The way CUDA works for NVIDIA GPUs, for example, is different than how MPS works on Apple M-series chips, or how ROCm works on AMD GPUs.</p><div class="poll-embed" data-attrs="{&quot;id&quot;:438448}" data-component-name="PollToDOM"></div><div class="poll-embed" data-attrs="{&quot;id&quot;:438449}" data-component-name="PollToDOM"></div><div class="poll-embed" data-attrs="{&quot;id&quot;:438453}" data-component-name="PollToDOM"></div><h4><strong>3. Topics focused on using GPUs for AI</strong></h4><p>Most AI Engineers will build applications, optimize and deploy models, or optimize already running pipelines and clusters, if they also work on the infrastructure side.</p><p>The goal here is to find out if we should touch on Inference Engines, how LLM (or AI) Inference works, and what the popular Inference Engines are, with brief details on how key components work.</p><div class="poll-embed" data-attrs="{&quot;id&quot;:439910}" data-component-name="PollToDOM"></div><div class="poll-embed" data-attrs="{&quot;id&quot;:439912}" data-component-name="PollToDOM"></div><div class="poll-embed" data-attrs="{&quot;id&quot;:438454}" data-component-name="PollToDOM"></div><div class="poll-embed" data-attrs="{&quot;id&quot;:438460}" data-component-name="PollToDOM"></div><p></p><div><hr></div><h3>One more thing</h3><p>If you want other answer options that are not present in the polls, <em><strong>please leave a comment on this article with your thoughts, options, and impressions. </strong></em></p><p>I&#8217;ll be reading and replying to each comment in part.</p><p>I&#8217;m sure you&#8217;ll learn a lot about how GPUs work, their role and scope in AI development, both during building and deploying models to user-facing applications.</p><blockquote><p>Let&#8217;s prepare for an amazing learning session!</p></blockquote><p>See you soon,<br>Alex</p>]]></content:encoded></item><item><title><![CDATA[The Smartest AI Engineers Will Bet on This in 2026]]></title><description><![CDATA[A no-BS breakdown of where to invest your time, backed by real industry insights.]]></description><link>https://read.theaimerge.com/p/the-smartest-ai-engineers-will-bet</link><guid isPermaLink="false">https://read.theaimerge.com/p/the-smartest-ai-engineers-will-bet</guid><dc:creator><![CDATA[Alex Razvant]]></dc:creator><pubDate>Tue, 13 Jan 2026 11:03:06 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/1cdc00e4-6f27-4011-82f1-83f6650b4c86_3840x2160.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>2025 has been the year of LLMs and reasoning models pushing toward agents and agentic workflows.</p><p><strong>That&#8217;s why</strong> I&#8217;ll spend 2026 focused more on system design, architecture, scale, inference, and core engineering fundamentals.</p><p>We now have a wide range of models to choose from, cheaper inference, and plenty of guidebooks on how to prototype with LLMs, from RAG pipelines to basic workflows and agents. Getting something working is no longer the hard part.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!j-j2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f62fda1-07db-437f-9834-d3356928d31e_2564x2106.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!j-j2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f62fda1-07db-437f-9834-d3356928d31e_2564x2106.png 424w, https://substackcdn.com/image/fetch/$s_!j-j2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f62fda1-07db-437f-9834-d3356928d31e_2564x2106.png 848w, https://substackcdn.com/image/fetch/$s_!j-j2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f62fda1-07db-437f-9834-d3356928d31e_2564x2106.png 1272w, https://substackcdn.com/image/fetch/$s_!j-j2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f62fda1-07db-437f-9834-d3356928d31e_2564x2106.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!j-j2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f62fda1-07db-437f-9834-d3356928d31e_2564x2106.png" width="1456" height="1196" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9f62fda1-07db-437f-9834-d3356928d31e_2564x2106.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1196,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1398867,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://read.theaimerge.com/i/184113282?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f62fda1-07db-437f-9834-d3356928d31e_2564x2106.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!j-j2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f62fda1-07db-437f-9834-d3356928d31e_2564x2106.png 424w, https://substackcdn.com/image/fetch/$s_!j-j2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f62fda1-07db-437f-9834-d3356928d31e_2564x2106.png 848w, https://substackcdn.com/image/fetch/$s_!j-j2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f62fda1-07db-437f-9834-d3356928d31e_2564x2106.png 1272w, https://substackcdn.com/image/fetch/$s_!j-j2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f62fda1-07db-437f-9834-d3356928d31e_2564x2106.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">In the last few months of 2025, more models have been released compared to previous months. Image taken from https://lifearchitect.ai/models-table/</figcaption></figure></div><p>What&#8217;s still hard is running these systems in production.</p><p>Across the industry, only a small number of teams have managed to move beyond pilots and demos. And when systems fail, it&#8217;s rarely because of the model itself. It&#8217;s the engineering around the model: how systems are designed, monitored, tested, and improved over time. These are the same problems software teams have always faced, but made harder this time, due to the non-deterministic behavior of AI Systems.</p><p>In 2026, the most valuable work is learning how to build AI systems that hold up under real usage. New abstractions will come and go, including agents, but they only create value when they sit on top of well-designed, maintainable systems.</p><p>This article is about that gap.</p><p>What you&#8217;ll get from this article:</p><ol><li><p><em>What are the 2025 MIT, BCG, and Gartner reports on AI saying?</em></p></li><li><p><em>Where should an AI Engineer invest their time?</em></p></li><li><p><em>How to avoid confusion and hype cycles?</em></p></li><li><p><em><strong>Actionable plan for engineers, AI Foundations, Engineering, and Systems.</strong></em></p></li></ol><div><hr></div><h2>AI Adoption is Moving Slower</h2><p>Reading through McKinsey&#8217;s 2025 <a href="https://www.mckinsey.com/capabilities/quantumblack/our-insights/the-state-of-ai">[12]</a> survey, turns out that even if almost 88% of companies use AI in at least one function of their business, nearly 60% of them are still stuck in the research and experimentation.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xTEI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa70e8613-e0e0-457e-92ae-ca3f0aebc3c0_1630x918.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xTEI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa70e8613-e0e0-457e-92ae-ca3f0aebc3c0_1630x918.png 424w, https://substackcdn.com/image/fetch/$s_!xTEI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa70e8613-e0e0-457e-92ae-ca3f0aebc3c0_1630x918.png 848w, https://substackcdn.com/image/fetch/$s_!xTEI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa70e8613-e0e0-457e-92ae-ca3f0aebc3c0_1630x918.png 1272w, https://substackcdn.com/image/fetch/$s_!xTEI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa70e8613-e0e0-457e-92ae-ca3f0aebc3c0_1630x918.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xTEI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa70e8613-e0e0-457e-92ae-ca3f0aebc3c0_1630x918.png" width="1456" height="820" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a70e8613-e0e0-457e-92ae-ca3f0aebc3c0_1630x918.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:820,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:137656,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://read.theaimerge.com/i/184113282?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa70e8613-e0e0-457e-92ae-ca3f0aebc3c0_1630x918.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xTEI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa70e8613-e0e0-457e-92ae-ca3f0aebc3c0_1630x918.png 424w, https://substackcdn.com/image/fetch/$s_!xTEI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa70e8613-e0e0-457e-92ae-ca3f0aebc3c0_1630x918.png 848w, https://substackcdn.com/image/fetch/$s_!xTEI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa70e8613-e0e0-457e-92ae-ca3f0aebc3c0_1630x918.png 1272w, https://substackcdn.com/image/fetch/$s_!xTEI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa70e8613-e0e0-457e-92ae-ca3f0aebc3c0_1630x918.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image 1. Interest and use of GenAI has grown a lot compared to last year. Most companies however, are still in the experimentation &amp; piloting phases, outlining an execution gap.</figcaption></figure></div><p>Similarly, the BCG&#8217;s <a href="https://media-publications.bcg.com/The-Widening-AI-Value-Gap-Sept-2025.pdf">[8]</a> research  shows only 5% of firms are &#8220;future-built&#8221; AI leaders,<strong> </strong>seeing significant bottom-line value; these are the infra-owners, the frontier-AI labs, and large companies that use AI as a backbone.</p><p><em><strong>They have the talent, compute, resources, and leverage to do so.</strong></em></p><p>Three concrete examples:</p><ol><li><p><strong>Google</strong> - massive search context, default user behavior, and existing distribution to build the &#8220;AI Mode&#8221; on Google Search.</p></li><li><p><strong>Perplexity</strong> - one of the first to add source citations baked directly into answers.</p></li><li><p><strong>NVIDIA</strong> - seasoned talent, vertical integration, chips &#8594; simulators &#8594; models and large-scale real and synthetic data on multiple modalities (i.e., NVIDIA Isaac Sim, Omniverse, Nemotron).</p></li></ol><p>On the other side, 60% report minimal or no gains from AI; these are the laggards. Even though the models became cheaper per generated token, and the industry caught up on Cookbooks and some Best Practices to follow when building with AI, you&#8217;d think building and scaling would be easier.</p><p><em>What does that mean?</em></p><p>Most of the companies won&#8217;t have an &#8220;<em>AI-first&#8221;</em> strategy, but an <em>&#8220;Integrate AI&#8221;</em> strategy. That isn&#8217;t new, as it&#8217;s been that way for the past two years.</p><p>That means, we&#8217;re entering into the Scaling phase, where PoC&#8217;s must become resilient AI Systems running in production.</p><p>In the following chart from the <em>Boston Consulting Group </em>report, we can see the median average moved a bit in 2025, compared to last year, but still, most companies are stuck in-between Emerging and Scaling phases.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8qNV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85233b4b-4449-41eb-a984-073780f3ef0c_2812x1876.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8qNV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85233b4b-4449-41eb-a984-073780f3ef0c_2812x1876.png 424w, https://substackcdn.com/image/fetch/$s_!8qNV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85233b4b-4449-41eb-a984-073780f3ef0c_2812x1876.png 848w, https://substackcdn.com/image/fetch/$s_!8qNV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85233b4b-4449-41eb-a984-073780f3ef0c_2812x1876.png 1272w, https://substackcdn.com/image/fetch/$s_!8qNV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85233b4b-4449-41eb-a984-073780f3ef0c_2812x1876.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8qNV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85233b4b-4449-41eb-a984-073780f3ef0c_2812x1876.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/85233b4b-4449-41eb-a984-073780f3ef0c_2812x1876.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:490092,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://read.theaimerge.com/i/184113282?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85233b4b-4449-41eb-a984-073780f3ef0c_2812x1876.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8qNV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85233b4b-4449-41eb-a984-073780f3ef0c_2812x1876.png 424w, https://substackcdn.com/image/fetch/$s_!8qNV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85233b4b-4449-41eb-a984-073780f3ef0c_2812x1876.png 848w, https://substackcdn.com/image/fetch/$s_!8qNV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85233b4b-4449-41eb-a984-073780f3ef0c_2812x1876.png 1272w, https://substackcdn.com/image/fetch/$s_!8qNV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F85233b4b-4449-41eb-a984-073780f3ef0c_2812x1876.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image 2. Most companies still work on developing an AI Strategy, which can be seen in the 3% drop in emerging trends and 13% increase in scaling focus, and most importantly, in the 11% drop for the first column.</figcaption></figure></div><p>If we zoom out on this infographic, the 60% composed of the Laggards in the first two columns, are moving from <em>no interest </em>in AI, to <em>building foundational capabilities. </em></p><p>That doesn&#8217;t cover the &#8220;<em>using AI models&#8221;<strong> </strong></em>part, but getting up to speed on talent, system design at scale, and business functions, which can be translated as:</p><ul><li><p><em>&#8220;Understanding&#8221;</em> - people learn how AI and its components work</p></li><li><p><em>&#8220;Designing&#8221;</em> - the business functions where AI could act as leverage</p></li><li><p><em>&#8220;Building&#8221;</em> - the core components and experimenting</p></li></ul><p><em>What does that mean for an AI Engineer?</em></p><p>A note to end this section on is that the best placement for an engineer in this phase, and going through the next year&#8217;s advancements, is learning scale and bringing value out of an AI System. </p><p>The Engineers who can operationalize, scale, and measure AI systems will be more valuable than those who can prototype with new models.</p><div><hr></div><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/p/the-smartest-ai-engineers-will-bet?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Enjoying this article so far? You can share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/p/the-smartest-ai-engineers-will-bet?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/p/the-smartest-ai-engineers-will-bet?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><div><hr></div><h2>An AI Engineer&#8217;s Focus</h2><p>For most engineers, unless you&#8217;re working in applied research (frontier labs) or high-performance scaling (inference providers, GPU kernels), the job isn&#8217;t about pushing models forward. </p><p>It&#8217;s about making systems work reliably.</p><p>A year ago, I wrote about why <strong>MLOps fails in production</strong> and why nearly <strong>half </strong>of projects fail to scale into real value. At the time, the discussion was framed around classical Machine Learning and Deep Learning: models, engineering, pipelines, and deployment workflows.</p><p>The names have changed since then, but <strong>the problem hasn&#8217;t.</strong> <a href="https://read.theaimerge.com/p/mlops-at-big-tech-and-why-50-of-ai">(Read it Here)</a></p><p>We might&#8217;ve switched from ML Engineering to AI Engineering, from Deep Learning to Generative AI - but the problem is still there. Most of these systems don&#8217;t require AI as a backbone; we&#8217;re far from fully autonomous agents, where the autonomy slider is set to maximum. </p><p>They do require solid engineering, however.</p><p>There is a big difference between <em>&#8220;AI everywhere&#8221;</em> and <em>&#8220;AI delivering value everywhere&#8221;</em>, even if full-agentic sounds good and trendy. </p><p>Here&#8217;s a clearer signal to enforce the above. &#8595;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ytfn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f06b5e3-23cc-4bdb-8ff2-9b7587d67480_1806x954.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ytfn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f06b5e3-23cc-4bdb-8ff2-9b7587d67480_1806x954.png 424w, https://substackcdn.com/image/fetch/$s_!Ytfn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f06b5e3-23cc-4bdb-8ff2-9b7587d67480_1806x954.png 848w, https://substackcdn.com/image/fetch/$s_!Ytfn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f06b5e3-23cc-4bdb-8ff2-9b7587d67480_1806x954.png 1272w, https://substackcdn.com/image/fetch/$s_!Ytfn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f06b5e3-23cc-4bdb-8ff2-9b7587d67480_1806x954.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ytfn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f06b5e3-23cc-4bdb-8ff2-9b7587d67480_1806x954.png" width="1456" height="769" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4f06b5e3-23cc-4bdb-8ff2-9b7587d67480_1806x954.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:769,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:125882,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://read.theaimerge.com/i/184113282?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f06b5e3-23cc-4bdb-8ff2-9b7587d67480_1806x954.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Ytfn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f06b5e3-23cc-4bdb-8ff2-9b7587d67480_1806x954.png 424w, https://substackcdn.com/image/fetch/$s_!Ytfn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f06b5e3-23cc-4bdb-8ff2-9b7587d67480_1806x954.png 848w, https://substackcdn.com/image/fetch/$s_!Ytfn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f06b5e3-23cc-4bdb-8ff2-9b7587d67480_1806x954.png 1272w, https://substackcdn.com/image/fetch/$s_!Ytfn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f06b5e3-23cc-4bdb-8ff2-9b7587d67480_1806x954.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image 3. This distribution shows a lack of execution capacity. Experimentation is quick, but moving reliably from pilot to scaling is a challenge. Boston Consulting Group 2025 Report.</figcaption></figure></div><p>There&#8217;s clearly an execution gap. Projects don&#8217;t fail because of models, but because they can&#8217;t reliably move from pilot to production. This idea goes back to 3-4 years ago, when MLOps was a hot topic of discussion in the AI community. </p><p>The features are there, the models are there, but the pipelines, monitoring, detecting model drift, golden sets, and continuous improvement and calibration are lacking or not designed properly for production.</p><p>This leads to the following question: <em>&#8220;How does an AI engineer position themselves?&#8221;</em></p><p>Before answering that, it&#8217;s worth grounding ourselves in the hype cycles - because they explain why some people are fully invested in AI, while others are exhausted by the headlines.</p><div><hr></div><h2>Avoid the Unnecessary Confusion</h2><p>It&#8217;s funny how AI feels like living inside contradictory headlines:</p><ul><li><p><em>&#8220;Agents are here&#8221;</em> and then <em>&#8220;This is the decade of Agents&#8221; (A.Karpathy)</em></p></li><li><p><em>&#8220;AI writes all the code&#8221;</em> and then <em>&#8220;We&#8217;re hiring Senior Engineers&#8221; (Microsoft)</em></p></li><li><p><em>&#8220;AI will replace Software Engineers in 6 months&#8221; (D.Amodei)</em></p></li></ul><p>These statements aren&#8217;t mutually exclusive, but seeing them side by side, and especially seeing them everywhere, creates a kind of fatigue. I think that&#8217;s probably one reason <em><strong>many experienced engineers don&#8217;t rush headfirst into fully AI-driven approaches</strong></em>. A few conflicting claims, from people in the field, are often enough to make someone pause and wait for clearer signals.</p><p>And then, there&#8217;s this chart, which was very popular last year &#8595;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ORJ2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38512bca-ae9d-4db3-98e5-8cfe6ed53198_1833x1091.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ORJ2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38512bca-ae9d-4db3-98e5-8cfe6ed53198_1833x1091.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ORJ2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38512bca-ae9d-4db3-98e5-8cfe6ed53198_1833x1091.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ORJ2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38512bca-ae9d-4db3-98e5-8cfe6ed53198_1833x1091.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ORJ2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38512bca-ae9d-4db3-98e5-8cfe6ed53198_1833x1091.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ORJ2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38512bca-ae9d-4db3-98e5-8cfe6ed53198_1833x1091.jpeg" width="1456" height="867" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/38512bca-ae9d-4db3-98e5-8cfe6ed53198_1833x1091.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:867,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:275187,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://read.theaimerge.com/i/184113282?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38512bca-ae9d-4db3-98e5-8cfe6ed53198_1833x1091.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ORJ2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38512bca-ae9d-4db3-98e5-8cfe6ed53198_1833x1091.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ORJ2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38512bca-ae9d-4db3-98e5-8cfe6ed53198_1833x1091.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ORJ2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38512bca-ae9d-4db3-98e5-8cfe6ed53198_1833x1091.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ORJ2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38512bca-ae9d-4db3-98e5-8cfe6ed53198_1833x1091.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image 4. The 2025 Gartner Hype Cycle chart visually tracks the maturity and adoption of new technologies and how the public perception shifts.</figcaption></figure></div><p>This is the Gartner Hype Cycle chart, which helps businesses understand when to invest in emerging tech, mapping unrealistic hype against real-world value over time, with cycles often taking 3-10 years.</p><blockquote><p>Engineers who&#8217;ve built real systems tend to be skeptical by default, usually taking the slower path: try the tools, see where they help, notice where they fall apart, and only then decide where they fit. </p></blockquote><p>If you&#8217;re a Software Engineer, Data Engineer, Data Scientist, ML/MLOps/AI Engineer, or have built or worked on real projects, you&#8217;re probably tired of the hype around AI, and that&#8217;s a valid feeling that many people share. Maybe a few years ago, when a new model or something with Agents in it was announced, you became curious and excited.</p><p>Nowadays, you just default to what&#8217;s proven to work, and pay way less attention to the new shiny things that end up not delivering.</p><p>Speaking of shiny things, let&#8217;s walk through a few examples, directly correlated with the Hype-Cycle chart:</p><ol><li><p><strong>Rabbit R1 (Inflated Expectations)</strong> - the agentic device released in January 2024, marketed as one that could execute actions across apps, thanks to the Large Action Model (LAM). In reality, brittle UI automation.</p></li><li><p><strong>Devin (Peak &#8594; Trough)</strong> - the first AI Software Engineer, making SW Engineers worry about their jobs. In reality, it's expensive and loses context on real projects and complex codebases.</p></li><li><p><strong>Autonomous Agents (Trough of Disillusionment)</strong> - advertising fully agentic AI, replacing jobs, automating everything, or saving 90% costs. In reality, most projects rolled back to human-in-the-loop and workflows.</p></li></ol><p>That circles back to the points raised in the sections above. The engineering effort is moving slowly but steadily, as many companies may have built their first PoC and Pilot projects, but hit a wall on scaling and bringing solutions into production.</p><div><hr></div><h2>What should you focus on?</h2><p>At this point, the question isn&#8217;t whether AI will matter - it already does. </p><p>The real one is where to invest your time, when most tools, models, and trends won&#8217;t make it to production, or introduce tech debt and have teams port out and migrate to either in-house built tools or other ones entirely.</p><p>That&#8217;s why I structure this section into three pillars: <strong>Foundations, Engineering, and Systems</strong>.</p><p>It closely resembles the new direction I&#8217;m taking with this publication, moving out from doing deep walkthroughs on various, unstructured topics to structured, ladder-like paths - something I&#8217;ve been planning on since October.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KsPd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F632775b1-a991-459d-b6ce-4f86557414b7_2608x1156.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KsPd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F632775b1-a991-459d-b6ce-4f86557414b7_2608x1156.png 424w, https://substackcdn.com/image/fetch/$s_!KsPd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F632775b1-a991-459d-b6ce-4f86557414b7_2608x1156.png 848w, https://substackcdn.com/image/fetch/$s_!KsPd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F632775b1-a991-459d-b6ce-4f86557414b7_2608x1156.png 1272w, https://substackcdn.com/image/fetch/$s_!KsPd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F632775b1-a991-459d-b6ce-4f86557414b7_2608x1156.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KsPd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F632775b1-a991-459d-b6ce-4f86557414b7_2608x1156.png" width="1456" height="645" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/632775b1-a991-459d-b6ce-4f86557414b7_2608x1156.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:645,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:271900,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://read.theaimerge.com/i/184113282?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F632775b1-a991-459d-b6ce-4f86557414b7_2608x1156.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KsPd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F632775b1-a991-459d-b6ce-4f86557414b7_2608x1156.png 424w, https://substackcdn.com/image/fetch/$s_!KsPd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F632775b1-a991-459d-b6ce-4f86557414b7_2608x1156.png 848w, https://substackcdn.com/image/fetch/$s_!KsPd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F632775b1-a991-459d-b6ce-4f86557414b7_2608x1156.png 1272w, https://substackcdn.com/image/fetch/$s_!KsPd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F632775b1-a991-459d-b6ce-4f86557414b7_2608x1156.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A snippet of the <em><strong>Learn</strong> </em>section on the upcoming website I&#8217;m building for The AI Merge. This is the page that will encompass the learning paths, which will also mirror the structure of this newsletter.</figcaption></figure></div><p>I&#8217;m intentionally <strong>not</strong> listing dozens of resources. People like structured lists. They bookmark them. They rarely finish them.</p><p>Instead of outlining 50+ links, I&#8217;ve limited each topic to two or three high-quality resources that I consistently read and go through. I don&#8217;t want to create another roadmap, but a short, actionable path you can actually follow.</p><p>My <em><strong>recommendation is that you pick one resource</strong></em> out of all listed, one for each pillar, and study it for a few months.</p><p>Now let&#8217;s get to the part you&#8217;ve been expecting.</p><div><hr></div><h3>#1 AI Foundations</h3><p>There&#8217;s this misconception that only AI Research engineers, or the ones building efficient GPU Kernels, training Foundation Models, or working at the bleeding edge of AI, must master the foundations.</p><p>That&#8217;s not true. <strong>Foundations show up for everyone</strong> the moment you ship AI to real users.</p><p>Even if you don&#8217;t need to master distributed training, large-scale data patterns, and GPU topologies, that doesn&#8217;t mean understanding Context Length, Sampling Parameters, Inference, Quantization, or the basic math behind AI doesn&#8217;t matter for you.</p><blockquote><p>I&#8217;m intentionally focusing less on Machine Learning as you&#8217;ll pick up a lot of ML concepts naturally while studying deep learning.</p></blockquote><p>But in case you want a list of the <strong>ML fundamentals </strong>you should consciously cover:</p><h4>#1.0 Machine Learning</h4><ol><li><p>Supervised vs unsupervised learning</p></li><li><p>Overfitting / underfitting / Regularization (L1, L2)</p></li><li><p>Train / validation / test splits</p></li><li><p>Gradient descent (conceptually and mathematically)</p></li></ol><blockquote><p>All of these concepts are covered in <a href="https://themlbook.com/">Hundred Page Machine Learning, A.Burkov.</a></p></blockquote><h4>#1.1 Mathematics</h4><p>You don&#8217;t need to derive gradients by hand; it&#8217;s enough to get the basic intuition for linear algebra, probability, and optimization to reason about model behavior.</p><ol><li><p><a href="https://www.3blue1brown.com/">3Blue1Brown YouTube Channel, Grant Sanderson</a></p><p>Most probably, you&#8217;ve already seen videos from 3B1B. In case you haven&#8217;t, the step-by-step animations help you understand the logic behind AI.</p></li><li><p><a href="https://thepalindrome.org/">The Palindrome Newsletter, Tivadar Danka</a></p><p>Frankly, one of the best and most up-to-date resources on Math behind AI/ML. Tivadar does a great job explaining complex concepts with simple terms.</p></li></ol><blockquote><p>Don&#8217;t spend too much time on maths, understand the core principles is enough.</p></blockquote><h4>#1.2 Deep Learning</h4><p>The term Deep Learning might have grown out of fashion, being replaced by the general AI or GenAI term. But for someone working in the AI field, Deep Learning is the foundation on top of which Language Models, Vision Models, and Generative AI are built.</p><p>Two resources to get started with Deep Learning:</p><ol><li><p><a href="https://youtu.be/alfdI7S6wCY">Introduction to Deep Learning, MIT 2025 Playlist.</a></p><p>Neural Networks, model training, distillation, optimization, and finetuning - all of these live under the Deep Learning umbrella. This MIT Playlist is a great up-to-date resource on understanding what Deep Learning is.</p></li><li><p><a href="https://www.nvidia.com/en-us/training/">NVIDIA Deep Learning Institute</a><br>A rich collection of industry-relevant technical trainings from NVIDIA teaches the broader spectrum of DL.</p></li></ol><blockquote><p>If you want to understand Generative AI, LLMs and Diffusion, you must understand the core components of Deep Learning first.</p></blockquote><h4>#1.3 Generative AI</h4><p>This is where most of the AI industry keeps an eye on, and most engineers operate today. At the same time, it&#8217;s where misunderstandings are common. </p><p>Most resources listed will focus on Language Modeling:</p><ol><li><p><a href="https://www.youtube.com/playlist?list=PLoROMvodv4rObv1FMizXqumgVVdzX4_05">Large Language Models, Stanford CME 295 Playlist</a> </p><p>If you&#8217;re somewhat experienced, take Lectures 5, 7, 8, and 9. For beginners, add  1 and 2 to the list. For everyone, watch the CS25 V5 lecture from Josh Batson at Anthropic.</p></li><li><p><a href="https://www.youtube.com/playlist?list=PLoROMvodv4rOY23Y0BoGoBGgQ1zmU_MT_">Language Modeling from Scratch, Stanford CS336 Playlist</a><br>These explain everything around LLMs, the architectures, how they&#8217;re trained, why scaling works, and where it breaks down.</p></li></ol><p>A few good books on the topic (<strong>pick one</strong>):</p><ol><li><p><a href="https://www.amazon.com/Build-Large-Language-Model-Scratch/dp/1633437167">LLMs from Scratch, Sebastian Raschka</a><br>If you want a step-by-step walkthrough on building an LLM from scratch with Pytorch.</p></li><li><p><a href="https://www.amazon.com/Hands-Large-Language-Models-Understanding/dp/1098150961">Hands-On Large Language Models: Language Understanding and Generation, J.Alammar and M.Grootendorst</a><br>A real deep dive on everything about LLMs, from NLP (Natural Language Processing) to understanding newer architectures, training.</p></li><li><p><a href="https://www.amazon.com/-/es/Generative-Deep-Learning-Teaching-Machines/dp/1492041947">Generative Deep Learning, David Foster</a><br>I recommend this one, as apart from Language Models, it also covers the multimodal segment, models that can generate Audio, Image, and Video.</p></li></ol><blockquote><p>For minimal investment, look into understanding how LLMs work, and how to evaluate LLM-based systems.</p></blockquote><h4>#1.4 LLM-based Systems</h4><p>Agents and Agentic Workflows are becoming more and more popular. However, it is still a field surrounded by hyped claims. Fully autonomous systems still require a lot more work, or as A.Karpathy put it <em>&#8220;We&#8217;re in the decade of Agents, not the year of Agents&#8221;.</em></p><p>You don&#8217;t need 100 resources on Agents and Workflows, you only need this one.</p><ol><li><p><a href="https://drive.google.com/file/d/1-5ho2aSZ-z0FcW8W_jMUoFSQ5hTKvJ43/view">Agentic Design Patterns, A.Gulli</a><br>This is a Free, 400 Pages booklet published by a Google Sr Dir and Distinguished Engineer, covering everything you need to know about Agents, Workflows, Memory and Agency.</p></li></ol><blockquote><p>I&#8217;m at Chapter 20, close to finishing it, but surely will read it again shortly as it&#8217;s information dense, hands-down a great resource that gathers everything in one place.</p></blockquote><div><hr></div><h3>#2 Engineering</h3><p>Any engineer from the pre-2023 (ChatGPT) era will agree with this.</p><p>There&#8217;s another misconception that&#8217;s quite popular in the AI field, and I think few people actually address it, to clear the hype.</p><blockquote><p><em>&#8220;AI engineers don&#8217;t really need strong software engineering skills - agents can handle most of the code.&#8221;</em></p></blockquote><p>AI-assisted coding doesn&#8217;t replace engineering - it exposes it. When everyone can write code, quality comes from thinking clearly: understanding the problem, designing the system and its intricacies, and only then writing the implementation.</p><p>If you want to build solid AI Systems that reach production, you need to be a good software engineer first.</p><p>I&#8217;m going to split the resources into 2 pillars: <em>Architecture and Programming.</em></p><h4>#2.1 Architecture</h4><p>This is less about templates to structure your projects and more about building robust codebases that are easy to evolve and maintain.</p><ol><li><p><a href="https://www.amazon.com/Clean-Architecture-Craftsmans-Software-Structure/dp/0134494164">Clean Architecture, R.C.Martin</a><br>Even if published a decade ago, it still stays strong as it solves major software development pain points by isolating business logic from technical details (UI, database, frameworks).</p></li><li><p><a href="https://www.amazon.com/Fundamentals-Software-Architecture-Comprehensive-Characteristics/dp/1492043451">Fundamentals of Software Architecture</a>, M.Richards and N.Ford</p><p>Goes through architectural patterns (monoliths, microservices, event-driven).</p></li></ol><blockquote><p>You don&#8217;t need to know everything: DDD, Clean Architecture or Vertical Slice. But you must understand basics of Monoliths, Microservices, Event Driven Architectures.</p></blockquote><h4>#2.2 Programming</h4><p>This depends on your primary stack, but the principle is universal.</p><p>Even if you&#8217;re using AI agents like Claude or Codex to write code faster, all you&#8217;re really doing is amplifying whatever quality already exists. If your code is hard to read, hard to test, or full of hidden side effects, AI will scale those problems - not fix them.</p><p>As this becomes the default, the work will shift away from writing code toward <strong>reading, reviewing</strong> code, and making speed matter less than clarity.<strong> </strong></p><p>You don&#8217;t need to know every language. Python is enough.</p><ol><li><p><a href="https://www.python.org/doc/">Python.org</a></p></li><li><p><a href="https://effectivepython.com/">Effective Python, Brett Slatkin</a><br>A great practical guide to writing clear, idiomatic, and maintainable Python.</p></li><li><p><a href="https://elmoukrie.com/wp-content/uploads/2022/05/luciano-ramalho-fluent-python_-clear-concise-and-effective-programming-oreilly-media-2022.pdf">Fluent Python, Luciano Ramalho</a></p><p>Extensive, going through Python's core language features and libraries.</p></li></ol><blockquote><p>If you&#8217;re already programming in Python, study the Effective Python book. If you&#8217;re new to Python, skim through Fluent Python, then Effective Python.</p></blockquote><p>These are large books, best way to get value out of them is to jump to the required chapter, skim through the pages, and gather notes. </p><p><strong>(Bonus) Learning Go </strong>is another long-term safe bet in AI/ML.</p><ol><li><p><a href="https://go.dev/doc/effective_go">Effective Go, go.dev</a><br>If you&#8217;re already familiar with Python and want to pick up another language that&#8217;s close to Python, Go is the best candidate.</p></li><li><p><a href="https://www.amazon.de/Learning-Go-Idiomatic-Real-World-Programming/dp/1492077216/">Learning Go, Jon Bodner</a><br>A deeper walkthrough on Go's idioms, and how to avoid recreating patterns that don't make sense in a Go context.</p></li></ol><blockquote><p>I&#8217;ve been programming in Go for the past 6 months, and I love it. I can finally understand the <a href="https://github.com/ollama/ollama/tree/main">Ollama codebase.</a></p></blockquote><h3>#3 AI Systems</h3><p>System Design is mandatory; every tech interview will have a System Design part.</p><p>Good design translates into stable software, or at least software that&#8217;s easier to evolve. Past the architecture and past the code that implements features, software must scale, be easier to maintain, and be resilient. </p><p>With AI, this becomes harder. </p><p>We introduce non-determinism into software, which means assumptions break more often and in less obvious ways. The outputs will vary, costs fluctuate as AI Systems require way more compute than traditional ones, and designing a system right from the get-go is more important than building it.</p><p>Best guides and books I follow and read on System Design:</p><ol><li><p><a href="https://bytebytego.com/">ByteByteGo, A.Xiu</a><br>One of the most popular and best resources on understanding how large systems running at scale in production are designed and built.</p></li><li><p><a href="https://www.oreilly.com/library/view/designing-data-intensive-applications/9781491903063/">Designing Data-Intensive Applications (DDIA), M.Kleppmann</a><br>Not focusing on AI per se, but it&#8217;s a great resource to understand how real systems behave under load and scale.</p></li><li><p><a href="https://newsletter.systemdesign.one/p/system-design-pdf">System Design Playbook</a><br>Massive thanks to <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Neo Kim&quot;,&quot;id&quot;:135589200,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c103940f-0d8b-47e7-9a33-013202e17bb8_389x389.jpeg&quot;,&quot;uuid&quot;:&quot;d2c57d80-2bd1-4178-a881-475bf04aaa61&quot;}" data-component-name="MentionToDOM"></span> for compiling it and making it free.</p></li></ol><p>For AI Systems specifically, I recommend:</p><ol><li><p><a href="https://www.youtube.com/channel/UCLKPca3kwwd-B59HNr-_lvA">AI Engineer (YouTube)</a><br>One of the few places that discusses AI application design from a systems and production perspective, a lot of great talks were uploaded recently.</p></li><li><p><a href="https://www.oreilly.com/library/view/ai-engineering/9781098166298/">AI Engineering, Chip Huyen</a><br>This book needs no introduction. I can describe it as an extensive zero-shot introduction to AI Engineering; it&#8217;s not too technical, but packed with details.</p></li><li><p><strong>The <a href="https://www.anthropic.com/engineering">Anthropic</a> and <a href="https://developers.openai.com/blog/">OpenAI</a> engineering blogs.</strong></p></li></ol><blockquote><p>What you need is not more resources to bookmark, but one or two solid entrypoints on all these pillars.</p></blockquote><p>The next step is to apply these learnings in your own work, and that&#8217;s where I&#8217;m helping with The AI Merge.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">The AI Merge is a publication for engineers building AI beyond demo pilots.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h2>Closing Thoughts</h2><p>My goal with this article was to gain an overview of the industry's current state, analyzing the 2025 industry reports from Gartner, MIT, and Boston Consulting Group.</p><p>All of them outline the same ideas: The current gap in AI Systems is execution.</p><p>Building demos is easy; morphing them into a system and deploying in production is a different game. </p><p>The three pillars I&#8217;ve outlined, <strong>Foundations, Engineering, and Systems</strong>, aren&#8217;t just theoretical; they construct an efficient bottom-up learning plan that focuses more on the Engineering side of things rather than on the surface-level AI features.</p><p>At the end of the day, I believe the best AI Engineers are Software Engineers at their core, people who&#8217;ve built the right mental models, understanding how software works, how to build and scale it, how systems work, and how to design one. </p><p>This knowledge ports easily to AI Systems.</p><p>That&#8217;s the direction this publication, and the learning paths behind it, will continue to follow.</p><div><hr></div><p><strong>Would love to hear your thoughts &#128172;</strong></p><p><em>What&#8217;s your take on the new Knowledge Pillars paths - <strong>Foundations, Engineering, and Systems</strong>?</em></p><p><em>If you&#8217;re an engineer, how do you see this execution gap actually closing?</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/p/the-smartest-ai-engineers-will-bet/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/p/the-smartest-ai-engineers-will-bet/comments"><span>Leave a comment</span></a></p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LE6p!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b98e43c-f167-4ff6-9230-49af19b74415_4800x1227.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LE6p!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b98e43c-f167-4ff6-9230-49af19b74415_4800x1227.png 424w, https://substackcdn.com/image/fetch/$s_!LE6p!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b98e43c-f167-4ff6-9230-49af19b74415_4800x1227.png 848w, https://substackcdn.com/image/fetch/$s_!LE6p!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b98e43c-f167-4ff6-9230-49af19b74415_4800x1227.png 1272w, https://substackcdn.com/image/fetch/$s_!LE6p!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b98e43c-f167-4ff6-9230-49af19b74415_4800x1227.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LE6p!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b98e43c-f167-4ff6-9230-49af19b74415_4800x1227.png" width="1456" height="372" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1b98e43c-f167-4ff6-9230-49af19b74415_4800x1227.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:372,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:191801,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://read.theaimerge.com/i/184113282?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b98e43c-f167-4ff6-9230-49af19b74415_4800x1227.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LE6p!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b98e43c-f167-4ff6-9230-49af19b74415_4800x1227.png 424w, https://substackcdn.com/image/fetch/$s_!LE6p!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b98e43c-f167-4ff6-9230-49af19b74415_4800x1227.png 848w, https://substackcdn.com/image/fetch/$s_!LE6p!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b98e43c-f167-4ff6-9230-49af19b74415_4800x1227.png 1272w, https://substackcdn.com/image/fetch/$s_!LE6p!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b98e43c-f167-4ff6-9230-49af19b74415_4800x1227.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h3>References:</h3><p>[1] AI Engineer. (n.d.). <em>AI Engineer</em>. <a href="https://www.ai.engineer/">https://www.ai.engineer/</a></p><p>[2] AI Engineering: Building Applications with Foundation Models, Huyen Chip (2026). Amazon.com. <a href="https://www.amazon.com/AI-Engineering-Building-Applications-Foundation-ebook/dp/B0DPLNK9GN">https://www.amazon.com/AI-Engineering-Building-Applications-Foundation-ebook/dp/B0DPLNK9GN</a></p><p>[3] O&#8217;Reilly Media. (n.d.). <em>Designing Data-Intensive Applications</em>. <a href="https://www.oreilly.com/library/view/designing-data-intensive-applications/9781491903063/">https://www.oreilly.com/library/view/designing-data-intensive-applications/9781491903063/</a></p><p>[4] NVIDIA. (n.d.). <em>Training and Certification</em>. <a href="https://www.nvidia.com/en-us/training/">https://www.nvidia.com/en-us/training/</a></p><p>[5] Danka, T. (n.d.).<a href="https://thepalindrome.org/"> </a><em><a href="https://thepalindrome.org/">The Palindrome Newsletter</a></em><a href="https://thepalindrome.org/">.</a> </p><p>[6] Martin, R. C. (n.d.). <em>Clean Architecture: A Craftsman&#8217;s Guide to Software Structure and Design</em>. <a href="https://www.amazon.com/Clean-Architecture-Craftsmans-Software-Structure/dp/0134494164">https://www.amazon.com/Clean-Architecture-Craftsmans-Software-Structure/dp/0134494164</a></p><p>[7] Stanford University Human-Centered AI. (n.d.). <em>2025 AI Index Report: Technical Performance</em>. <a href="https://hai.stanford.edu/ai-index/2025-ai-index-report/technical-performance">https://hai.stanford.edu/ai-index/2025-ai-index-report/technical-performance</a></p><p>[8] Boston Consulting Group. (n.d.). <em>The Widening AI Value Gap</em>. <a href="https://media-publications.bcg.com/The-Widening-AI-Value-Gap-Sept-2025.pdf#:~:text=Future,skills%2C%20workflows%2C%20and%20technology%20that">https://media-publications.bcg.com/The-Widening-AI-Value-Gap-Sept-2025.pdf</a></p><p>[9]Gartner. (n.d.). <em>Gartner Hype Cycle Identifies Top AI Innovations in 2025</em>. <a href="https://www.gartner.com/en/newsroom/press-releases/2025-08-05-gartner-hype-cycle-identifies-top-ai-innovations-in-2025">https://www.gartner.com/en/newsroom/press-releases/2025-08-05-gartner-hype-cycle-identifies-top-ai-innovations-in-2025</a></p><p>[10] MIT. (n.d.). <em>State of AI in Business 2025 Report</em>. <a href="https://mlq.ai/media/quarterly_decks/v0.1_State_of_AI_in_Business_2025_Report.pdf">https://mlq.ai/media/quarterly_decks/v0.1_State_of_AI_in_Business_2025_Report.pdf</a></p><p>[11] Cleanlab. (2025). <em>AI agents in production: 2025 report</em>. <a href="https://cleanlab.ai/ai-agents-in-production-2025/">https://cleanlab.ai/ai-agents-in-production-2025/</a></p><p>[12] Thompson, A. D. (2023, February 25). <em>Models Table (10,000+ LLM data points)</em>. Dr Alan D. Thompson &#8211; LifeArchitect.ai. <a href="https://lifearchitect.ai/models-table/">https://lifearchitect.ai/models-table/</a></p><p>[13] McKinsey &amp; Company. (2025, November 5). <em>The state of AI: Agents, innovation, and transformation</em>. McKinsey &amp; Company. <a href="https://www.mckinsey.com/capabilities/quantumblack/our-insights/the-state-of-ai?utm_source=chatgpt.com">https://www.mckinsey.com/capabilities/quantumblack/our-insights/the-state-of-ai</a></p><div><hr></div><h3>Images</h3><p>Images 2,3,4 were taken from the Boston Consulting Group and Gartner&#8217;s State of AI 2025 reports.</p>]]></content:encoded></item><item><title><![CDATA[Last article of 2025 - A Directional Update]]></title><description><![CDATA[Reflecting on 2025, and how this newsletter is changing going into 2026]]></description><link>https://read.theaimerge.com/p/last-article-of-2025-a-directional</link><guid isPermaLink="false">https://read.theaimerge.com/p/last-article-of-2025-a-directional</guid><dc:creator><![CDATA[Alex Razvant]]></dc:creator><pubDate>Sat, 27 Dec 2025 14:35:36 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/2008812a-a6b8-44c9-8470-a8807be56ca7_1200x630.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This article is the last of 2025. </p><p>It&#8217;s an end-of-year note - a pause to reflect on the direction I&#8217;ll be taking next.</p><p>Over the past few weeks, I&#8217;ve been rethinking how I build, what I focus on, and what kind of work is worth compounding. Until now, this newsletter has explored the inner workings of AI from many angles. From low-level concepts to the tools and frameworks used to build AI systems in practice.</p><p>Some things are about to change.</p><p>Before getting into that, I want to start with a short story.<br>Not as inspiration, but as context.</p><p>Looking back from where I started to where I am, and connecting the dots, made me realize something about leverage.</p><div><hr></div><h2>Compounding Leverage</h2><p>When I started my university studies in 2015, it was my first real break away from home. I picked a CS major, but didn&#8217;t have a laptop to work on or study on.</p><p>For the first four months, I worked 3 night shifts per week as a bill counter, where I unpacked cash bags, counted notes, scanned for damaged ones, and repackaged everything to be delivered to ATMs.</p><p><em>Not fulfilling or strategic work. But it solved the money problem for a bit.</em></p><p>The first thing I bought was an ASUS laptop that I spent around 1500 RON (~300 USD) on. That laptop was part reward, part requirement, as I could now learn and tinker with code past the CS Labs I had.</p><p>In 2017, the same pattern followed. I was fairly convinced at the time that I needed to buy a Mac, as I wanted to study Objective-C and Swift, and tinker with iOS applications.</p><p>Opportunity came, and I went to the US to work for the summer on a student J1 visa, thinking I could make a good amount of money.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MpM0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21f8ad9-dbc0-4c43-8d7e-8f84c8a01c6d_1024x768.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MpM0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21f8ad9-dbc0-4c43-8d7e-8f84c8a01c6d_1024x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!MpM0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21f8ad9-dbc0-4c43-8d7e-8f84c8a01c6d_1024x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!MpM0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21f8ad9-dbc0-4c43-8d7e-8f84c8a01c6d_1024x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!MpM0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21f8ad9-dbc0-4c43-8d7e-8f84c8a01c6d_1024x768.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MpM0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21f8ad9-dbc0-4c43-8d7e-8f84c8a01c6d_1024x768.jpeg" width="1024" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b21f8ad9-dbc0-4c43-8d7e-8f84c8a01c6d_1024x768.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:202152,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/182512919?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21f8ad9-dbc0-4c43-8d7e-8f84c8a01c6d_1024x768.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!MpM0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21f8ad9-dbc0-4c43-8d7e-8f84c8a01c6d_1024x768.jpeg 424w, https://substackcdn.com/image/fetch/$s_!MpM0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21f8ad9-dbc0-4c43-8d7e-8f84c8a01c6d_1024x768.jpeg 848w, https://substackcdn.com/image/fetch/$s_!MpM0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21f8ad9-dbc0-4c43-8d7e-8f84c8a01c6d_1024x768.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!MpM0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21f8ad9-dbc0-4c43-8d7e-8f84c8a01c6d_1024x768.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">New York at night, A picture I took from a ferry coming back from Liberty Island, in 2017.</figcaption></figure></div><p>Financially, it didn&#8217;t work out well as I didn&#8217;t come back with savings. I did come back with a refurbished MacBook Pro (13in, 2017), though. Next year, I will get my first full-time job as a programmer, working with Python, C++, and Computer Vision. </p><p>That&#8217;s how I entered the AI and ML world.</p><p><em>Why share this?</em></p><p>None of these steps was optimized. Night shifts made me skip classes and cut through the study time. The J1 summer didn&#8217;t pay off financially, and again, I could have spent that summer studying. But each decision quietly compounded my ability to explore, confidence, study, and move closer to things I cared about.</p><p>Direction mattered more than speed.</p><div><hr></div><h2>The New Direction</h2><p>That baseline for this newsletter hasn&#8217;t changed. <em><strong>AI &amp; Building AI Systems still stands solid.</strong></em></p><p>What has changed is how wide the surface has become.</p><p>As I was looking through the archive and all the articles I&#8217;ve posted, I noticed that over time, the focus of this newsletter slowly expanded: from details on architecture and hardware, to tools, to frameworks, tips &amp; tricks, and advanced low-level details.</p><p>I&#8217;ve covered GPUs, Neural Network Architectures, Programming Languages, AI Inference Frameworks, Engines, and AI Engineering concepts - but slowly diverged from the initial idea of <strong>building and shipping end-to-end</strong>, explaining along the way.</p><p>I&#8217;ve decided to do the opposite: </p><ol><li><p>Reducing from the surface</p></li><li><p>Increasing depth, more practicality</p></li><li><p>Focusing on building and integrating AI </p></li></ol><p>All the existing articles I&#8217;ve published still helped many of you understand how everything works, but less on how to connect the dots in a bigger system.</p><p><em>It&#8217;s the building systems around AI, rather than building AI around a system.</em></p><blockquote><p>Most real-world environments are legacy systems that could benefit from AI, not greenfield agent platforms that replace everything overnight. </p></blockquote><p>In practice, that often looks like small practical additions: a retrieval layer over internal docs, a vision model to filter large image datasets, a video summarization workflow, etc.</p><p>This is the layer I want to focus on.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Building systems where AI actually fits. Subscribe to follow the next phase.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>To do that properly, I need to realign what I publish with what I actually want to build. That&#8217;s why I decided to get a fresh, ground-up look at everything I&#8217;ve shared here, and start aligning the pillars one by one.</p><p><em>Starting with changing the name<strong>.</strong></em></p><div><hr></div><h2>A New Name: The AI Merge</h2><p>The name Neural Bits was tightly coupled to the idea of byte-sized insights on AI.</p><p>Looking back, that description was only half accurate. Some articles were dense and technical, others were shorter and lighter reads - but from a reader&#8217;s perspective, I think most of them were seen as deep dives into individual components: a model, a framework, a piece of infrastructure.</p><p>There was another practical detail as well. A few months after starting the newsletter, I discovered that Neural Bits was already the name of a software development company in Mumbai. At the time, I chose not to change it as I focused on writing and learning, not branding.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3fqV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a3fdcb-b5bd-43af-9764-f9e6312dab00_6773x4537.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3fqV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a3fdcb-b5bd-43af-9764-f9e6312dab00_6773x4537.png 424w, https://substackcdn.com/image/fetch/$s_!3fqV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a3fdcb-b5bd-43af-9764-f9e6312dab00_6773x4537.png 848w, https://substackcdn.com/image/fetch/$s_!3fqV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a3fdcb-b5bd-43af-9764-f9e6312dab00_6773x4537.png 1272w, https://substackcdn.com/image/fetch/$s_!3fqV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a3fdcb-b5bd-43af-9764-f9e6312dab00_6773x4537.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3fqV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a3fdcb-b5bd-43af-9764-f9e6312dab00_6773x4537.png" width="1456" height="975" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f0a3fdcb-b5bd-43af-9764-f9e6312dab00_6773x4537.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:975,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:325089,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/182512919?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a3fdcb-b5bd-43af-9764-f9e6312dab00_6773x4537.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3fqV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a3fdcb-b5bd-43af-9764-f9e6312dab00_6773x4537.png 424w, https://substackcdn.com/image/fetch/$s_!3fqV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a3fdcb-b5bd-43af-9764-f9e6312dab00_6773x4537.png 848w, https://substackcdn.com/image/fetch/$s_!3fqV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a3fdcb-b5bd-43af-9764-f9e6312dab00_6773x4537.png 1272w, https://substackcdn.com/image/fetch/$s_!3fqV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0a3fdcb-b5bd-43af-9764-f9e6312dab00_6773x4537.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The AI Merge is closer to what I originally set out to do: build AI that fits into real systems, end to end. </p><p>The foundations I&#8217;ve written about - AI Engineering, Inference, Multimodal AI, LLMs, APIs, GPUs, optimization - still matter. They&#8217;re prerequisites. It&#8217;s easier to reason about monitoring when you understand inference patterns. It&#8217;s easier to deploy and optimize models when you understand the underlying infrastructure.</p><p>But the new focus will be more practical, on how <strong>AI merges into full systems.</strong></p><p>That&#8217;s what the new name reflects.</p><div><hr></div><h2>A New Channel: Video</h2><p>Some things are easier to understand when you can see them built.</p><p>A few months ago, I collaborated with a good friend, <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Miguel Otero Pedrido&quot;,&quot;id&quot;:89972117,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!LZBx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b58b1f5-4d25-4dcf-9f48-b67a6e6e1316_1200x1200.jpeg&quot;,&quot;uuid&quot;:&quot;ad2152dc-f85c-497c-be6f-82c63f0a5f18&quot;}" data-component-name="MentionToDOM"></span> (from <em>The Neural Maze</em>), on a free course we called <em><a href="https://multimodalai.substack.com/p/kubrick-course-final-round-up">Kubrick: The Multimodal Agent</a></em>. Until then, most of my work had been text-first, writing code and explaining it through articles.</p><p>Working on that course changed how I think about video content. Walking through code and design decisions step by step is a great way of teaching. Instead of describing what to build, we could show how and why things were built the way they were.</p><p>Many people who went through it reached out with questions and follow-ups, and others even scaled and built their own solution, following the same principles. </p><p>That feedback was really helpful. Because of that, I&#8217;ve started the YouTube channel. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hYZi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d830233-b4bb-4813-b065-f872e6384a35_2654x852.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hYZi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d830233-b4bb-4813-b065-f872e6384a35_2654x852.png 424w, https://substackcdn.com/image/fetch/$s_!hYZi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d830233-b4bb-4813-b065-f872e6384a35_2654x852.png 848w, https://substackcdn.com/image/fetch/$s_!hYZi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d830233-b4bb-4813-b065-f872e6384a35_2654x852.png 1272w, https://substackcdn.com/image/fetch/$s_!hYZi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d830233-b4bb-4813-b065-f872e6384a35_2654x852.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hYZi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d830233-b4bb-4813-b065-f872e6384a35_2654x852.png" width="1456" height="467" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9d830233-b4bb-4813-b065-f872e6384a35_2654x852.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:467,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:427352,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/182512919?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d830233-b4bb-4813-b065-f872e6384a35_2654x852.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hYZi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d830233-b4bb-4813-b065-f872e6384a35_2654x852.png 424w, https://substackcdn.com/image/fetch/$s_!hYZi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d830233-b4bb-4813-b065-f872e6384a35_2654x852.png 848w, https://substackcdn.com/image/fetch/$s_!hYZi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d830233-b4bb-4813-b065-f872e6384a35_2654x852.png 1272w, https://substackcdn.com/image/fetch/$s_!hYZi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d830233-b4bb-4813-b065-f872e6384a35_2654x852.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>It will focus on longer-form walkthroughs: explaining System Design decisions, live coding and course walkthroughs, webinars, Q&amp;A sessions, and more. </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.youtube.com/@theaimerge&quot;,&quot;text&quot;:&quot;YouTube Channel&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.youtube.com/@theaimerge"><span>YouTube Channel</span></a></p><div><hr></div><h2>A New Platform: The Website</h2><p>I&#8217;m working on building a strong reference point.</p><p>A place where I can present the projects and courses I&#8217;m working on, share a bit more context about my background, and keep the most important resources accessible in one place. It will also collect recordings, notes, and links to resources I&#8217;ve found useful along the way - things that are worth keeping an eye on, but don&#8217;t always fit into a single post or video.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Hog5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cc8d388-615c-40db-9df3-c7dd6307574b_2720x2182.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Hog5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cc8d388-615c-40db-9df3-c7dd6307574b_2720x2182.png 424w, https://substackcdn.com/image/fetch/$s_!Hog5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cc8d388-615c-40db-9df3-c7dd6307574b_2720x2182.png 848w, https://substackcdn.com/image/fetch/$s_!Hog5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cc8d388-615c-40db-9df3-c7dd6307574b_2720x2182.png 1272w, https://substackcdn.com/image/fetch/$s_!Hog5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cc8d388-615c-40db-9df3-c7dd6307574b_2720x2182.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Hog5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cc8d388-615c-40db-9df3-c7dd6307574b_2720x2182.png" width="1456" height="1168" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0cc8d388-615c-40db-9df3-c7dd6307574b_2720x2182.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1168,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1097229,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/182512919?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cc8d388-615c-40db-9df3-c7dd6307574b_2720x2182.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Hog5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cc8d388-615c-40db-9df3-c7dd6307574b_2720x2182.png 424w, https://substackcdn.com/image/fetch/$s_!Hog5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cc8d388-615c-40db-9df3-c7dd6307574b_2720x2182.png 848w, https://substackcdn.com/image/fetch/$s_!Hog5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cc8d388-615c-40db-9df3-c7dd6307574b_2720x2182.png 1272w, https://substackcdn.com/image/fetch/$s_!Hog5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cc8d388-615c-40db-9df3-c7dd6307574b_2720x2182.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A view of the best articles and resources covered in the Newsletter.</figcaption></figure></div><p>I envision it as a place you can come back to when you want an overview of what I&#8217;m working on, what&#8217;s available to learn from, how I can help you, and how the different pieces connect. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Gn92!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F635de06a-d94d-4c9c-a92a-47bac9a8c108_2644x2350.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Gn92!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F635de06a-d94d-4c9c-a92a-47bac9a8c108_2644x2350.png 424w, https://substackcdn.com/image/fetch/$s_!Gn92!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F635de06a-d94d-4c9c-a92a-47bac9a8c108_2644x2350.png 848w, https://substackcdn.com/image/fetch/$s_!Gn92!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F635de06a-d94d-4c9c-a92a-47bac9a8c108_2644x2350.png 1272w, https://substackcdn.com/image/fetch/$s_!Gn92!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F635de06a-d94d-4c9c-a92a-47bac9a8c108_2644x2350.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Gn92!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F635de06a-d94d-4c9c-a92a-47bac9a8c108_2644x2350.png" width="1456" height="1294" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/635de06a-d94d-4c9c-a92a-47bac9a8c108_2644x2350.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1294,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:626596,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/182512919?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F635de06a-d94d-4c9c-a92a-47bac9a8c108_2644x2350.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Gn92!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F635de06a-d94d-4c9c-a92a-47bac9a8c108_2644x2350.png 424w, https://substackcdn.com/image/fetch/$s_!Gn92!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F635de06a-d94d-4c9c-a92a-47bac9a8c108_2644x2350.png 848w, https://substackcdn.com/image/fetch/$s_!Gn92!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F635de06a-d94d-4c9c-a92a-47bac9a8c108_2644x2350.png 1272w, https://substackcdn.com/image/fetch/$s_!Gn92!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F635de06a-d94d-4c9c-a92a-47bac9a8c108_2644x2350.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A central page for courses and projects, past and in progress.</figcaption></figure></div><p>The website ties all the channels together. It provides a quick and strong intro to everything you could learn, build, and apply.</p><p>I&#8217;m rolling it out in 2026.</p><div><hr></div><h2>A note before the New Year</h2><p>Before closing this out, thank you.</p><p>At the start of 2025, this newsletter had around 300 subscribers. Today, there are more than 7,300 of you learning along. </p><p>This year, we went deep - from GPU programming and AI inference, to frameworks, inference engines, AI Engineering topics, and building a free course that many of you extended on your own.</p><p>I also had the opportunity to work closely with NVIDIA and received a DGX Spark,<em>&nbsp;</em>which I&#8217;ll use to build and teach in public next year.</p><p>Going into 2026 with a clearer direction, new channels, live sessions, and end-to-end projects. Less surface, more systems.</p><p>Wishing you a great end of the year! <br><strong>Looking forward to learning and building together in the next one.</strong></p><p><span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Alex Razvant&quot;,&quot;id&quot;:102147316,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e98b89ac-97e9-4875-88b6-2a5039668cb2_1700x1700.png&quot;,&quot;uuid&quot;:&quot;0556b8ee-cc8f-4512-9b81-ffbac3cd3514&quot;}" data-component-name="MentionToDOM"></span> </p><div><hr></div><p>This shift feels important to me. I'm happy to hear your thoughts.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/p/last-article-of-2025-a-directional/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/p/last-article-of-2025-a-directional/comments"><span>Leave a comment</span></a></p>]]></content:encoded></item><item><title><![CDATA[Unboxing the NVIDIA DGX Spark: First Impressions]]></title><description><![CDATA[The hardware, The Software components, benchmarks, target audience, and what it can do for AI Developers.]]></description><link>https://read.theaimerge.com/p/unboxing-my-nvidia-dgx-spark-first</link><guid isPermaLink="false">https://read.theaimerge.com/p/unboxing-my-nvidia-dgx-spark-first</guid><dc:creator><![CDATA[Alex Razvant]]></dc:creator><pubDate>Sat, 20 Dec 2025 14:15:48 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!7urH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aa5c3b9-eb95-413b-99be-45bca760ab1c_1280x685.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Welcome to The AI Merge. Each week, I write about practical, production-ready AI/ML Engineering. Join over <strong><a href="https://multimodalai.substack.com/subscribe">7000+ engineers</a></strong> and learn to build real-world AI Systems.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p>I&#8217;ve always leaned towards NVIDIA hardware. It started years ago when I was adding parts to my wishlist for building my dream gaming PC, and it continued as my work shifted toward AI development. Over time, a large majority of the GPUs and edge devices I&#8217;ve built on or deployed AI on have been NVIDIA-based because that&#8217;s where the ecosystem, tooling, and performance consistently came together.</p><p>I&#8217;ve worked on Jetson Nano, Jetson AGX Xavier at the edge, RTX 3090, 4090, L40, A2, and more in workstations, and datacenter GPUs A100, or H100. While each serves a different role, some prioritizing memory capacity, others raw compute or newer CUDA capabilities - they all reflect NVIDIA&#8217;s focus on end-to-end acceleration across hardware and software.</p><p>With <strong>DGX Spark</strong>, NVIDIA is targeting a sweet spot in local AI development: a desk-side developer kit with large unified memory, power-efficient design, and a capable GPU, built for AI engineers to develop, test, and validate models locally before scaling out to the cloud or large clusters.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Pida!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bcfeeec-9719-4dd2-9793-df9b09d33134_3072x4096.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Pida!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bcfeeec-9719-4dd2-9793-df9b09d33134_3072x4096.png 424w, https://substackcdn.com/image/fetch/$s_!Pida!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bcfeeec-9719-4dd2-9793-df9b09d33134_3072x4096.png 848w, https://substackcdn.com/image/fetch/$s_!Pida!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bcfeeec-9719-4dd2-9793-df9b09d33134_3072x4096.png 1272w, https://substackcdn.com/image/fetch/$s_!Pida!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bcfeeec-9719-4dd2-9793-df9b09d33134_3072x4096.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Pida!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bcfeeec-9719-4dd2-9793-df9b09d33134_3072x4096.png" width="1456" height="1941" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4bcfeeec-9719-4dd2-9793-df9b09d33134_3072x4096.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1941,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:10544576,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/181503991?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bcfeeec-9719-4dd2-9793-df9b09d33134_3072x4096.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Pida!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bcfeeec-9719-4dd2-9793-df9b09d33134_3072x4096.png 424w, https://substackcdn.com/image/fetch/$s_!Pida!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bcfeeec-9719-4dd2-9793-df9b09d33134_3072x4096.png 848w, https://substackcdn.com/image/fetch/$s_!Pida!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bcfeeec-9719-4dd2-9793-df9b09d33134_3072x4096.png 1272w, https://substackcdn.com/image/fetch/$s_!Pida!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4bcfeeec-9719-4dd2-9793-df9b09d33134_3072x4096.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 1. The NVIDIA DGX Spark Founder&#8217;s Edition.</figcaption></figure></div><p>Past development, modern AI ultimately scales to massive (mostly) NVIDIA-powered superclusters.</p><blockquote><p><strong>Note:</strong> AI Superclusters tend to go with NVIDIA GPUs, <a href="https://x.ai/colossus">xAI&#8217;s Collosus Supercluster</a>, <a href="https://azure.microsoft.com/en-us/blog/microsoft-azure-delivers-the-first-large-scale-cluster-with-nvidia-gb300-nvl72-for-openai-workloads/?utm_source=chatgpt.com">Microsoft + OpenAI</a>, <a href="https://www.nscale.com/press-releases/nscale-microsoft-2025">Nscale + Microsoft</a> and the *potential <a href="https://finance.yahoo.com/news/ai-boom-stargate-require-64-194135408.html">Stargate Project</a>.</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RbFq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fe9fa7-27e2-48dc-80f9-1876e2536630.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RbFq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fe9fa7-27e2-48dc-80f9-1876e2536630.heic 424w, https://substackcdn.com/image/fetch/$s_!RbFq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fe9fa7-27e2-48dc-80f9-1876e2536630.heic 848w, https://substackcdn.com/image/fetch/$s_!RbFq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fe9fa7-27e2-48dc-80f9-1876e2536630.heic 1272w, https://substackcdn.com/image/fetch/$s_!RbFq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fe9fa7-27e2-48dc-80f9-1876e2536630.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RbFq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fe9fa7-27e2-48dc-80f9-1876e2536630.heic" width="1456" height="1941" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/19fe9fa7-27e2-48dc-80f9-1876e2536630.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1941,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3026451,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/181503991?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fe9fa7-27e2-48dc-80f9-1876e2536630.heic&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!RbFq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fe9fa7-27e2-48dc-80f9-1876e2536630.heic 424w, https://substackcdn.com/image/fetch/$s_!RbFq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fe9fa7-27e2-48dc-80f9-1876e2536630.heic 848w, https://substackcdn.com/image/fetch/$s_!RbFq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fe9fa7-27e2-48dc-80f9-1876e2536630.heic 1272w, https://substackcdn.com/image/fetch/$s_!RbFq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19fe9fa7-27e2-48dc-80f9-1876e2536630.heic 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 2. DGX Spark is a small unit, 15x15x5 cm. It&#8217;s got a similar size to a Mac Mini, and in my case, it&#8217;s close to the same size as my CalDigit TS4 docking station.</figcaption></figure></div><p>In this article, I&#8217;ll take a hands-on look at the system, starting with the unboxing and hardware design, then moving through the software stack, intended audience, and a few benchmarks.</p><div><hr></div><h2>Starting with a few Notes</h2><p>Lately, many early comparisons have evaluated DGX Spark against multi-GPU workstation builds - configurations like 4&#215; RTX 4090, 2&#215; RTX 5090, RTX PRO 6000 Blackwell, or even Apple&#8217;s M-series Ultra systems - and concluded that Spark is &#8220;underperforming&#8221; based purely on raw throughput metrics.</p><p>These comparisons assume that DGX Spark is intended to compete as a high-end GPU replacement. It isn&#8217;t.</p><p>DGX Spark is positioned as a <strong>local, DGX-aligned AI development system</strong>, not a benchmark-driven workstation. Its goal is to provide a coherent hardware&#8211;software environment for building, testing, and validating AI systems locally, using the same architectural assumptions that apply in NVIDIA&#8217;s datacenter platforms.</p><p>Once that framing is clear, the tradeoffs behind common benchmark comparisons become easier to interpret.</p><h4>Apples vs Oranges Comparison</h4><p>A single RTX 4090 offers strong raw performance with 24GB of GDDR6X VRAM over PCIe 4.0 x16. Scaling to larger memory capacities requires multiple cards, 4x to reach 96GB, introducing fragmented memory pools, PCIe-based interconnects, and more power consumption.</p><p>The RTX 5090 has a better bandwidth and capacity (32GB GDDR7 over PCIe 5.0 x16), but you&#8217;d still require 4x5090 to get 128GB VRAM, and they&#8217;re not cheap either.</p><p>On the workstations, the RTX PRO 6000 Blackwell has 96GB of ECC GDDR7 with large memory bandwidth, but it&#8217;s an $8,000+ card.</p><p>Apple&#8217;s M-series Ultra has large unified memory pools and excellent power efficiency, but NVIDIA ecosystem.</p><p>The DGX Spark is not a simple GPU; <strong>it&#8217;s an AI development platform</strong>, and I think - a good sweet spot within all the configurations above. It replicates the NVIDIA DGX into a powerful desk-side mini PC, focusing on 4 important pillars:</p><ul><li><p><strong>The GB10 Blackwell Chip</strong> - with support for FP4 and NVFP4 (up to 1 PFLOP of FP4 performance), which aligns it directly with NVIDIA&#8217;s current and future AI compute roadmap.</p></li><li><p><strong>Large VRAM</strong>&nbsp;<strong>and Storage</strong>&nbsp;- Spark features 128GB LPDDR5x unified memory and supports&nbsp;up to 4TB SSD.</p></li><li><p><strong>Datacenter Networking</strong> - Spark ships with dual QSFP ports powered by a ConnectX-7 NIC, delivering 200 Gbps networking out of the box. The NIC alone is a ~$1,700&#8211;2,000 component, something you simply don&#8217;t get in standard workstations or consumer desktops.</p></li><li><p><strong>NVIDIA AI Software Stack</strong> - Spark runs DGX OS, preconfigured with NVIDIA&#8217;s full AI software stack, including core AI libraries such as CUDA, NCCL, cuDNN, TensorRT, and the rest.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Juv5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F491bb68b-4651-46bd-a23f-07ebb0cd50e9_1656x1402.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Juv5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F491bb68b-4651-46bd-a23f-07ebb0cd50e9_1656x1402.png 424w, https://substackcdn.com/image/fetch/$s_!Juv5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F491bb68b-4651-46bd-a23f-07ebb0cd50e9_1656x1402.png 848w, https://substackcdn.com/image/fetch/$s_!Juv5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F491bb68b-4651-46bd-a23f-07ebb0cd50e9_1656x1402.png 1272w, https://substackcdn.com/image/fetch/$s_!Juv5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F491bb68b-4651-46bd-a23f-07ebb0cd50e9_1656x1402.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Juv5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F491bb68b-4651-46bd-a23f-07ebb0cd50e9_1656x1402.png" width="1456" height="1233" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/491bb68b-4651-46bd-a23f-07ebb0cd50e9_1656x1402.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1233,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1304843,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/181503991?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F491bb68b-4651-46bd-a23f-07ebb0cd50e9_1656x1402.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Juv5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F491bb68b-4651-46bd-a23f-07ebb0cd50e9_1656x1402.png 424w, https://substackcdn.com/image/fetch/$s_!Juv5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F491bb68b-4651-46bd-a23f-07ebb0cd50e9_1656x1402.png 848w, https://substackcdn.com/image/fetch/$s_!Juv5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F491bb68b-4651-46bd-a23f-07ebb0cd50e9_1656x1402.png 1272w, https://substackcdn.com/image/fetch/$s_!Juv5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F491bb68b-4651-46bd-a23f-07ebb0cd50e9_1656x1402.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 3. How DGX Spark came to be, replicating a DGX-like AI development experience in a devkit. Size shrunk, power grew.</figcaption></figure></div><p>Judging DGX Spark purely on raw benchmark numbers misses its value proposition. It is not designed to replace multi-GPU workstations, nor to compete on inference performance alone. Instead, it provides a compact, coherent, and datacenter-aligned AI development environment that mirrors how models are ultimately trained, distributed, and deployed at scale within NVIDIA&#8217;s ecosystem.</p><p>When evaluated on those terms, the design tradeoffs of DGX Spark are deliberate and consistent with its intended role.</p><div><hr></div><h2>Hardware and Design</h2><p>The DGX Spark is a gorgeous piece of engineering. It&#8217;s got a full-metal chassis with a gold-like finish, has two metal foam front/back panels which are strikingly similar to the design of NVIDIA DGX A100 and H100.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7urH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aa5c3b9-eb95-413b-99be-45bca760ab1c_1280x685.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7urH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aa5c3b9-eb95-413b-99be-45bca760ab1c_1280x685.png 424w, https://substackcdn.com/image/fetch/$s_!7urH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aa5c3b9-eb95-413b-99be-45bca760ab1c_1280x685.png 848w, https://substackcdn.com/image/fetch/$s_!7urH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aa5c3b9-eb95-413b-99be-45bca760ab1c_1280x685.png 1272w, https://substackcdn.com/image/fetch/$s_!7urH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aa5c3b9-eb95-413b-99be-45bca760ab1c_1280x685.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7urH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aa5c3b9-eb95-413b-99be-45bca760ab1c_1280x685.png" width="1280" height="685" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9aa5c3b9-eb95-413b-99be-45bca760ab1c_1280x685.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:685,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1377354,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/181503991?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aa5c3b9-eb95-413b-99be-45bca760ab1c_1280x685.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!7urH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aa5c3b9-eb95-413b-99be-45bca760ab1c_1280x685.png 424w, https://substackcdn.com/image/fetch/$s_!7urH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aa5c3b9-eb95-413b-99be-45bca760ab1c_1280x685.png 848w, https://substackcdn.com/image/fetch/$s_!7urH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aa5c3b9-eb95-413b-99be-45bca760ab1c_1280x685.png 1272w, https://substackcdn.com/image/fetch/$s_!7urH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aa5c3b9-eb95-413b-99be-45bca760ab1c_1280x685.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 4. DGX Spark unboxing.</figcaption></figure></div><p>Physically, it&#8217;s a small and elegant unit, roughly the footprint of a Mac Mini. On the back panel, it&#8217;s got:</p><ul><li><p>4 x USB-C ports, with the leftmost one being the power delivery(up to 240W)</p></li><li><p>1 x HDMI 2.1a display connector port to plug in your monitor</p></li><li><p>1 x Ethernet <strong>10 GbE</strong> RJ-45 Ethernet port</p></li><li><p>2 x QSFP ports, driven by NVIDIA ConnectX-7 200GB/s NIC</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2qPb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ec4f62-45d8-4dce-89ba-88f651601646_666x328.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2qPb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ec4f62-45d8-4dce-89ba-88f651601646_666x328.png 424w, https://substackcdn.com/image/fetch/$s_!2qPb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ec4f62-45d8-4dce-89ba-88f651601646_666x328.png 848w, https://substackcdn.com/image/fetch/$s_!2qPb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ec4f62-45d8-4dce-89ba-88f651601646_666x328.png 1272w, https://substackcdn.com/image/fetch/$s_!2qPb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ec4f62-45d8-4dce-89ba-88f651601646_666x328.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2qPb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ec4f62-45d8-4dce-89ba-88f651601646_666x328.png" width="666" height="328" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/08ec4f62-45d8-4dce-89ba-88f651601646_666x328.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:328,&quot;width&quot;:666,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:28671,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/181503991?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ec4f62-45d8-4dce-89ba-88f651601646_666x328.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2qPb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ec4f62-45d8-4dce-89ba-88f651601646_666x328.png 424w, https://substackcdn.com/image/fetch/$s_!2qPb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ec4f62-45d8-4dce-89ba-88f651601646_666x328.png 848w, https://substackcdn.com/image/fetch/$s_!2qPb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ec4f62-45d8-4dce-89ba-88f651601646_666x328.png 1272w, https://substackcdn.com/image/fetch/$s_!2qPb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ec4f62-45d8-4dce-89ba-88f651601646_666x328.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 5. A view of DGX Spark connectivity layout, with all 4 x USB-C ports, HDMI, Ethernet, and ConnectX7 QSFP ports.</figcaption></figure></div><blockquote><p><strong>Note:</strong> QSFP (Quad Small Form-factor Pluggable) is a hot-pluggable optical or electrical interface used in high-speed networking equipment such as switches, routers, and servers.</p></blockquote><p>The QSFP ports are particularly interesting, as underneath they&#8217;re powered by a premium datacenter ConnectX-7 NIC (Network Interface Controller), allowing you to build a mini-DGX cluster locally with only 2 DGX Spark Units, and working with LLMs over 400B parameters. </p><p>The exact NIC model that Spark has comes in the 200GB/s via 2 QSFP ports, split into 100GB/s per port. The example shown in the following image is the 2x200GB/s at USD $2200, placing the Spark version of this NIC at around 60-70% of that price (~USD $1500).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0cjj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63183d07-4ac6-42d2-b578-bed65c571527_2406x940.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0cjj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63183d07-4ac6-42d2-b578-bed65c571527_2406x940.png 424w, https://substackcdn.com/image/fetch/$s_!0cjj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63183d07-4ac6-42d2-b578-bed65c571527_2406x940.png 848w, https://substackcdn.com/image/fetch/$s_!0cjj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63183d07-4ac6-42d2-b578-bed65c571527_2406x940.png 1272w, https://substackcdn.com/image/fetch/$s_!0cjj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63183d07-4ac6-42d2-b578-bed65c571527_2406x940.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0cjj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63183d07-4ac6-42d2-b578-bed65c571527_2406x940.png" width="1456" height="569" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/63183d07-4ac6-42d2-b578-bed65c571527_2406x940.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:569,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:645601,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/181503991?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63183d07-4ac6-42d2-b578-bed65c571527_2406x940.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!0cjj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63183d07-4ac6-42d2-b578-bed65c571527_2406x940.png 424w, https://substackcdn.com/image/fetch/$s_!0cjj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63183d07-4ac6-42d2-b578-bed65c571527_2406x940.png 848w, https://substackcdn.com/image/fetch/$s_!0cjj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63183d07-4ac6-42d2-b578-bed65c571527_2406x940.png 1272w, https://substackcdn.com/image/fetch/$s_!0cjj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63183d07-4ac6-42d2-b578-bed65c571527_2406x940.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 6. Price of a single <a href="https://www.fs.com/products/242589.html">Connect-X7 InfiniBand Controller 2x200GB</a>. This adapter is almost as big as the Spark, so NVIDIA shrunk it down to fit. </figcaption></figure></div><p>At the datacenter scale, networking is what enables efficient multi-GPU and multi-node parallelisation through NCCL. With ConnectX-7, multiple DGX Spark units can be directly connected or attached to a high-end switch, and as ConnectX-7 supports RDMA and GPUDirect RDMA, Spark can also move data directly from storage or edge systems into GPU memory with minimal CPU involvement, something traditional workstations simply aren&#8217;t designed to do. </p><p>For local and edge AI, this matters when working with large datasets, streaming data, or building systems that more closely resemble production AI infrastructure.</p><div><hr></div><h2>Hardware Specifications</h2><p>The DGX Spark is powered by the GB10 Grace Blackwell Superchip. It combines a Blackwell GPU with 5th-generation Tensor Cores and a <strong>20-core</strong> Grace Arm CPU (10&#215; high-performance Cortex-X925 + 10&#215; efficiency Cortex-A725 cores). Memory-wise, it&#8217;s got 128 GB LPDDR5X unified memory, split into 8 chips around the GB10 Grace GPU chip. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GfCt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51720e6b-351d-4f1e-8473-ea7b74cfa2c1_2024x1680.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GfCt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51720e6b-351d-4f1e-8473-ea7b74cfa2c1_2024x1680.png 424w, https://substackcdn.com/image/fetch/$s_!GfCt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51720e6b-351d-4f1e-8473-ea7b74cfa2c1_2024x1680.png 848w, https://substackcdn.com/image/fetch/$s_!GfCt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51720e6b-351d-4f1e-8473-ea7b74cfa2c1_2024x1680.png 1272w, https://substackcdn.com/image/fetch/$s_!GfCt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51720e6b-351d-4f1e-8473-ea7b74cfa2c1_2024x1680.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GfCt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51720e6b-351d-4f1e-8473-ea7b74cfa2c1_2024x1680.png" width="1456" height="1209" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/51720e6b-351d-4f1e-8473-ea7b74cfa2c1_2024x1680.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1209,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3673981,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/181503991?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51720e6b-351d-4f1e-8473-ea7b74cfa2c1_2024x1680.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GfCt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51720e6b-351d-4f1e-8473-ea7b74cfa2c1_2024x1680.png 424w, https://substackcdn.com/image/fetch/$s_!GfCt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51720e6b-351d-4f1e-8473-ea7b74cfa2c1_2024x1680.png 848w, https://substackcdn.com/image/fetch/$s_!GfCt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51720e6b-351d-4f1e-8473-ea7b74cfa2c1_2024x1680.png 1272w, https://substackcdn.com/image/fetch/$s_!GfCt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51720e6b-351d-4f1e-8473-ea7b74cfa2c1_2024x1680.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 7. A view of the Spark&#8217;s internal board, showcasing the GB10, 128GB (8x16) Unified Memory Slots, ConnectX7, and the other connectivity ports. Source <a href="https://www.storagereview.com/review/nvidia-dgx-spark-review-the-ai-appliance-bringing-datacenter-capabilities-to-desktops">StorageReview</a></figcaption></figure></div><p>The CPU and GPU are connected through NVLinkTM-C2C, a Chip-to-Chip<strong> </strong>interconnect, not via PCIe slots, cables, or external connectors, and that&#8217;s faster and more energy efficient. </p><blockquote><p><strong>Note:</strong> Although PCIe 5.0 x16 is limited to ~64 GB/s for CPU-GPU transfers, DGX Spark&#8217;s unified memory architecture provides ~273 GB/s of shared memory bandwidth accessible by both CPU and GPU.</p></blockquote><p>Both the CPU and GPU chips in GB10 share a coherent <strong>unified memory</strong> address space and behave like a single processor, yielding much lower latency and much higher bandwidth than PCIe. Through PCIe, the data has to flow H2C (host to chip) and C2H (chip to host) between your CPU memory space (RAM) and GPU memory space (VRAM) in a machine that has a discrete GPU, plugged into a PCIe slot on the motherboard.</p><div><hr></div><h3>Memory Bandwidth</h3><p>To understand why memory bandwidth matters for DGX Spark, it helps to contrast it with a traditional discrete GPU setup.</p><p>In a conventional system, let&#8217;s say as an RTX 5090 installed in a PCIe 5.0 x16 slot - the GPU is a discrete card, separate from the CPU and system memory. Communication between the CPU and GPU is happening over PCIe 5.0, which provides roughly 64 GB/s of usable bandwidth per direction. All data movement between host memory (RAM) and device memory (VRAM) must be explicitly orchestrated by software and is not hardware-coherent.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AV08!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9a6c32-54da-4b93-9d63-c6f52cb2fc08_2862x1696.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AV08!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9a6c32-54da-4b93-9d63-c6f52cb2fc08_2862x1696.png 424w, https://substackcdn.com/image/fetch/$s_!AV08!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9a6c32-54da-4b93-9d63-c6f52cb2fc08_2862x1696.png 848w, https://substackcdn.com/image/fetch/$s_!AV08!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9a6c32-54da-4b93-9d63-c6f52cb2fc08_2862x1696.png 1272w, https://substackcdn.com/image/fetch/$s_!AV08!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9a6c32-54da-4b93-9d63-c6f52cb2fc08_2862x1696.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AV08!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9a6c32-54da-4b93-9d63-c6f52cb2fc08_2862x1696.png" width="1456" height="863" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bb9a6c32-54da-4b93-9d63-c6f52cb2fc08_2862x1696.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:863,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:4455280,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/181503991?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9a6c32-54da-4b93-9d63-c6f52cb2fc08_2862x1696.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!AV08!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9a6c32-54da-4b93-9d63-c6f52cb2fc08_2862x1696.png 424w, https://substackcdn.com/image/fetch/$s_!AV08!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9a6c32-54da-4b93-9d63-c6f52cb2fc08_2862x1696.png 848w, https://substackcdn.com/image/fetch/$s_!AV08!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9a6c32-54da-4b93-9d63-c6f52cb2fc08_2862x1696.png 1272w, https://substackcdn.com/image/fetch/$s_!AV08!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb9a6c32-54da-4b93-9d63-c6f52cb2fc08_2862x1696.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 8. A standard PCIe 5.0 x16 Interface slot is present in most PC motherboards. On the right, it&#8217;s an RTX5090 PCIe x16, and the GPU is connected through the motherboard slot. Sources: Wikipedia, TechPowerUP</figcaption></figure></div><blockquote><p><strong>Note: </strong>In PyTorch, when you call something like <code>tensor.to(&#8221;cuda:0&#8221;)</code>, you&#8217;re explicitly triggering a device transfer. This operation copies the tensor&#8217;s data from CPU system memory<strong> (RAM)</strong> into GPU device memory<strong> (VRAM)</strong> so the GPU can access and process it.</p><p>If you look deeper into PyTorch&#8217;s C++ backend, you&#8217;ll find operations commonly referred to as <strong>HtoD (host-to-device)</strong> and <strong>DtoH (device-to-host)</strong>. Through the cudaMemcpyAsync primitive, these allocate memory in the appropriate CPU or GPU address space and then perform explicit memory copies between them via  PCIe.</p></blockquote><p>DGX Spark takes a different approach. Instead of discrete CPU and GPU memory pools connected by PCIe, it uses a single, hardware-coherent unified memory system shared by both the CPU and GPU. This doesn&#8217;t need explicit HtoD and DtoH copies and allows both processors to directly access the same memory address space.</p><p>However, this design comes with a tradeoff. The unified memory pool delivers approximately ~273 GB/s of bandwidth, being a LPDDR5X system memory. This is still higher than what PCIe 5.0 provides per BUS, but is lower than the bandwidth of GPU-local memory such as GDDR7, GDDR6, or HBM. </p><blockquote><p>For instance, RTX5090 has GDDR7 at ~1.5TB/s memory bandwidth of VRAM.<br>The DGX Spark has LPDDR5X at 273GB/s bandwidth on the unified memory.</p><p><strong>But, to consider</strong> : Spark is smaller, has really good compute capabilities, and consumes way less power than a dedicated GPU.</p></blockquote><p>As a result, DGX Spark favors memory coherence and large memory size (i.e., 128GB) over raw memory throughput, which can limit performance for workloads that are heavily bandwidth-bound on the GPU.</p><p>Although the lower memory bandwidth of 273 GB/s, the Spark still yields decent inference performance for large MoE models, Image Generation Models, and some dense models, and good GPU performance for workloads that are GPU-bound, such as prompt-prefill, or model training and finetuning.</p><p>This makes Spark really <strong>well-suited</strong> for handling larger models and latency-tolerant workloads, but a <strong>slightly poorer fit</strong> for large GPU workloads that are fundamentally bandwidth-bound.</p><div><hr></div><h3>The GB10 Chip</h3><p><strong>The GB10</strong> is a multi-die single-chip solution for high-performance Arm-based workstations. With a GPU die based on the Blackwell architecture and a CPU die built by MediaTek with 20 Arm CPU cores. Both dies are built on TSMC&#8217;s 3nm process. </p><blockquote><p><strong>Note:</strong> A CPU/GPU die is the actual, tiny piece of silicon (semiconductor) where all the transistors, cores, and processing logic for a CPU or GPU are fabricated and etched.</p></blockquote><p>The Apple M4 Max, for example, has up to a 16-core CPU, a mix of up to 12 high-performance cores and 4 efficiency cores. Spark comes with 20 (10 performance, 10 efficiency).</p><p>The integrated GPU delivers up to <strong>1 petaFLOP AI compute (FP4 sparse), </strong>and supports the optimised NVFP4 precision, a data type which only Blackwell supports.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bx5x!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd92d459e-41b9-4c48-886d-0c25dbb06fe1_2378x1642.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bx5x!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd92d459e-41b9-4c48-886d-0c25dbb06fe1_2378x1642.png 424w, https://substackcdn.com/image/fetch/$s_!bx5x!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd92d459e-41b9-4c48-886d-0c25dbb06fe1_2378x1642.png 848w, https://substackcdn.com/image/fetch/$s_!bx5x!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd92d459e-41b9-4c48-886d-0c25dbb06fe1_2378x1642.png 1272w, https://substackcdn.com/image/fetch/$s_!bx5x!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd92d459e-41b9-4c48-886d-0c25dbb06fe1_2378x1642.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bx5x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd92d459e-41b9-4c48-886d-0c25dbb06fe1_2378x1642.png" width="1456" height="1005" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d92d459e-41b9-4c48-886d-0c25dbb06fe1_2378x1642.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1005,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1004264,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/181503991?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd92d459e-41b9-4c48-886d-0c25dbb06fe1_2378x1642.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bx5x!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd92d459e-41b9-4c48-886d-0c25dbb06fe1_2378x1642.png 424w, https://substackcdn.com/image/fetch/$s_!bx5x!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd92d459e-41b9-4c48-886d-0c25dbb06fe1_2378x1642.png 848w, https://substackcdn.com/image/fetch/$s_!bx5x!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd92d459e-41b9-4c48-886d-0c25dbb06fe1_2378x1642.png 1272w, https://substackcdn.com/image/fetch/$s_!bx5x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd92d459e-41b9-4c48-886d-0c25dbb06fe1_2378x1642.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 9. An annotated view of the GB10 Chip layout, the S-die and G-die of the chip, and the unified memory slots. Source <a href="https://www.servethehome.com/nvidia-dgx-spark-review-the-gb10-machine-is-so-freaking-cool/2/">ServeTheHome</a></figcaption></figure></div><h3>Networking and Scalability</h3><p>One major aspect that&#8217;s often overlooked in these comparisons is the networking interface built into DGX Spark. Spark includes NVIDIA ConnectX-7, a high-performance SmartNIC designed for <strong>datacenter AI and HPC workloads</strong>, not something you typically find in workstation or desktop systems.</p><p>The <strong>QSFP ports</strong> on DGX Spark support <a href="https://www.google.com/search?q=InfiniBand&amp;oq=connectX-7+&amp;gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIICAEQRRgnGDsyCAgCEEUYJxg7MgwIAxAAGBQYhwIYgAQyBggEEEUYQTIGCAUQRRg9MgYIBhBFGDwyBggHEEUYPNIBCDIzMzdqMGo5qAIGsAIB8QXd33W62LgMRw&amp;sourceid=chrome&amp;ie=UTF-8&amp;mstk=AUtExfBdqb7FckwlCsspLj4pw0v-ffa47ibGtO9vw9X9QZpY1czG36-XeQQVvgs-1jRiexlzGh0oSjegAkSfqx82hI_ttG6flDqhEFor3k8TGVFGWV_ropvuWR5OF3Yninp8huS3pEEbwzO0B2SBpGzGKPkygKV1yhVfnQh_awDBHkKJSSMzmE-oVmq6sLmnhk1tLhkQV3MjFKWDq10tV5P-zcUJ4sAVVcyk1Cq9q0YKBjiON3nv4pXg3YXNbEisc3NaDTjh6iJpQknQLqGBlPupX7Ng&amp;csui=3&amp;ved=2ahUKEwinrfHomruRAxXu3gIHHUfJJkcQgK4QegQIARAE">InfiniBand</a>, for hardware-accelerated capabilities such as:</p><ul><li><p><a href="https://www.google.com/search?q=RDMA&amp;oq=connectX-7+&amp;gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIICAEQRRgnGDsyCAgCEEUYJxg7MgwIAxAAGBQYhwIYgAQyBggEEEUYQTIGCAUQRRg9MgYIBhBFGDwyBggHEEUYPNIBCDIzMzdqMGo5qAIGsAIB8QXd33W62LgMRw&amp;sourceid=chrome&amp;ie=UTF-8&amp;mstk=AUtExfBdqb7FckwlCsspLj4pw0v-ffa47ibGtO9vw9X9QZpY1czG36-XeQQVvgs-1jRiexlzGh0oSjegAkSfqx82hI_ttG6flDqhEFor3k8TGVFGWV_ropvuWR5OF3Yninp8huS3pEEbwzO0B2SBpGzGKPkygKV1yhVfnQh_awDBHkKJSSMzmE-oVmq6sLmnhk1tLhkQV3MjFKWDq10tV5P-zcUJ4sAVVcyk1Cq9q0YKBjiON3nv4pXg3YXNbEisc3NaDTjh6iJpQknQLqGBlPupX7Ng&amp;csui=3&amp;ved=2ahUKEwinrfHomruRAxXu3gIHHUfJJkcQgK4QegQIARAH">RDMA and GPUDirect RDMA</a> for low-latency, high-throughput GPU-to-GPU and GPU-to-storage transfers, with minimal CPU involvement.</p></li><li><p><a href="https://www.google.com/search?q=RDMA&amp;oq=connectX-7+&amp;gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIICAEQRRgnGDsyCAgCEEUYJxg7MgwIAxAAGBQYhwIYgAQyBggEEEUYQTIGCAUQRRg9MgYIBhBFGDwyBggHEEUYPNIBCDIzMzdqMGo5qAIGsAIB8QXd33W62LgMRw&amp;sourceid=chrome&amp;ie=UTF-8&amp;mstk=AUtExfBdqb7FckwlCsspLj4pw0v-ffa47ibGtO9vw9X9QZpY1czG36-XeQQVvgs-1jRiexlzGh0oSjegAkSfqx82hI_ttG6flDqhEFor3k8TGVFGWV_ropvuWR5OF3Yninp8huS3pEEbwzO0B2SBpGzGKPkygKV1yhVfnQh_awDBHkKJSSMzmE-oVmq6sLmnhk1tLhkQV3MjFKWDq10tV5P-zcUJ4sAVVcyk1Cq9q0YKBjiON3nv4pXg3YXNbEisc3NaDTjh6iJpQknQLqGBlPupX7Ng&amp;csui=3&amp;ved=2ahUKEwinrfHomruRAxXu3gIHHUfJJkcQgK4QegQIARAH">RDMA</a> <strong>over Converged Ethernet (RoCE)</strong> for efficient multi-node communication across Ethernet-based environments.</p></li></ul><p>This capability matters when you start thinking beyond single-node workloads.</p><p>For example, consider scaling LLM inference using disaggregated serving (e.g., NVIDIA Dynamo with SGLang) across multiple nodes. In this model, tokens are exchanged between multiple GPU workers selected dynamically based on their load. The system can scale workers up or down and parallelise <strong>prefill</strong> and <strong>generation</strong> phases independently, workflows that are highly sensitive to latency and interconnect performance.</p><p>With DGX Spark, this entire setup can be <strong>prototyped locally</strong>. With 2 x Sparks, one can effectively emulate a small AI cluster with 256GB of unified memory, allowing developers to validate distributed inference and system behaviour before deploying the same architecture to DGX Cloud or a larger datacenter environment.</p><p>Now, to round up the specs, the DGX Spark also comes with a fast 4 TB NVMe SSD (i.e., NVIDIA&#8217;s Founders Edition) for storage and runs a tuned Linux-based DGX OS that preloads with NVIDIA&#8217;s AI software stack for AI development from the first boot.</p><div><hr></div><h2>Rounding up the Specs</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BuPD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a80e40d-d99c-4957-9c74-015c1197e640_1674x2178.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BuPD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a80e40d-d99c-4957-9c74-015c1197e640_1674x2178.png 424w, https://substackcdn.com/image/fetch/$s_!BuPD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a80e40d-d99c-4957-9c74-015c1197e640_1674x2178.png 848w, https://substackcdn.com/image/fetch/$s_!BuPD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a80e40d-d99c-4957-9c74-015c1197e640_1674x2178.png 1272w, https://substackcdn.com/image/fetch/$s_!BuPD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a80e40d-d99c-4957-9c74-015c1197e640_1674x2178.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BuPD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a80e40d-d99c-4957-9c74-015c1197e640_1674x2178.png" width="1456" height="1894" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8a80e40d-d99c-4957-9c74-015c1197e640_1674x2178.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1894,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:266132,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/181503991?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a80e40d-d99c-4957-9c74-015c1197e640_1674x2178.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BuPD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a80e40d-d99c-4957-9c74-015c1197e640_1674x2178.png 424w, https://substackcdn.com/image/fetch/$s_!BuPD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a80e40d-d99c-4957-9c74-015c1197e640_1674x2178.png 848w, https://substackcdn.com/image/fetch/$s_!BuPD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a80e40d-d99c-4957-9c74-015c1197e640_1674x2178.png 1272w, https://substackcdn.com/image/fetch/$s_!BuPD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a80e40d-d99c-4957-9c74-015c1197e640_1674x2178.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 10. A complete overview of the DGX Spark specifications. Source <a href="https://www.nvidia.com/en-us/products/workstations/dgx-spark/">NVIDIA</a></figcaption></figure></div><div><hr></div><h2>Software and Developer Experience</h2><p>I also find one of the biggest advantages of the DGX Spark to be the software ecosystem and experience it offers to AI Developers. The Spark comes  preconfigured with the full NVIDIA AI software stack through the DGX OS, so you have all the drivers, libraries, and frameworks ready to go. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5Wqs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa491a7a5-2e9d-4d1e-aa78-2e54857971fe_1136x778.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5Wqs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa491a7a5-2e9d-4d1e-aa78-2e54857971fe_1136x778.png 424w, https://substackcdn.com/image/fetch/$s_!5Wqs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa491a7a5-2e9d-4d1e-aa78-2e54857971fe_1136x778.png 848w, https://substackcdn.com/image/fetch/$s_!5Wqs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa491a7a5-2e9d-4d1e-aa78-2e54857971fe_1136x778.png 1272w, https://substackcdn.com/image/fetch/$s_!5Wqs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa491a7a5-2e9d-4d1e-aa78-2e54857971fe_1136x778.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5Wqs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa491a7a5-2e9d-4d1e-aa78-2e54857971fe_1136x778.png" width="1136" height="778" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a491a7a5-2e9d-4d1e-aa78-2e54857971fe_1136x778.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:778,&quot;width&quot;:1136,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:305741,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/181503991?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa491a7a5-2e9d-4d1e-aa78-2e54857971fe_1136x778.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5Wqs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa491a7a5-2e9d-4d1e-aa78-2e54857971fe_1136x778.png 424w, https://substackcdn.com/image/fetch/$s_!5Wqs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa491a7a5-2e9d-4d1e-aa78-2e54857971fe_1136x778.png 848w, https://substackcdn.com/image/fetch/$s_!5Wqs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa491a7a5-2e9d-4d1e-aa78-2e54857971fe_1136x778.png 1272w, https://substackcdn.com/image/fetch/$s_!5Wqs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa491a7a5-2e9d-4d1e-aa78-2e54857971fe_1136x778.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 11. The DGX OS is prebuilt with all the required NVIDIA libraries and frameworks for AI Development. Third-party add-ons are simple plug-and-play.</figcaption></figure></div><p>This means the correct GPU drivers, CUDA toolkit, cuDNN, NCCL, TensorRT, Triton Inference Server, and key system-level optimizations are already installed and versioned as a single OS bundle. For AI developers, this removes a somewhat large amount of setup friction.</p><p>Popular tooling, such as PyTorch, JAX, Hugging Face, Llama.cpp, Ollama, LMStudio, and ComfyUI can be installed and run with minimal configuration. For developers working with LLMs, multimodal models, or image generation pipelines, this helps reduce the time-to-first-experiment.</p><p>This experience is notably different from other NVIDIA Edge AI devkits such as <strong>Jetson Nano, Orin, or AGX Thor</strong>, which rely on JetPack OS. While JetPack is well-suited for embedded and edge deployments, it is more constrained, more tightly coupled to specific hardware configurations.</p><p>On top of the base platform, NVIDIA also provides a library of <strong>DGX Playbooks</strong>. These cover a broad range of real-world use cases, including multi-agent systems, multimodal pipelines, LLM fine-tuning, full pre-training workflows, image generation, model quantization, and production model serving. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2jTP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50c2ccd8-39c9-4e62-ba50-25bd28472333_3196x2354.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2jTP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50c2ccd8-39c9-4e62-ba50-25bd28472333_3196x2354.png 424w, https://substackcdn.com/image/fetch/$s_!2jTP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50c2ccd8-39c9-4e62-ba50-25bd28472333_3196x2354.png 848w, https://substackcdn.com/image/fetch/$s_!2jTP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50c2ccd8-39c9-4e62-ba50-25bd28472333_3196x2354.png 1272w, https://substackcdn.com/image/fetch/$s_!2jTP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50c2ccd8-39c9-4e62-ba50-25bd28472333_3196x2354.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2jTP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50c2ccd8-39c9-4e62-ba50-25bd28472333_3196x2354.png" width="1456" height="1072" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/50c2ccd8-39c9-4e62-ba50-25bd28472333_3196x2354.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1072,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:759769,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/181503991?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50c2ccd8-39c9-4e62-ba50-25bd28472333_3196x2354.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2jTP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50c2ccd8-39c9-4e62-ba50-25bd28472333_3196x2354.png 424w, https://substackcdn.com/image/fetch/$s_!2jTP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50c2ccd8-39c9-4e62-ba50-25bd28472333_3196x2354.png 848w, https://substackcdn.com/image/fetch/$s_!2jTP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50c2ccd8-39c9-4e62-ba50-25bd28472333_3196x2354.png 1272w, https://substackcdn.com/image/fetch/$s_!2jTP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50c2ccd8-39c9-4e62-ba50-25bd28472333_3196x2354.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 12. The DGX Spark Playbooks collection, where you can test/benchmark your Spark unit on different applications and workloads.</figcaption></figure></div><div><hr></div><h2>The Benchmarks</h2><p>Below, I&#8217;ll present a set of DGX Spark inference benchmarks to illustrate Spark&#8217;s performance. While Spark delivers lower token decoding throughput than high-end discrete GPUs, it achieves strong prompt prefill performance thanks to the GB10 Blackwell chip and maintains decoding speeds that are practical for interactive use for most models.</p><blockquote><p><em><strong>Note:</strong></em> From a UX perspective, sustained generation speeds in the 60&#8211;70 tokens/sec range at a single session, already feel responsive. Once requests are batched, tokens/sec increase to 100 and even 200 tokens.sec.</p></blockquote><p>Although I mentioned above that Spark is not really an inference box, I&#8217;m still attaching these benchmarks to outline the decent and even good performance the DGX Spark has in most use cases tested, especially in MoEs.</p><ol><li><p><strong><a href="https://docs.google.com/spreadsheets/d/1SF1u0J2vJ-ou-R_Ry1JZQ0iscOZL8UKHpdVFr85tNLU/edit?gid=0#gid=0">DGX Spark inference on LLMs ranging from Llama 3.1 8B to GPT-OSS 120B</a></strong><br>The Spark is super fast at Prefill, which is the compute-bound phase of LLM Inference, thanks to the GB10 Superchip. But although slower at the decoding phase, which is memory-bound due to the 273GB/s that Spark has, it still yields good TPS (60 tok/s for GPT-OSS 20B, and 41 tok/s for the 120B variant).<br><br><em>* Plus, in these benchmarks, none of the models are quantised to NVFP4, which only Blackwell supports. Most models are in INT4, so performance is still left off the table in these cases.</em></p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lFlg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8785921d-5ea8-4ba5-9b18-ea1d4b836bc9_1854x596.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lFlg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8785921d-5ea8-4ba5-9b18-ea1d4b836bc9_1854x596.png 424w, https://substackcdn.com/image/fetch/$s_!lFlg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8785921d-5ea8-4ba5-9b18-ea1d4b836bc9_1854x596.png 848w, https://substackcdn.com/image/fetch/$s_!lFlg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8785921d-5ea8-4ba5-9b18-ea1d4b836bc9_1854x596.png 1272w, https://substackcdn.com/image/fetch/$s_!lFlg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8785921d-5ea8-4ba5-9b18-ea1d4b836bc9_1854x596.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lFlg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8785921d-5ea8-4ba5-9b18-ea1d4b836bc9_1854x596.png" width="1456" height="468" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8785921d-5ea8-4ba5-9b18-ea1d4b836bc9_1854x596.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:468,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:257693,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/181503991?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8785921d-5ea8-4ba5-9b18-ea1d4b836bc9_1854x596.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lFlg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8785921d-5ea8-4ba5-9b18-ea1d4b836bc9_1854x596.png 424w, https://substackcdn.com/image/fetch/$s_!lFlg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8785921d-5ea8-4ba5-9b18-ea1d4b836bc9_1854x596.png 848w, https://substackcdn.com/image/fetch/$s_!lFlg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8785921d-5ea8-4ba5-9b18-ea1d4b836bc9_1854x596.png 1272w, https://substackcdn.com/image/fetch/$s_!lFlg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8785921d-5ea8-4ba5-9b18-ea1d4b836bc9_1854x596.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 13. DGX Spark benchmarks using Ollama runner, across multiple models, dense and MoE GGUF variants.</figcaption></figure></div><ol start="2"><li><p><strong><a href="https://docs.google.com/spreadsheets/d/1SF1u0J2vJ-ou-R_Ry1JZQ0iscOZL8UKHpdVFr85tNLU/edit?gid=0#gid=0">Mac Studio M1 Max and Mini M4 Pro on Llama 3.1 8B to GPT-OSS 120B</a><br></strong>The Mac Studio M1 Max and Mini M4 Pro don&#8217;t fit larger models and don&#8217;t support the CUDA ecosystem. Results on supported models might be similar in the decoding phase, but DGX Spark outperforms in the Prefill <strong>compute-bound phase by a lot in most cases.</strong></p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3MZh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F850c2191-de7d-4cda-b67f-419c0da01ba3_1852x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3MZh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F850c2191-de7d-4cda-b67f-419c0da01ba3_1852x768.png 424w, https://substackcdn.com/image/fetch/$s_!3MZh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F850c2191-de7d-4cda-b67f-419c0da01ba3_1852x768.png 848w, https://substackcdn.com/image/fetch/$s_!3MZh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F850c2191-de7d-4cda-b67f-419c0da01ba3_1852x768.png 1272w, https://substackcdn.com/image/fetch/$s_!3MZh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F850c2191-de7d-4cda-b67f-419c0da01ba3_1852x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3MZh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F850c2191-de7d-4cda-b67f-419c0da01ba3_1852x768.png" width="1456" height="604" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/850c2191-de7d-4cda-b67f-419c0da01ba3_1852x768.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:604,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:316717,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/181503991?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F850c2191-de7d-4cda-b67f-419c0da01ba3_1852x768.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3MZh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F850c2191-de7d-4cda-b67f-419c0da01ba3_1852x768.png 424w, https://substackcdn.com/image/fetch/$s_!3MZh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F850c2191-de7d-4cda-b67f-419c0da01ba3_1852x768.png 848w, https://substackcdn.com/image/fetch/$s_!3MZh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F850c2191-de7d-4cda-b67f-419c0da01ba3_1852x768.png 1272w, https://substackcdn.com/image/fetch/$s_!3MZh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F850c2191-de7d-4cda-b67f-419c0da01ba3_1852x768.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 14. The same model benchmarks on Mac Studio and Mac Mini M4 Pro.</figcaption></figure></div><ol start="3"><li><p><strong><a href="https://docs.google.com/spreadsheets/d/1SF1u0J2vJ-ou-R_Ry1JZQ0iscOZL8UKHpdVFr85tNLU/edit?gid=0#gid=0">DGX Spark Inference compared to RTX5080 and 5090</a></strong></p><p>The 5080/5090 come with 16GB/32GB of VRAM, which is 8/4 times lower than Spark&#8217;s 128GB of unified memory. Spark still yields good results on the prefill phase, 23.169 Tokens vs 30.982 Tokens on RTX5090 and 28.927 on RTX5080, while numbers for the generation speed are capped by the memory bandwidth, making the TG speeds on the Spark 2/3 times lower than RTX5080/5090 variants.</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KcMl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d7e0fc1-dc5b-458d-a5d8-56ae3b6cd04c_1850x720.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KcMl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d7e0fc1-dc5b-458d-a5d8-56ae3b6cd04c_1850x720.png 424w, https://substackcdn.com/image/fetch/$s_!KcMl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d7e0fc1-dc5b-458d-a5d8-56ae3b6cd04c_1850x720.png 848w, https://substackcdn.com/image/fetch/$s_!KcMl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d7e0fc1-dc5b-458d-a5d8-56ae3b6cd04c_1850x720.png 1272w, https://substackcdn.com/image/fetch/$s_!KcMl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d7e0fc1-dc5b-458d-a5d8-56ae3b6cd04c_1850x720.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KcMl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d7e0fc1-dc5b-458d-a5d8-56ae3b6cd04c_1850x720.png" width="1456" height="567" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5d7e0fc1-dc5b-458d-a5d8-56ae3b6cd04c_1850x720.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:567,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:323253,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/181503991?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d7e0fc1-dc5b-458d-a5d8-56ae3b6cd04c_1850x720.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KcMl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d7e0fc1-dc5b-458d-a5d8-56ae3b6cd04c_1850x720.png 424w, https://substackcdn.com/image/fetch/$s_!KcMl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d7e0fc1-dc5b-458d-a5d8-56ae3b6cd04c_1850x720.png 848w, https://substackcdn.com/image/fetch/$s_!KcMl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d7e0fc1-dc5b-458d-a5d8-56ae3b6cd04c_1850x720.png 1272w, https://substackcdn.com/image/fetch/$s_!KcMl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d7e0fc1-dc5b-458d-a5d8-56ae3b6cd04c_1850x720.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 15. Same subset of models benchmarked on the Spark, RTX5080, and 5090.</figcaption></figure></div><ol start="4"><li><p><strong>DGX Spark vs NVIDIA Jetson AGX Thor (VIDEO)</strong></p><ol><li><p>More verbose benchmarks on <a href="https://github.com/ggml-org/llama.cpp/discussions/16578#discussioncomment-14912328">DGX Spark vs AGX Thor</a> using llama.cpp</p></li></ol></li></ol><div id="youtube2-PhJnZnQuuT0" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;PhJnZnQuuT0&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/PhJnZnQuuT0?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><ol start="5"><li><p><strong><a href="https://github.com/ggml-org/llama.cpp/discussions/16578#discussioncomment-14966561">DGX Spark running Minimax-M2-230B</a><br></strong>* <em>Given this is a 230B model, 10-30 tok/s generation speeds are still pretty decent.</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!D0fn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F184b1150-87b5-49ea-bd45-9d5ebaf81f20_1684x1194.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!D0fn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F184b1150-87b5-49ea-bd45-9d5ebaf81f20_1684x1194.png 424w, https://substackcdn.com/image/fetch/$s_!D0fn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F184b1150-87b5-49ea-bd45-9d5ebaf81f20_1684x1194.png 848w, https://substackcdn.com/image/fetch/$s_!D0fn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F184b1150-87b5-49ea-bd45-9d5ebaf81f20_1684x1194.png 1272w, https://substackcdn.com/image/fetch/$s_!D0fn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F184b1150-87b5-49ea-bd45-9d5ebaf81f20_1684x1194.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!D0fn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F184b1150-87b5-49ea-bd45-9d5ebaf81f20_1684x1194.png" width="1456" height="1032" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/184b1150-87b5-49ea-bd45-9d5ebaf81f20_1684x1194.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1032,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:339324,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/181503991?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F184b1150-87b5-49ea-bd45-9d5ebaf81f20_1684x1194.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!D0fn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F184b1150-87b5-49ea-bd45-9d5ebaf81f20_1684x1194.png 424w, https://substackcdn.com/image/fetch/$s_!D0fn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F184b1150-87b5-49ea-bd45-9d5ebaf81f20_1684x1194.png 848w, https://substackcdn.com/image/fetch/$s_!D0fn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F184b1150-87b5-49ea-bd45-9d5ebaf81f20_1684x1194.png 1272w, https://substackcdn.com/image/fetch/$s_!D0fn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F184b1150-87b5-49ea-bd45-9d5ebaf81f20_1684x1194.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Source: llama.cpp</figcaption></figure></div></li><li><p><strong><a href="https://github.com/ggml-org/llama.cpp/blob/master/benches/dgx-spark/dgx-spark.md">Extensive Benchmarking of DGX Spark on llama.cpp</a></strong></p><p>* The link above leads to a llama.cpp thread where the community is benchmarking the DGX Spark on a variety of use cases. Models include GPT-OSS-20B, Gemma3-27B, GLM4.5, etc.</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RmkE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75e3adc6-93f1-4752-af38-d23a7a1378e4_1916x1816.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RmkE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75e3adc6-93f1-4752-af38-d23a7a1378e4_1916x1816.png 424w, https://substackcdn.com/image/fetch/$s_!RmkE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75e3adc6-93f1-4752-af38-d23a7a1378e4_1916x1816.png 848w, https://substackcdn.com/image/fetch/$s_!RmkE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75e3adc6-93f1-4752-af38-d23a7a1378e4_1916x1816.png 1272w, https://substackcdn.com/image/fetch/$s_!RmkE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75e3adc6-93f1-4752-af38-d23a7a1378e4_1916x1816.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RmkE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75e3adc6-93f1-4752-af38-d23a7a1378e4_1916x1816.png" width="1456" height="1380" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/75e3adc6-93f1-4752-af38-d23a7a1378e4_1916x1816.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1380,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:511223,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/181503991?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75e3adc6-93f1-4752-af38-d23a7a1378e4_1916x1816.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!RmkE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75e3adc6-93f1-4752-af38-d23a7a1378e4_1916x1816.png 424w, https://substackcdn.com/image/fetch/$s_!RmkE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75e3adc6-93f1-4752-af38-d23a7a1378e4_1916x1816.png 848w, https://substackcdn.com/image/fetch/$s_!RmkE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75e3adc6-93f1-4752-af38-d23a7a1378e4_1916x1816.png 1272w, https://substackcdn.com/image/fetch/$s_!RmkE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75e3adc6-93f1-4752-af38-d23a7a1378e4_1916x1816.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h2>My Own Benchmarks</h2><p>To ground my testing in realistic developer workloads, I benchmarked DGX Spark inference across four models that span small multimodal to long-context MoE models.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/subscribe?"><span>Subscribe now</span></a></p><p>All tests were conducted using llama.cpp build 7474<strong> (commit f9ec8858e)</strong>, compiled with <code>-DGGUF_CUDA=ON</code>. I used both <strong>llama-bench</strong> and <strong>llama-batched-bench</strong> to measure performance under sequential and batched inference workloads.</p><p>The models I&#8217;ve tested:</p><ul><li><p>Small multimodal (&#8804;5B): <strong><a href="https://huggingface.co/google/gemma-3-4b-it">Gemma 3 4B</a></strong></p></li><li><p>Mid MoE (10&#8211;30B): <strong><a href="https://mistral.ai/news/mistral-3">Ministral-3-14B-Instruct</a></strong></p></li><li><p>Large MoE (100B+): <strong><a href="https://huggingface.co/openai/gpt-oss-120b">GPT-OSS-120B</a></strong></p></li><li><p>Transformer Hybrid + MoE: <strong><a href="https://huggingface.co/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16">Nemotron-Nano-3-30B-A3B</a></strong></p></li></ul><p><strong>Setup Details:</strong></p><p>The llama.cpp batching parameters I&#8217;ve used:</p><ul><li><p><strong>`-fa 1` </strong>-  Enabling the FlashAttention plugin</p></li><li><p> <strong>`-ub 2048`</strong>- The prompt tokens batch size.</p></li><li><p> <strong>`-npp 4096,8192`</strong> - The npp stands for NumberPromptPrefil, and the benchmark will use 4096 tok context window, then 8192 tok context window.</p></li><li><p><strong>`ntg 32`</strong> - This describes how many tokens to generate before measuring TokenGeneration time. </p></li><li><p><strong>`-npl 1,2,4,8`</strong> - Concurrency/Parallel requests</p></li><li><p><strong>`--no-mmap`</strong> - Loads the model into memory, without any cached layers.</p></li></ul><h3><strong>The Results on DGX Spark</strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XMRg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22cea908-ae74-422a-8e9d-aa32549f497d_2048x1175.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XMRg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22cea908-ae74-422a-8e9d-aa32549f497d_2048x1175.png 424w, https://substackcdn.com/image/fetch/$s_!XMRg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22cea908-ae74-422a-8e9d-aa32549f497d_2048x1175.png 848w, https://substackcdn.com/image/fetch/$s_!XMRg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22cea908-ae74-422a-8e9d-aa32549f497d_2048x1175.png 1272w, https://substackcdn.com/image/fetch/$s_!XMRg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22cea908-ae74-422a-8e9d-aa32549f497d_2048x1175.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XMRg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22cea908-ae74-422a-8e9d-aa32549f497d_2048x1175.png" width="1456" height="835" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/22cea908-ae74-422a-8e9d-aa32549f497d_2048x1175.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:835,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1557226,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/181503991?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22cea908-ae74-422a-8e9d-aa32549f497d_2048x1175.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!XMRg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22cea908-ae74-422a-8e9d-aa32549f497d_2048x1175.png 424w, https://substackcdn.com/image/fetch/$s_!XMRg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22cea908-ae74-422a-8e9d-aa32549f497d_2048x1175.png 848w, https://substackcdn.com/image/fetch/$s_!XMRg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22cea908-ae74-422a-8e9d-aa32549f497d_2048x1175.png 1272w, https://substackcdn.com/image/fetch/$s_!XMRg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22cea908-ae74-422a-8e9d-aa32549f497d_2048x1175.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 18. LLama cpp benchmark using sequential requests, across Ministral-3-14B, GPT-OSS-128B, and Gemma3-4B. All models are GGUFs with ~4BPW (Q4s)</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fSBO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd90cd967-9c53-4fa9-bb3f-0c6b689fe26c_2061x1191.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fSBO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd90cd967-9c53-4fa9-bb3f-0c6b689fe26c_2061x1191.png 424w, https://substackcdn.com/image/fetch/$s_!fSBO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd90cd967-9c53-4fa9-bb3f-0c6b689fe26c_2061x1191.png 848w, https://substackcdn.com/image/fetch/$s_!fSBO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd90cd967-9c53-4fa9-bb3f-0c6b689fe26c_2061x1191.png 1272w, https://substackcdn.com/image/fetch/$s_!fSBO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd90cd967-9c53-4fa9-bb3f-0c6b689fe26c_2061x1191.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fSBO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd90cd967-9c53-4fa9-bb3f-0c6b689fe26c_2061x1191.png" width="1456" height="841" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d90cd967-9c53-4fa9-bb3f-0c6b689fe26c_2061x1191.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:841,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1369240,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/181503991?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd90cd967-9c53-4fa9-bb3f-0c6b689fe26c_2061x1191.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fSBO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd90cd967-9c53-4fa9-bb3f-0c6b689fe26c_2061x1191.png 424w, https://substackcdn.com/image/fetch/$s_!fSBO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd90cd967-9c53-4fa9-bb3f-0c6b689fe26c_2061x1191.png 848w, https://substackcdn.com/image/fetch/$s_!fSBO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd90cd967-9c53-4fa9-bb3f-0c6b689fe26c_2061x1191.png 1272w, https://substackcdn.com/image/fetch/$s_!fSBO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd90cd967-9c53-4fa9-bb3f-0c6b689fe26c_2061x1191.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 19. LLama cpp batched benchmark using parallel requests. Same models.</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!T19Q!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b02f4f-f647-4ba3-9d52-bb6d0e260783_1085x982.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!T19Q!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b02f4f-f647-4ba3-9d52-bb6d0e260783_1085x982.png 424w, https://substackcdn.com/image/fetch/$s_!T19Q!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b02f4f-f647-4ba3-9d52-bb6d0e260783_1085x982.png 848w, https://substackcdn.com/image/fetch/$s_!T19Q!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b02f4f-f647-4ba3-9d52-bb6d0e260783_1085x982.png 1272w, https://substackcdn.com/image/fetch/$s_!T19Q!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b02f4f-f647-4ba3-9d52-bb6d0e260783_1085x982.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!T19Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b02f4f-f647-4ba3-9d52-bb6d0e260783_1085x982.png" width="1085" height="982" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/59b02f4f-f647-4ba3-9d52-bb6d0e260783_1085x982.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:982,&quot;width&quot;:1085,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:578258,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/181503991?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b02f4f-f647-4ba3-9d52-bb6d0e260783_1085x982.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!T19Q!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b02f4f-f647-4ba3-9d52-bb6d0e260783_1085x982.png 424w, https://substackcdn.com/image/fetch/$s_!T19Q!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b02f4f-f647-4ba3-9d52-bb6d0e260783_1085x982.png 848w, https://substackcdn.com/image/fetch/$s_!T19Q!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b02f4f-f647-4ba3-9d52-bb6d0e260783_1085x982.png 1272w, https://substackcdn.com/image/fetch/$s_!T19Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F59b02f4f-f647-4ba3-9d52-bb6d0e260783_1085x982.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 20. Nemotron 3 Nano 30B-A3B MoE model benchmark on the DGX Spark.</figcaption></figure></div><h4>Other benchmark resources:</h4><ol><li><p><a href="https://sebastianraschka.com/blog/2025/dgx-impressions.html">DGX Spark and Mac Mini for Local AI Development</a> by <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Sebastian Raschka, PhD&quot;,&quot;id&quot;:27393275,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F61f4c017-506f-4e9b-a24f-76340dad0309_800x800.jpeg&quot;,&quot;uuid&quot;:&quot;2e3e11d9-212a-4f4d-8831-dd034efc9850&quot;}" data-component-name="MentionToDOM"></span></p></li><li><p><a href="https://www.youtube.com/watch?v=82SyOtc9flA">DGX Spark Review (Mac, DGX Spark, Strix Halo)</a> by <a href="https://www.youtube.com/@AZisk">Alex Ziskind</a></p></li></ol><div><hr></div><h2><strong>Availability and OEM systems</strong></h2><p>NVIDIA&#8217;s Founders Edition is available to order at $3,999 for the 4TB configuration. Alongside NVIDIA&#8217;s own unit, several GB10 desktops are arriving from the big OEMs. The core hardware will be pretty similar across all of the OEMs, with many announcements, including the Dell Pro Max, Lenovo ThinkStation PGX, Acer Veriton GN100, and ASUS Ascent GX10 having the GB10 chip.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pxgf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd23e1b58-190d-4758-a0fd-5012020ea0eb_2048x1365.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pxgf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd23e1b58-190d-4758-a0fd-5012020ea0eb_2048x1365.jpeg 424w, https://substackcdn.com/image/fetch/$s_!pxgf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd23e1b58-190d-4758-a0fd-5012020ea0eb_2048x1365.jpeg 848w, https://substackcdn.com/image/fetch/$s_!pxgf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd23e1b58-190d-4758-a0fd-5012020ea0eb_2048x1365.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!pxgf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd23e1b58-190d-4758-a0fd-5012020ea0eb_2048x1365.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pxgf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd23e1b58-190d-4758-a0fd-5012020ea0eb_2048x1365.jpeg" width="1456" height="970" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d23e1b58-190d-4758-a0fd-5012020ea0eb_2048x1365.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:970,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pxgf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd23e1b58-190d-4758-a0fd-5012020ea0eb_2048x1365.jpeg 424w, https://substackcdn.com/image/fetch/$s_!pxgf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd23e1b58-190d-4758-a0fd-5012020ea0eb_2048x1365.jpeg 848w, https://substackcdn.com/image/fetch/$s_!pxgf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd23e1b58-190d-4758-a0fd-5012020ea0eb_2048x1365.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!pxgf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd23e1b58-190d-4758-a0fd-5012020ea0eb_2048x1365.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 21. View of OEMs&#8217; versions of the DGX Spark from third-party providers. Source <a href="https://marketplace.nvidia.com/en-us/enterprise/personal-ai-supercomputers/?limit=15">NVIDIA</a></figcaption></figure></div><div><hr></div><h2>Conclusion</h2><p>The DGX Spark is best understood not as a faster GPU, but as a developer kit for building, validating, and testing large AI workloads locally.</p><p>It sits between discrete GPUs and full AI workstations within NVIDIA&#8217;s ecosystem, systems most AI developers rely on today - but packaged in a compact, desk-side form factor that fits naturally into a local development workflow.</p><p>Looking at the community benchmarks, most criticism of the DGX Spark comes from evaluating it against metrics that don&#8217;t match its intended use case. Many reviews frame it as an inference box or a replacement for high-end GPUs, but Spark was not designed to compete with large workstations purely on inference throughput.</p><p>While it doesn&#8217;t offer the memory bandwidth of high-end discrete GPUs, it still delivers practical performance on memory-bound workloads, with generation speeds that remain usable for interactive development.</p><p>More importantly, Spark is designed to align local AI development with how AI systems are actually built, whether that means working with a single large LLM, optimizing or quantizing models, fine-tuning and serving multiple smaller models, or building agentic systems that are eventually deployed at scale.</p><p>When judged on those terms, DGX Spark does exactly what it is designed to do.</p><blockquote><p><strong>Thanks NVIDIA for sending me a DGX Spark &#128154;</strong></p></blockquote><p><br>Thanks for reading Neural Bits &#128075;<br>I&#8217;ll have another update to share in the next issue, coming next week.</p><div><hr></div><h2>References</h2><p>[1] <em>NVIDIA DGX Spark</em>. (2025). NVIDIA. <a href="https://www.nvidia.com/en-us/products/workstations/dgx-spark/">https://www.nvidia.com/en-us/products/workstations/dgx-spark/</a></p><p>[2] Spark, D. (2019). <em>NVIDIA DGX Spark Benchmarks</em>. Google Docs. <a href="https://docs.google.com/spreadsheets/d/1SF1u0J2vJ-ou-R_Ry1JZQ0iscOZL8UKHpdVFr85tNLU/edit?gid=0#gid=0">https://docs.google.com/spreadsheets/d/1SF1u0J2vJ-ou-R_Ry1JZQ0iscOZL8UKHpdVFr85tNLU/edit?gid=0#gid=0</a></p><p>[&#8204;3] Raschka, S. (2025, October 29). <em>DGX Spark and Mac Mini for Local PyTorch Development</em>. Sebastian Raschka, PhD. <a href="https://sebastianraschka.com/blog/2025/dgx-impressions.html">https://sebastianraschka.com/blog/2025/dgx-impressions.html</a></p><p>[4] Kennedy, P. (2025, October 14). <em>NVIDIA DGX Spark Review: The GB10 Machine is so Freaking Cool</em>. ServeTheHome. <a href="https://www.servethehome.com/nvidia-dgx-spark-review-the-gb10-machine-is-so-freaking-cool/2/">https://www.servethehome.com/nvidia-dgx-spark-review-the-gb10-machine-is-so-freaking-cool/2/</a></p><p>[5] <em>llama.cpp/benches/dgx-spark/dgx-spark.md at master &#183; ggml-org/llama.cpp</em>. (2025). GitHub. <a href="https://github.com/ggml-org/llama.cpp/blob/master/benches/dgx-spark/dgx-spark.md">https://github.com/ggml-org/llama.cpp/blob/master/benches/dgx-spark/dgx-spark.md</a></p><p>[6] <em>NVIDIA DGX Spark In-Depth Review: A New Standard for Local AI Inference | LMSYS Org</em>. (2025). Lmsys.org. <a href="https://lmsys.org/blog/2025-10-13-nvidia-dgx-spark/">https://lmsys.org/blog/2025-10-13-nvidia-dgx-spark/</a></p><p>&#8204;[7] Mann, T. (2025, August 27). <em>Nvidia details its itty-bitty GB10 superchip for local AI development</em>. Theregister.com; The Register. <a href="https://www.theregister.com/2025/08/27/nvidia_blackwell_gb10/">https://www.theregister.com/2025/08/27/nvidia_blackwell_gb10/</a></p><p>[&#8204;8] <em>NVIDIA DGX Spark Review: The AI Appliance Bringing Datacenter Capabilities to Desktops</em>. (2025, November 13). StorageReview.com. <a href="https://www.storagereview.com/review/nvidia-dgx-spark-review-the-ai-appliance-bringing-datacenter-capabilities-to-desktops">https://www.storagereview.com/review/nvidia-dgx-spark-review-the-ai-appliance-bringing-datacenter-capabilities-to-desktops</a></p><p>&#8204;[9] <em>Performance of llama.cpp on NVIDIA DGX Spark &#183; ggml-org/llama.cpp &#183; Discussion #16578</em>. (2025, October 14). GitHub. <a href="https://github.com/ggml-org/llama.cpp/discussions/16578#discussioncomment-14688238">https://github.com/ggml-org/llama.cpp/discussions/16578#discussioncomment-14688238</a></p><p>[10] <em>NVIDIA/dgx-spark-playbooks: Collection of step-by-step playbooks for setting up AI/ML workloads on NVIDIA DGX Spark devices with Blackwell architecture.</em> (2025). GitHub. <a href="https://github.com/NVIDIA/dgx-spark-playbooks">https://github.com/NVIDIA/dgx-spark-playbooks</a></p>]]></content:encoded></item><item><title><![CDATA[An AI Engineer's Guide To Choosing GPUs]]></title><description><![CDATA[A deep dive on technical Hardware and Software details of NVIDIA GPUs for AI Workloads.]]></description><link>https://read.theaimerge.com/p/an-ai-engineers-guide-to-choosing</link><guid isPermaLink="false">https://read.theaimerge.com/p/an-ai-engineers-guide-to-choosing</guid><dc:creator><![CDATA[Alex Razvant]]></dc:creator><pubDate>Sun, 07 Dec 2025 14:02:40 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!j6rm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb54404-1235-4c3c-8910-bc1e24e33cc7_1726x1378.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Welcome to Neural Bits. Each week, I write about practical, production-ready AI/ML Engineering. Join over <strong><a href="https://multimodalai.substack.com/subscribe">7000+ engineers</a></strong> and learn to build real-world AI Systems.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p>Most AI engineers use NVIDIA GPUs as their compute for AI workloads. Also, most know the names of their GPUs but not the intricate details of the entire picture that matters for a deployable AI System.</p><p>From the RTX 3/4/590 everyone trains their LoRA Adapters on, the H100 that powered and still powers LLM clusters, to the new Blackwell B100+ chips entering data centers specifically for Gen AI Training and Inference at scale.</p><p>There are a lot of options and configurations. But knowing the name of a GPU will not tell you the most important thing: </p><blockquote><p>GPUs are not monolithic products. </p></blockquote><p>They&#8217;re systems composed of layers:</p><ul><li><p>A <strong>microarchitecture</strong> (e.g., Pascal, Ampere, Hopper, Blackwell) that defines the underlying chip features, which precision formats and tensor features exist etc.</p></li><li><p>A <strong>memory subsystem</strong> that determines how fast model weights and activations can move.</p></li><li><p>A <strong>form factor and interconnect</strong> (PCIe, SXM, NVLink) that indicate whether GPUs can scale together while using their full capacity.</p></li></ul><p>This guide breaks down the internal logic of NVIDIA&#8217;s GPU lineup, as I see it useful from an AI Engineer&#8217;s lens:</p><blockquote><p><em>How does architecture map to capability? How do memory and interconnect constrain or enable AI workloads? And how do consumer GPUs differ from data-center GPUs beyond price and marketing?</em></p></blockquote><p><em><strong>To better navigate this article, please use the Table of Contents on the left side.</strong></em></p><div><hr></div><h2>Fun Personal Story - My First GPU</h2><p>My first ever GPU was an NVIDIA 7300GT, with 256MB VRAM and 128bit BUS. Nowadays, even a microwave is more powerful than this chip was in 2008 when I got it with my first ever Desktop PC my grandmother bought me.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wfnB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd069f6c3-9bbd-4d64-9cc7-03ba08de87b3_3264x1924.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wfnB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd069f6c3-9bbd-4d64-9cc7-03ba08de87b3_3264x1924.png 424w, https://substackcdn.com/image/fetch/$s_!wfnB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd069f6c3-9bbd-4d64-9cc7-03ba08de87b3_3264x1924.png 848w, https://substackcdn.com/image/fetch/$s_!wfnB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd069f6c3-9bbd-4d64-9cc7-03ba08de87b3_3264x1924.png 1272w, https://substackcdn.com/image/fetch/$s_!wfnB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd069f6c3-9bbd-4d64-9cc7-03ba08de87b3_3264x1924.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wfnB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd069f6c3-9bbd-4d64-9cc7-03ba08de87b3_3264x1924.png" width="1456" height="858" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d069f6c3-9bbd-4d64-9cc7-03ba08de87b3_3264x1924.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:858,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:5502639,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/180877610?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd069f6c3-9bbd-4d64-9cc7-03ba08de87b3_3264x1924.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wfnB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd069f6c3-9bbd-4d64-9cc7-03ba08de87b3_3264x1924.png 424w, https://substackcdn.com/image/fetch/$s_!wfnB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd069f6c3-9bbd-4d64-9cc7-03ba08de87b3_3264x1924.png 848w, https://substackcdn.com/image/fetch/$s_!wfnB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd069f6c3-9bbd-4d64-9cc7-03ba08de87b3_3264x1924.png 1272w, https://substackcdn.com/image/fetch/$s_!wfnB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd069f6c3-9bbd-4d64-9cc7-03ba08de87b3_3264x1924.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I remember back then, trying to run Grand Theft Auto 4 on my PC, and the game wouldn&#8217;t even start, I think rendering the first frame of the Rockstar Games Logo was too much for this little fella. I remember trying to convince my parents to buy me a NVIDIA 9500GT as one of my friends had it and his PC was running the game on High Settings at 1280x1024. That was way over what they could afford at the time.</p><p>You could imagine I was spending most of my time at his place whenever I got the chance. In the end, with a lot of tweaks, I&#8217;ve managed to play it a bit at 340x280 resolution with everything on Very Low settings, on my own PC. </p><p>I remember even modifying the game&#8217;s internal .ini files in Windows/ProgramFiles, trying to tweak DirectX 9.0 and disable every Graphics Feature I could find in there, being guided by every tutorial I could find at the time, and after waiting a solid few minutes for pages and videos to load with my Dial-Up internet of 40kb/s via the phone line.</p><p>It looked somewhat like this, but with way blurrier pixels, and a 12-13 FPS max, with the GPU Fan working overtime at 70-80 degrees C.</p><p>But hey, I could play it. :) </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SFQW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5329651-6183-4ef1-9417-98bc08a41a41_3570x2050.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SFQW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5329651-6183-4ef1-9417-98bc08a41a41_3570x2050.png 424w, https://substackcdn.com/image/fetch/$s_!SFQW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5329651-6183-4ef1-9417-98bc08a41a41_3570x2050.png 848w, https://substackcdn.com/image/fetch/$s_!SFQW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5329651-6183-4ef1-9417-98bc08a41a41_3570x2050.png 1272w, https://substackcdn.com/image/fetch/$s_!SFQW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5329651-6183-4ef1-9417-98bc08a41a41_3570x2050.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SFQW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5329651-6183-4ef1-9417-98bc08a41a41_3570x2050.png" width="1456" height="836" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a5329651-6183-4ef1-9417-98bc08a41a41_3570x2050.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:836,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:6556459,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/180877610?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5329651-6183-4ef1-9417-98bc08a41a41_3570x2050.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SFQW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5329651-6183-4ef1-9417-98bc08a41a41_3570x2050.png 424w, https://substackcdn.com/image/fetch/$s_!SFQW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5329651-6183-4ef1-9417-98bc08a41a41_3570x2050.png 848w, https://substackcdn.com/image/fetch/$s_!SFQW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5329651-6183-4ef1-9417-98bc08a41a41_3570x2050.png 1272w, https://substackcdn.com/image/fetch/$s_!SFQW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5329651-6183-4ef1-9417-98bc08a41a41_3570x2050.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 1. GTA 4 running on NVIDIA GT7300 at 10FPS, very low settings with an IntelCore I5 and 8GB RAM. Sourced from <a href="https://www.youtube.com/watch?v=sg_VkO_8GIE">Youtube</a>.</figcaption></figure></div><p>Interestingly enough, It was back then I&#8217;ve started to find out NVIDIA SLI, different GPU families, VRAM, memory. I didn&#8217;t know or wanted to understand what these were. My complete goal of trying to run this game that everyone at school talked about, on my PC such that I could join the &#8220;group&#8221;.</p><p>Getting back to nowadays, you could easily run way better looking games directly on your phone, at smooth 30+ FPS while not draining your phone battery.</p><p>The picture I wanted to paint with this story is that GPUs, Graphics, Supercomputers, AI Compute and technology overall have come a very long way. Now, compute is faster, bigger, more energy efficient and cheaper than ever.</p><div><hr></div><h2>1. Deep Learning Started on 2 x GTX550</h2><p>On a recent <a href="https://www.youtube.com/watch?v=3hptKYix4X8">Joe Rogan podcast episode, Jensen Huang</a> brought up a moment in deep learning history that&#8217;s easy to forget now. In 2012, Alex Krizhevsky and Ilya Sutskever trained AlexNet, the Image Classification model that ended up beating all the existing Computer Vision algorithms at the time.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HLEV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e5d9d8a-194e-4823-ad2f-9b666e33c2c9_1672x1366.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HLEV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e5d9d8a-194e-4823-ad2f-9b666e33c2c9_1672x1366.png 424w, https://substackcdn.com/image/fetch/$s_!HLEV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e5d9d8a-194e-4823-ad2f-9b666e33c2c9_1672x1366.png 848w, https://substackcdn.com/image/fetch/$s_!HLEV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e5d9d8a-194e-4823-ad2f-9b666e33c2c9_1672x1366.png 1272w, https://substackcdn.com/image/fetch/$s_!HLEV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e5d9d8a-194e-4823-ad2f-9b666e33c2c9_1672x1366.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HLEV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e5d9d8a-194e-4823-ad2f-9b666e33c2c9_1672x1366.png" width="1456" height="1190" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9e5d9d8a-194e-4823-ad2f-9b666e33c2c9_1672x1366.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1190,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2167621,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/180877610?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e5d9d8a-194e-4823-ad2f-9b666e33c2c9_1672x1366.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HLEV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e5d9d8a-194e-4823-ad2f-9b666e33c2c9_1672x1366.png 424w, https://substackcdn.com/image/fetch/$s_!HLEV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e5d9d8a-194e-4823-ad2f-9b666e33c2c9_1672x1366.png 848w, https://substackcdn.com/image/fetch/$s_!HLEV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e5d9d8a-194e-4823-ad2f-9b666e33c2c9_1672x1366.png 1272w, https://substackcdn.com/image/fetch/$s_!HLEV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e5d9d8a-194e-4823-ad2f-9b666e33c2c9_1672x1366.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 2. A screenshot from the recent Joe Rogan Podcast episode featuring Jensen Huang, the CEO of NVIDIA.</figcaption></figure></div><p>They&#8217;ve done that using <strong>2 x NVIDIA GTX 580 gaming GPUs</strong> with 3 GB of VRAM each, to build the fast convolutions. That was their whole setup.</p><p>The code <strong><a href="https://code.google.com/archive/p/cuda-convnet/">cuda-convnet</a></strong> was good enough that for several years it was the industry standard and powered the first couple years of the deep learning boom. That success in 2012, hinted that AI progress was going to depend heavily on GPU hardware.</p><p>But, hardware is only half of the slice. If you write or deploy modern AI models, you&#8217;re almost certainly doing it on NVIDIA hardware. That&#8217;s not just about FLOPs or how large the GPU VRAM is, equally important is the Software stack, the low-level libraries, frameworks and SDKs that allow AI Engineers to train, optimize and deploy their AI Models.</p><blockquote><p>As an AI engineer, your life is much easier if you understand how NVIDIA organizes its GPU stack.</p></blockquote><p>This piece is a practical map of that stack, starting Hardware First.</p><ul><li><p><strong>Software view:</strong> compute capability and CUDA features</p></li><li><p><strong>Architecture view:</strong> Ampere &#8594; Hopper &#8594; Blackwell</p></li><li><p><strong>Hardware view:</strong> PCIe vs SXM, NVLink, and when they matter</p></li></ul><div><hr></div><h2>2. Understanding Compute Capability</h2><p>Every NVIDIA GPU has a <strong>Compute Capability (CC)</strong> like <code>7.0</code>, <code>8.9</code>, <code>9.0</code>, etc. This number defines which instructions, cuda cores, tensor cores, memory ops, and features a GPU supports. Simply put, the CC number defines the set of hardware features per GPU architecture.</p><p>For instance, if we analyze this table, we&#8217;ll see the CC number associated with each family of GPU Chips, from the older Tesla GPUs, up to the latest Blackwell chip designed for AI.</p><blockquote><p>The GT7300 I&#8217;ve had in 2008, was part of the Tesla family of architectures. Interestingly enough a slightly modified version of a Tesla-family GPU, the 7800GTX, called <a href="https://en.wikipedia.org/wiki/RSX_Reality_Synthesizer">(RSX) Reality Synthesizer</a> was used in Playstation 3. </p><p>That chip was developed jointly by Sony and NVIDIA.</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LKjh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5e5c824-4581-4dc9-a26b-fead4f9dfe4b_1966x1166.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LKjh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5e5c824-4581-4dc9-a26b-fead4f9dfe4b_1966x1166.png 424w, https://substackcdn.com/image/fetch/$s_!LKjh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5e5c824-4581-4dc9-a26b-fead4f9dfe4b_1966x1166.png 848w, https://substackcdn.com/image/fetch/$s_!LKjh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5e5c824-4581-4dc9-a26b-fead4f9dfe4b_1966x1166.png 1272w, https://substackcdn.com/image/fetch/$s_!LKjh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5e5c824-4581-4dc9-a26b-fead4f9dfe4b_1966x1166.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LKjh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5e5c824-4581-4dc9-a26b-fead4f9dfe4b_1966x1166.png" width="1456" height="864" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a5e5c824-4581-4dc9-a26b-fead4f9dfe4b_1966x1166.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:864,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:651564,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/180877610?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5e5c824-4581-4dc9-a26b-fead4f9dfe4b_1966x1166.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!LKjh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5e5c824-4581-4dc9-a26b-fead4f9dfe4b_1966x1166.png 424w, https://substackcdn.com/image/fetch/$s_!LKjh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5e5c824-4581-4dc9-a26b-fead4f9dfe4b_1966x1166.png 848w, https://substackcdn.com/image/fetch/$s_!LKjh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5e5c824-4581-4dc9-a26b-fead4f9dfe4b_1966x1166.png 1272w, https://substackcdn.com/image/fetch/$s_!LKjh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa5e5c824-4581-4dc9-a26b-fead4f9dfe4b_1966x1166.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 3. How CC maps to GPU Architectures, indicating a range of Compute Capability scores for each CUDA SDK version. Image taken from Wikipedia, with added annotations.</figcaption></figure></div><p>If you own an NVIDIA GPU, you can see the CC via running this in your terminal:</p><pre><code><code>nvidia-smi --query-gpu=name,compute_cap --format=csv</code></code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fGSt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6904ca9d-2101-46a2-9a5c-fe66b514f424_1432x850.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fGSt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6904ca9d-2101-46a2-9a5c-fe66b514f424_1432x850.png 424w, https://substackcdn.com/image/fetch/$s_!fGSt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6904ca9d-2101-46a2-9a5c-fe66b514f424_1432x850.png 848w, https://substackcdn.com/image/fetch/$s_!fGSt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6904ca9d-2101-46a2-9a5c-fe66b514f424_1432x850.png 1272w, https://substackcdn.com/image/fetch/$s_!fGSt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6904ca9d-2101-46a2-9a5c-fe66b514f424_1432x850.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fGSt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6904ca9d-2101-46a2-9a5c-fe66b514f424_1432x850.png" width="1432" height="850" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6904ca9d-2101-46a2-9a5c-fe66b514f424_1432x850.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:850,&quot;width&quot;:1432,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:371800,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/180877610?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6904ca9d-2101-46a2-9a5c-fe66b514f424_1432x850.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fGSt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6904ca9d-2101-46a2-9a5c-fe66b514f424_1432x850.png 424w, https://substackcdn.com/image/fetch/$s_!fGSt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6904ca9d-2101-46a2-9a5c-fe66b514f424_1432x850.png 848w, https://substackcdn.com/image/fetch/$s_!fGSt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6904ca9d-2101-46a2-9a5c-fe66b514f424_1432x850.png 1272w, https://substackcdn.com/image/fetch/$s_!fGSt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6904ca9d-2101-46a2-9a5c-fe66b514f424_1432x850.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 4. The compute capability (CC) and other nvidia-smi details of my RTX4080 GPU, after executing the query above.</figcaption></figure></div><p>A few things are tightly coupled to compute capability:</p><ul><li><p><strong>Tensor Cores &amp; precision formats</strong></p><ul><li><p>Ampere (A100, RTX 30XX): TF32 + FP16 Tensor Cores</p></li><li><p>Hopper (H100): adds FP8 via the Transformer Engine.</p></li><li><p>Blackwell (B100/B200): pushes further to FP4/NVFP4 for inference.</p></li></ul></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yZRd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7f88591-b84d-448d-87a6-66efc37d00b6_1442x548.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yZRd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7f88591-b84d-448d-87a6-66efc37d00b6_1442x548.png 424w, https://substackcdn.com/image/fetch/$s_!yZRd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7f88591-b84d-448d-87a6-66efc37d00b6_1442x548.png 848w, https://substackcdn.com/image/fetch/$s_!yZRd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7f88591-b84d-448d-87a6-66efc37d00b6_1442x548.png 1272w, https://substackcdn.com/image/fetch/$s_!yZRd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7f88591-b84d-448d-87a6-66efc37d00b6_1442x548.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yZRd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7f88591-b84d-448d-87a6-66efc37d00b6_1442x548.png" width="1442" height="548" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c7f88591-b84d-448d-87a6-66efc37d00b6_1442x548.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:548,&quot;width&quot;:1442,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:157634,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/180877610?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7f88591-b84d-448d-87a6-66efc37d00b6_1442x548.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!yZRd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7f88591-b84d-448d-87a6-66efc37d00b6_1442x548.png 424w, https://substackcdn.com/image/fetch/$s_!yZRd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7f88591-b84d-448d-87a6-66efc37d00b6_1442x548.png 848w, https://substackcdn.com/image/fetch/$s_!yZRd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7f88591-b84d-448d-87a6-66efc37d00b6_1442x548.png 1272w, https://substackcdn.com/image/fetch/$s_!yZRd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7f88591-b84d-448d-87a6-66efc37d00b6_1442x548.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 5. An example on how TensorCore composition ties to Compute Capability. For each CC, the TensorCore configuration are different, more optimized. Image from wikipedia.</figcaption></figure></div><ul><li><p><strong>Memory - </strong>Newer CCs support HBM2E/HBM3/HBM3e, larger memory, and faster NVLink generations.</p></li><li><p><strong>CUDA &amp; library support - </strong>At some point, new CUDA features stop backporting to older CCs.</p></li></ul><p>The rule of thumb when analyzing GPUs is the higher the CC, the more &#8220;native&#8221; support you get for modern AI features (FP8/FP4, better sparsity, bigger memory, new interconnects). The following diagram is an overview on GPU Architecture families and models, from Consumer GPUs to Data Center GPUs, and how these are tied to the Compute Capability score.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SQB1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ccf6c1-d297-47c1-ad75-4b07dd24ee80_1190x1416.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SQB1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ccf6c1-d297-47c1-ad75-4b07dd24ee80_1190x1416.png 424w, https://substackcdn.com/image/fetch/$s_!SQB1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ccf6c1-d297-47c1-ad75-4b07dd24ee80_1190x1416.png 848w, https://substackcdn.com/image/fetch/$s_!SQB1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ccf6c1-d297-47c1-ad75-4b07dd24ee80_1190x1416.png 1272w, https://substackcdn.com/image/fetch/$s_!SQB1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ccf6c1-d297-47c1-ad75-4b07dd24ee80_1190x1416.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SQB1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ccf6c1-d297-47c1-ad75-4b07dd24ee80_1190x1416.png" width="1190" height="1416" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/37ccf6c1-d297-47c1-ad75-4b07dd24ee80_1190x1416.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1416,&quot;width&quot;:1190,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:741307,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/180877610?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ccf6c1-d297-47c1-ad75-4b07dd24ee80_1190x1416.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SQB1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ccf6c1-d297-47c1-ad75-4b07dd24ee80_1190x1416.png 424w, https://substackcdn.com/image/fetch/$s_!SQB1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ccf6c1-d297-47c1-ad75-4b07dd24ee80_1190x1416.png 848w, https://substackcdn.com/image/fetch/$s_!SQB1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ccf6c1-d297-47c1-ad75-4b07dd24ee80_1190x1416.png 1272w, https://substackcdn.com/image/fetch/$s_!SQB1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37ccf6c1-d297-47c1-ad75-4b07dd24ee80_1190x1416.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 6. Showcasing the GPU Architecture and CC link in a broader view, with GPU Models included. Image from wikipedia, with added annotations.</figcaption></figure></div><p>To summarize this section, Compute Capability tells you which hardware features a GPU actually supports, and whether your kernels will run at full speed. VRAM, FLOPs, and interconnect matter but only after the capability makes those features usable.</p><p>After CC, the next layer into understanding a GPU&#8217;s Performance is the Technical Cheatsheet, from where we extract details such as connectors, FLOPs, Bandwidth Memory and more.</p><div><hr></div><h2>3. Understanding a Technical Cheatsheet</h2><p>After understanding CC, a GPU cheatsheet is another key reference tool for an AI engineer to understand hardware and software optimization details. In a Technical Cheatsheet, an engineer will find the metrics on CPU Performance, power usage, number of FLOPs in different precision formats (FP32/FP16) and the GPU form factor.</p><p>The latter is important for building compute clusters, where multiple GPUs have to be connected and share the resource pool. A cheatsheet allows you to quickly answer some of these questions:</p><ul><li><p><em>Will this GPU support the precision modes?</em></p></li><li><p><em>Does it have enough VRAM and Bandwidth?</em></p></li><li><p><em>Is inter-GPU bandwidth high enough for model parallelism?</em></p></li><li><p><em>Will this deploy cleanly in my existing hardware stack?</em></p></li></ul><p>In the following image, let&#8217;s inspect the Technical Cheatsheet for the Hopper H200 GPU, covering a few key details on FLOPs and explain the difference between the form factors such as SXM or PCIe.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!j6rm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb54404-1235-4c3c-8910-bc1e24e33cc7_1726x1378.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!j6rm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb54404-1235-4c3c-8910-bc1e24e33cc7_1726x1378.png 424w, https://substackcdn.com/image/fetch/$s_!j6rm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb54404-1235-4c3c-8910-bc1e24e33cc7_1726x1378.png 848w, https://substackcdn.com/image/fetch/$s_!j6rm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb54404-1235-4c3c-8910-bc1e24e33cc7_1726x1378.png 1272w, https://substackcdn.com/image/fetch/$s_!j6rm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb54404-1235-4c3c-8910-bc1e24e33cc7_1726x1378.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!j6rm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb54404-1235-4c3c-8910-bc1e24e33cc7_1726x1378.png" width="1456" height="1162" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ddb54404-1235-4c3c-8910-bc1e24e33cc7_1726x1378.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1162,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1538182,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/180877610?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb54404-1235-4c3c-8910-bc1e24e33cc7_1726x1378.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!j6rm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb54404-1235-4c3c-8910-bc1e24e33cc7_1726x1378.png 424w, https://substackcdn.com/image/fetch/$s_!j6rm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb54404-1235-4c3c-8910-bc1e24e33cc7_1726x1378.png 848w, https://substackcdn.com/image/fetch/$s_!j6rm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb54404-1235-4c3c-8910-bc1e24e33cc7_1726x1378.png 1272w, https://substackcdn.com/image/fetch/$s_!j6rm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddb54404-1235-4c3c-8910-bc1e24e33cc7_1726x1378.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 7. The NVIDIA H200 GPU Technical Cheatsheet with annotated examples and images showcasing the difference between PCIe and SXM form factors.</figcaption></figure></div><p>From the cheatsheet, an AI Engineer would likely look first at the GPU Memory, Bandwidth and FLOPS for a specific Precision Type which directly impacts the speed of AI model training and inference.</p><p>For this specific GPU model, a single H200 GPU features 141GB of memory, with a 4.8TB/s bandwidth. For Vision based workloads, that maybe imply real-time vision AI inference, this GPU features NVDEC which allows for video decoding and feeding data as tensor-ready structures instead of it passing through the CPU.</p><h3>MIG - Multi Instance GPU</h3><p>Another important detail is MIG (Multi Instance GPU) which allows engineers to shard a single physical GPU into multiple instances of virtual GPUs, each in an isolated space. </p><blockquote><p>For instance, a single H200 could be split into 4 MIG instances, each one with 36GB of VRAM. That means 4 different AI Engineers, could work in separated environments each with their own workload.</p><p>Think of a multi-agent system, with multiple LLM models in their own VRAM and GPU boundary working simultaneously on different tasks.</p></blockquote><p>During experimentation of model training phase, MIG also could come in handy to run the same experiment with multiple configurations or optimization profiles. A MIG instance could quantize to FP8 and inference with a 32 batch size, and another could quantize to FP4 and inference batch size 64.</p><h3>Form Factor - SXM or PCIe</h3><p>Let&#8217;s focus on the form-factor, as this also impacts the GPU performance. In this cheatsheet, there are 2 form factors PCIe and SXM. The PCIe (Peripheral Component Interconnect Express) is an interface standard that is common for consumer GPUs.</p><p>In the attached image, there is a Gaming PC Motherboard, featuring a PCIe 5.1 slot for the GPU, think RTX4080/4090/5090. On the other hand, SXM is a special chip embedded into the motherboard directly, and used in DataCenter clusters.</p><blockquote><p>For example an H200 DGX Server contains 8 x H200 GPUs. These are not connected via PCIe, but on SXM directly and connected via NVLink.</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!N2ce!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332d4bc9-65b0-4058-aad3-1505af68539b_1618x1220.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!N2ce!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332d4bc9-65b0-4058-aad3-1505af68539b_1618x1220.png 424w, https://substackcdn.com/image/fetch/$s_!N2ce!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332d4bc9-65b0-4058-aad3-1505af68539b_1618x1220.png 848w, https://substackcdn.com/image/fetch/$s_!N2ce!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332d4bc9-65b0-4058-aad3-1505af68539b_1618x1220.png 1272w, https://substackcdn.com/image/fetch/$s_!N2ce!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332d4bc9-65b0-4058-aad3-1505af68539b_1618x1220.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!N2ce!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332d4bc9-65b0-4058-aad3-1505af68539b_1618x1220.png" width="1456" height="1098" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/332d4bc9-65b0-4058-aad3-1505af68539b_1618x1220.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1098,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1747799,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/180877610?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332d4bc9-65b0-4058-aad3-1505af68539b_1618x1220.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!N2ce!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332d4bc9-65b0-4058-aad3-1505af68539b_1618x1220.png 424w, https://substackcdn.com/image/fetch/$s_!N2ce!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332d4bc9-65b0-4058-aad3-1505af68539b_1618x1220.png 848w, https://substackcdn.com/image/fetch/$s_!N2ce!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332d4bc9-65b0-4058-aad3-1505af68539b_1618x1220.png 1272w, https://substackcdn.com/image/fetch/$s_!N2ce!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332d4bc9-65b0-4058-aad3-1505af68539b_1618x1220.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 8. A close-up on H200 SXM form-factor GPUs (left) and PCIe form-factor GPUs (right). Below is an image with how the chips look on control boards.</figcaption></figure></div><p>With SXM, you get higher power input which mean higher sustained clock speeds and direct GPU-GPU links through the NVLink switches. This is important for training or serving large models as AI Engineers could use the full benefits of parallelization techniques such as Tensor Parallel or Pipeline Parallel with low latency in GPU-GPU communication.</p><p>For example, the H100 SXM variants can participate in NVLink/NVSwitch topologies where 16 GPUs share hundreds of GB/s of bidirectional bandwidth. Multi-GPU clusters are generally used for training and inferencing large dense LLMs and MoE Models as token exchanges and activations in MoE networks require fast GPU-GPU communication.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nGbJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a66c8da-7d32-4430-8b5c-88d05ce14e97_1704x953.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nGbJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a66c8da-7d32-4430-8b5c-88d05ce14e97_1704x953.png 424w, https://substackcdn.com/image/fetch/$s_!nGbJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a66c8da-7d32-4430-8b5c-88d05ce14e97_1704x953.png 848w, https://substackcdn.com/image/fetch/$s_!nGbJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a66c8da-7d32-4430-8b5c-88d05ce14e97_1704x953.png 1272w, https://substackcdn.com/image/fetch/$s_!nGbJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a66c8da-7d32-4430-8b5c-88d05ce14e97_1704x953.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nGbJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a66c8da-7d32-4430-8b5c-88d05ce14e97_1704x953.png" width="1456" height="814" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0a66c8da-7d32-4430-8b5c-88d05ce14e97_1704x953.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:814,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;H100/B100: Analyze of 5 Different Network Fabrics Types. Debate Between  Infiniband and Ethernet&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="H100/B100: Analyze of 5 Different Network Fabrics Types. Debate Between  Infiniband and Ethernet" title="H100/B100: Analyze of 5 Different Network Fabrics Types. Debate Between  Infiniband and Ethernet" srcset="https://substackcdn.com/image/fetch/$s_!nGbJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a66c8da-7d32-4430-8b5c-88d05ce14e97_1704x953.png 424w, https://substackcdn.com/image/fetch/$s_!nGbJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a66c8da-7d32-4430-8b5c-88d05ce14e97_1704x953.png 848w, https://substackcdn.com/image/fetch/$s_!nGbJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a66c8da-7d32-4430-8b5c-88d05ce14e97_1704x953.png 1272w, https://substackcdn.com/image/fetch/$s_!nGbJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a66c8da-7d32-4430-8b5c-88d05ce14e97_1704x953.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 9: NVIDIA NCCL 16 GPUs topology. Sourced from <a href="https://developer.nvidia.com/blog/doubling-all2all-performance-with-nvidia-collective-communication-library-2-12/">NVIDIA</a></figcaption></figure></div><h3>What is NVLink</h3><p>To understand NVLink and NVSwitch, we could first look at the older connector called SLI. The 2xGTX550 that were used to train AlexNet in 2012 were routed using the SLI Bridge to enable faster computation and data sharing between the two. SLI came during the era of Gaming, during which NVIDIA was selling consumer-first GPUs to render graphics.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Cr0n!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aa93043-ede0-4373-b5f4-48199f7f38cf_425x326.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Cr0n!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aa93043-ede0-4373-b5f4-48199f7f38cf_425x326.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Cr0n!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aa93043-ede0-4373-b5f4-48199f7f38cf_425x326.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Cr0n!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aa93043-ede0-4373-b5f4-48199f7f38cf_425x326.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Cr0n!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aa93043-ede0-4373-b5f4-48199f7f38cf_425x326.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Cr0n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aa93043-ede0-4373-b5f4-48199f7f38cf_425x326.jpeg" width="425" height="326" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7aa93043-ede0-4373-b5f4-48199f7f38cf_425x326.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:326,&quot;width&quot;:425,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;NVIDIA SLI &#8212; Vikipediya&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="NVIDIA SLI &#8212; Vikipediya" title="NVIDIA SLI &#8212; Vikipediya" srcset="https://substackcdn.com/image/fetch/$s_!Cr0n!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aa93043-ede0-4373-b5f4-48199f7f38cf_425x326.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Cr0n!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aa93043-ede0-4373-b5f4-48199f7f38cf_425x326.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Cr0n!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aa93043-ede0-4373-b5f4-48199f7f38cf_425x326.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Cr0n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aa93043-ede0-4373-b5f4-48199f7f38cf_425x326.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 10: NVIDIA GeForce GPUs connected using an SLI Bridge. Sourced from Wikipedia.</figcaption></figure></div><p>NVLink is the successor of the SLI, targeting AI workloads.</p><p><strong>For Desktops (PCIe Cards):</strong> NVLink is connected using a physical external bridge called an NVLink Bridge. This is a compact, solid PCB-based connector that plugs into dedicated NVLink ports on the top edge of two adjacent GPU cards, similar to the older SLI bridge.</p><p><strong>For Servers (SXM Modules):</strong> In high-density server environments (like NVIDIA&#8217;s DGX systems), the NVLink connections are integrated directly into the multi-GPU baseboard. The GPU modules (SXM form factor) plug into this baseboard, making the physical NVLink connection an internal part of the server structure.</p><p>For instance, below is an image of 2 x A100 PCIe GPUs, connected with NVLink bridges.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QkDQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5876a48b-9134-41c8-9e6c-65eae050c174_672x697.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QkDQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5876a48b-9134-41c8-9e6c-65eae050c174_672x697.jpeg 424w, https://substackcdn.com/image/fetch/$s_!QkDQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5876a48b-9134-41c8-9e6c-65eae050c174_672x697.jpeg 848w, https://substackcdn.com/image/fetch/$s_!QkDQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5876a48b-9134-41c8-9e6c-65eae050c174_672x697.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!QkDQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5876a48b-9134-41c8-9e6c-65eae050c174_672x697.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QkDQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5876a48b-9134-41c8-9e6c-65eae050c174_672x697.jpeg" width="490" height="508.2291666666667" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5876a48b-9134-41c8-9e6c-65eae050c174_672x697.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:697,&quot;width&quot;:672,&quot;resizeWidth&quot;:490,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;NVIDIA H100 NVL - buy at Digitec&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="NVIDIA H100 NVL - buy at Digitec" title="NVIDIA H100 NVL - buy at Digitec" srcset="https://substackcdn.com/image/fetch/$s_!QkDQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5876a48b-9134-41c8-9e6c-65eae050c174_672x697.jpeg 424w, https://substackcdn.com/image/fetch/$s_!QkDQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5876a48b-9134-41c8-9e6c-65eae050c174_672x697.jpeg 848w, https://substackcdn.com/image/fetch/$s_!QkDQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5876a48b-9134-41c8-9e6c-65eae050c174_672x697.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!QkDQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5876a48b-9134-41c8-9e6c-65eae050c174_672x697.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 11: Two NVIDIA A100 GPUs in PCIe form-factor, connected using NVLink Bridges.</figcaption></figure></div><div><hr></div><h2>4. How to Choose a GPU as an AI Engineer</h2><p>A typical AI engineering workflow is highly dependent on specialized hardware to accelerate model training and inference. While the majority of this work sources on cloud compute platforms, many teams, especially those dealing with extremely sensitive data or specialized needs, still utilize on-premise compute clusters. Regardless of the deployment environment, the decision on which GPU to use should be based on a well researched plan.</p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/p/an-ai-engineers-guide-to-choosing?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">If you&#8217;ve found this article helpful, share it on your feed!</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/p/an-ai-engineers-guide-to-choosing?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/p/an-ai-engineers-guide-to-choosing?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><p>The common deployment environments for AI engineers are:</p><ul><li><p><strong>Cloud Compute:</strong> Services like AWS, Azure, GCP or natively NVIDIA DGX Cloud offer scalable, pay-as-you-go access to top-tier hardware (e.g., NVIDIA H100s). Niche providers like <strong>LambdaCloud</strong> or <strong>RunPod</strong> also offer compelling alternatives. </p></li><li><p><strong>On-Premise Labs:</strong> Engineers working in private data centers or dedicated labs have full control over the hardware, often using <strong>NVIDIA DGX</strong> or <strong>HGX</strong> systems. </p></li></ul><blockquote><p>On-premise is the current pick for most AI Labs out there, OpenAI, Anthropic, X and Meta, they all bought DGX Clusters or large orders of GPUs from NVIDIA to build their own data centers.</p><p>That&#8217;s because in most AI Research, and you might run 100 experiments from which 70 failed, and paying for on-demand resources, cold start, provisioning on large cloud clusters gets quite expensive.</p></blockquote><p>When comparing specific GPU SKUs, whether in the cloud or on-premise engineers often evaluate them based on three technical pillars:</p><ol><li><p><strong> Compute Capability (Hardware and Software)</strong></p></li></ol><p>For NVIDIA, the CC metric dictates the low-level <strong>features</strong> a GPU supports, covering Precision Types, Tensor Core or CUDA Cores configurations.</p><ol start="2"><li><p><strong>Usable Memory (VRAM &amp; Bandwidth)</strong></p></li></ol><p>VRAM is the amount of memory available, and bandwidth is how fast data can be moved in and out of it. Although LLMs tend to get smaller and be quite good at 12B, 30B parameters, loading such models in memory in their pre-training BF16 precision requires a lot of VRAM.</p><p>Bandwidth is another key performance aspect. Training or fine tuning LLMs imply multiple RW operations that involve all of the GPUs memory, not only it&#8217;s VRAM. A GPU also has SRAM and Registers which are used whenever data computed by a kernel needs to be cached for the execution of another kernel, or copied back to VRAM and made accessible to the CPU.</p><p>Most last-gen GPUs have HBM (High Bandwidth Memory) which is more tuned for AI workloads than the GDDR-X memory used for consumer-grade GPUs.</p><ol start="3"><li><p><strong>Interconnect (Communication)</strong></p></li></ol><p>This defines how fast GPUs can communicate with each other, which is crucial for distributed training as most models are not trained or fine-tuned on a single GPU, but often involve a multi GPU cluster.</p><blockquote><p><strong>Note</strong>: Mistral 8x7B MoE was trained from scratch on 240 x H100 GPUs which, with this kind of setup being similar in most LLM pre-training runs. </p></blockquote><p>The key difference to make here is the connection interface, choosing between PCIe standard or SXM and NVLink, with the later being the go-to for large scale LLM training in distributed setups.</p><p>Evaluating a GPU option following these three pillars, across software capability, memory, and interconnect would filter the GPU options one is selecting from, and allowing you to tune the system after the specific requirements of your workloads.</p><div><hr></div><h2>5. Closing Thoughts</h2><p>The AI world moves fast, but the underlying questions don&#8217;t change:</p><ul><li><p><em>Can my GPU run the kernels I need?</em> &#8594; <strong>CC and Architecture</strong></p></li><li><p><em>Can I fit my model and batch size?</em> &#8594; <strong>VRAM &amp; Memory Type &amp; Bandwidth</strong></p></li><li><p><em>Can my GPUs communicate fast enough?</em> &#8594; <strong>PCIe &amp; SXM</strong></p></li></ul><p>Ultimately, the right choices for an AI engineer comes down to matching these core needs to the right tool, ecosystem and scalability requirements. Establishing the range of requirements for the AI Workload you&#8217;re working on (pre-training, fine tuning or inference) would simplify the process of selecting the right compute by a lot.</p><p>Thank you for reading, if you&#8217;ve enjoyed this article, consider subscribing for free.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/subscribe?"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[My Best Recent Guides for AI Engineers]]></title><description><![CDATA[A curated list of the most actionable guides I&#8217;ve published in the past months.]]></description><link>https://read.theaimerge.com/p/my-best-recent-guides-for-ai-engineers</link><guid isPermaLink="false">https://read.theaimerge.com/p/my-best-recent-guides-for-ai-engineers</guid><dc:creator><![CDATA[Alex Razvant]]></dc:creator><pubDate>Sat, 29 Nov 2025 14:02:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!bKK3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc712027e-2166-4f5b-bb07-4cf8645f4f5b_3750x3750.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Welcome to Neural Bits. Each week, I write about practical, production-ready AI/ML Engineering. Join over <strong><a href="https://multimodalai.substack.com/subscribe">7000+ engineers</a></strong> and learn to build real-world AI Systems.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p>In this week&#8217;s edition, I want to share three standout articles from my recent work that cover a mix of AI topics, including optimising and serving AI models both at scale and on Edge Hardware, and a few best practices for building Python Backends for your RAG or Agentic pipelines.</p><p>For each: a summary, why it&#8217;s valuable, and what you&#8217;ll learn by reading it.</p><div><hr></div><h2>1. Use <em>These 6 Advanced Concepts with FastAPI</em></h2><p>This article introduces six advanced concepts you could use when building backends and APIs with FastAPI. It&#8217;s especially oriented at developers working with FastAPI and Pydantic, to help structure and manage AI or ML applications more robustly. </p><p>Topics include model lifecycle (loading/unloading), state management, dependency injection, configuration management, and best practices for production-ready code.</p><p><strong>Why it&#8217;s a good resource:</strong></p><ul><li><p>It brings engineering discipline to AI projects, showing you how to use the FastAPI app lifecycle hook, properly work with Pydantic configurations, and write robust, scalable Python code.</p></li><li><p>It covers some pitfalls around code structure, configuration, and how to efficiently use the DTO (<strong>D</strong>ata <strong>T</strong>ransfer <strong>O</strong>bject) design pattern with Pydantic to exchange data between your service layers.</p></li></ul><p><strong>What you&#8217;ll learn:</strong></p><ul><li><p>How and when to use dependency-injection in FastAPI for your ML/AI applications.</p></li><li><p>Best practices for model loading/unloading, managing state, and building maintainable code.</p></li><li><p>How to manage FastAPI&#8217;s application state.</p></li><li><p>How to properly use PydanticSettings for your secrets and environment variables.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2KwQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40ff9f5f-dc81-4e09-8e99-bd6c20f09a5e_2400x2400.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2KwQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40ff9f5f-dc81-4e09-8e99-bd6c20f09a5e_2400x2400.png 424w, https://substackcdn.com/image/fetch/$s_!2KwQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40ff9f5f-dc81-4e09-8e99-bd6c20f09a5e_2400x2400.png 848w, https://substackcdn.com/image/fetch/$s_!2KwQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40ff9f5f-dc81-4e09-8e99-bd6c20f09a5e_2400x2400.png 1272w, https://substackcdn.com/image/fetch/$s_!2KwQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40ff9f5f-dc81-4e09-8e99-bd6c20f09a5e_2400x2400.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2KwQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40ff9f5f-dc81-4e09-8e99-bd6c20f09a5e_2400x2400.png" width="1456" height="1456" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/40ff9f5f-dc81-4e09-8e99-bd6c20f09a5e_2400x2400.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1456,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2KwQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40ff9f5f-dc81-4e09-8e99-bd6c20f09a5e_2400x2400.png 424w, https://substackcdn.com/image/fetch/$s_!2KwQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40ff9f5f-dc81-4e09-8e99-bd6c20f09a5e_2400x2400.png 848w, https://substackcdn.com/image/fetch/$s_!2KwQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40ff9f5f-dc81-4e09-8e99-bd6c20f09a5e_2400x2400.png 1272w, https://substackcdn.com/image/fetch/$s_!2KwQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40ff9f5f-dc81-4e09-8e99-bd6c20f09a5e_2400x2400.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;49595a9a-e4a3-4a35-a420-093868fb0e43&quot;,&quot;caption&quot;:&quot;&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;6 advanced concepts to use with FastAPI &amp; Pydantic&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:102147316,&quot;name&quot;:&quot;Alex Razvant&quot;,&quot;bio&quot;:&quot;Senior AI Engineer | I work on large-scale Vision AI &amp; MLOps | I share practical industry insights for AI/ML Engineers, on building production-ready AI Systems.&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e98b89ac-97e9-4875-88b6-2a5039668cb2_1700x1700.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-05-31T07:01:09.874Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!2KwQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40ff9f5f-dc81-4e09-8e99-bd6c20f09a5e_2400x2400.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://multimodalai.substack.com/p/start-using-these-6-advanced-concepts&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:163543189,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:36,&quot;comment_count&quot;:5,&quot;publication_id&quot;:2799726,&quot;publication_name&quot;:&quot;Neural Bits&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!PLDd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4f14526-b620-40f9-9baf-78669ebe4997_1280x1280.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div><hr></div><h2>2. An AI Engineer&#8217;s Guide to Inference Engines and Frameworks</h2><p>This guide describes the most popular Inference Engines and Frameworks an AI Engineer would use to port trained models into deployed, usable systems. Be it classical Deep Learning Models, LLMs, Finetuned LLMs or VLMs, this guide explains inference engines, serving frameworks, and what it takes to reliably serve AI models in production (latency, throughput, scalability, infrastructure).</p><p><strong>Why it&#8217;s a good resource:</strong></p><ul><li><p>Provides a comprehensive overview of all the libraries and frameworks for AI Inference, used within Industry.</p></li><li><p>It&#8217;s practical and engineering-oriented: useful for anyone building real-world AI applications that aim to deploy at any scale.</p></li></ul><p><strong>What you&#8217;ll learn:</strong></p><ul><li><p>The model-to-production lifecycle.</p></li><li><p>How to select the Inference Engine and Framework for your model size, scale, system architecture and latency constraints.</p></li><li><p>The scope and inner workings of each engine and framework.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bKK3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc712027e-2166-4f5b-bb07-4cf8645f4f5b_3750x3750.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bKK3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc712027e-2166-4f5b-bb07-4cf8645f4f5b_3750x3750.png 424w, https://substackcdn.com/image/fetch/$s_!bKK3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc712027e-2166-4f5b-bb07-4cf8645f4f5b_3750x3750.png 848w, https://substackcdn.com/image/fetch/$s_!bKK3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc712027e-2166-4f5b-bb07-4cf8645f4f5b_3750x3750.png 1272w, https://substackcdn.com/image/fetch/$s_!bKK3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc712027e-2166-4f5b-bb07-4cf8645f4f5b_3750x3750.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bKK3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc712027e-2166-4f5b-bb07-4cf8645f4f5b_3750x3750.png" width="1456" height="1456" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c712027e-2166-4f5b-bb07-4cf8645f4f5b_3750x3750.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1456,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1729560,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/180238573?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc712027e-2166-4f5b-bb07-4cf8645f4f5b_3750x3750.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bKK3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc712027e-2166-4f5b-bb07-4cf8645f4f5b_3750x3750.png 424w, https://substackcdn.com/image/fetch/$s_!bKK3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc712027e-2166-4f5b-bb07-4cf8645f4f5b_3750x3750.png 848w, https://substackcdn.com/image/fetch/$s_!bKK3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc712027e-2166-4f5b-bb07-4cf8645f4f5b_3750x3750.png 1272w, https://substackcdn.com/image/fetch/$s_!bKK3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc712027e-2166-4f5b-bb07-4cf8645f4f5b_3750x3750.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;855da625-ef5b-4fc6-87db-41f109ed335b&quot;,&quot;caption&quot;:&quot;&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;The AI Engineer's Guide to Inference Engines and Frameworks&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:102147316,&quot;name&quot;:&quot;Alex Razvant&quot;,&quot;bio&quot;:&quot;Senior AI Engineer | I work on large-scale Vision AI &amp; MLOps | I share practical industry insights for AI/ML Engineers, on building production-ready AI Systems.&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e98b89ac-97e9-4875-88b6-2a5039668cb2_1700x1700.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-08-21T08:01:13.718Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!1oH-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81ab0846-9a02-433f-9c7d-1bc23dbcd904_1940x1946.gif&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://multimodalai.substack.com/p/the-ai-engineers-guide-to-inference&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:171119788,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:31,&quot;comment_count&quot;:3,&quot;publication_id&quot;:2799726,&quot;publication_name&quot;:&quot;Neural Bits&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!PLDd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4f14526-b620-40f9-9baf-78669ebe4997_1280x1280.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div><hr></div><h2>3. <em>An AI Engineer&#8217;s Guide to Running LLMs on CPUs, GPUs and Edge (llama.cpp / GGML / GGUF)</em></h2><p>This video guide explains how llama.cpp, GGML and GGUF work and how you can run LLMs locally - on laptop CPUs, mobile/edge devices, or consumer hardware. A large set of LLMs has big parameter counts and requires powerful GPUs with 20GB+ of VRAM to serve them. On the other hand, llama.cpp can serve quantised GGUF models that maintain close performance and accuracy, while drastically reducing the memory requirement by up to 4-5x times. </p><p><strong>Why it&#8217;s a good resource:</strong></p><ul><li><p>It describes how model quantisations work and how GGUF compresses model weights.</p></li><li><p>It&#8217;s a practical guide for AI Engineers aiming to build local, offline, or edge-based AI applications, including AI Agents or Agentic Systems.</p></li></ul><p><strong>What you&#8217;ll learn:</strong></p><ul><li><p>What is llama.cpp / GGML / GGUF, how they work end-to-end, and why they enable inference on a wide variety of hardware (CPU, low-end GPU, edge devices).</p></li><li><p>How AI Engineers can inspect the layers of a GGUF model, and where to find GGUF models.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!W9Wr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cda044-e1b8-4590-b2a5-7bc6a946c4d1_8193x5146.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!W9Wr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cda044-e1b8-4590-b2a5-7bc6a946c4d1_8193x5146.png 424w, https://substackcdn.com/image/fetch/$s_!W9Wr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cda044-e1b8-4590-b2a5-7bc6a946c4d1_8193x5146.png 848w, https://substackcdn.com/image/fetch/$s_!W9Wr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cda044-e1b8-4590-b2a5-7bc6a946c4d1_8193x5146.png 1272w, https://substackcdn.com/image/fetch/$s_!W9Wr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cda044-e1b8-4590-b2a5-7bc6a946c4d1_8193x5146.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!W9Wr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cda044-e1b8-4590-b2a5-7bc6a946c4d1_8193x5146.png" width="1456" height="915" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/41cda044-e1b8-4590-b2a5-7bc6a946c4d1_8193x5146.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:915,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!W9Wr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cda044-e1b8-4590-b2a5-7bc6a946c4d1_8193x5146.png 424w, https://substackcdn.com/image/fetch/$s_!W9Wr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cda044-e1b8-4590-b2a5-7bc6a946c4d1_8193x5146.png 848w, https://substackcdn.com/image/fetch/$s_!W9Wr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cda044-e1b8-4590-b2a5-7bc6a946c4d1_8193x5146.png 1272w, https://substackcdn.com/image/fetch/$s_!W9Wr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cda044-e1b8-4590-b2a5-7bc6a946c4d1_8193x5146.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;476c625c-0702-4c0c-a612-0ff999cb462b&quot;,&quot;caption&quot;:&quot;&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;An AI Engineer's Guide on porting LLMs to Edge Devices&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:102147316,&quot;name&quot;:&quot;Alex Razvant&quot;,&quot;bio&quot;:&quot;Senior AI Engineer | I work on large-scale Vision AI &amp; MLOps | I share practical industry insights for AI/ML Engineers, on building production-ready AI Systems.&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e98b89ac-97e9-4875-88b6-2a5039668cb2_1700x1700.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-10-18T13:19:46.690Z&quot;,&quot;cover_image&quot;:&quot;https://substack-video.s3.amazonaws.com/video_upload/post/176485447/63ff47f8-d690-481b-9f0d-88d88b8bb32d/transcoded-20808.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://multimodalai.substack.com/p/an-ai-engineers-guide-to-running&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:&quot;63ff47f8-d690-481b-9f0d-88d88b8bb32d&quot;,&quot;id&quot;:176485447,&quot;type&quot;:&quot;podcast&quot;,&quot;reaction_count&quot;:39,&quot;comment_count&quot;:0,&quot;publication_id&quot;:2799726,&quot;publication_name&quot;:&quot;Neural Bits&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!PLDd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4f14526-b620-40f9-9baf-78669ebe4997_1280x1280.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div><hr></div><h2>Ending Notes</h2><p>Thanks for following along as I&#8217;ve been diving into the engineering side of AI these past couple of months.  My goal with all these articles and guides has been to share and educate more developers to build real, practical AI systems past just demos.</p><p>This newsletter has been growing steadily and organically thanks to your support - and I&#8217;m incredibly grateful for that. &#128588;</p><p>I&#8217;ve also been able to carve out more time recently, and I&#8217;ve started working on several big initiatives that I think will push this newsletter (and the whole project) into a new phase.</p><p><strong>I can&#8217;t wait to share what I&#8217;ve been building, and what&#8217;s coming next!</strong></p>]]></content:encoded></item><item><title><![CDATA[Small VLMs Will Soon Compete With Frontier AI Models 10x Their Size]]></title><description><![CDATA[What makes NVIDIA Nemotron Nano 2 VL a breakthrough in small, fast, long-context visual reasoning.]]></description><link>https://read.theaimerge.com/p/small-vlms-will-soon-compete-with</link><guid isPermaLink="false">https://read.theaimerge.com/p/small-vlms-will-soon-compete-with</guid><dc:creator><![CDATA[Alex Razvant]]></dc:creator><pubDate>Sat, 22 Nov 2025 14:58:39 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!6fOc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F373ea7c3-9905-40ec-9406-abbac6ed7a97_3300x2056.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Welcome to Neural Bits. Each week, I write about practical, production-ready AI/ML Engineering. Join over <strong><a href="https://multimodalai.substack.com/subscribe">7000+ engineers</a></strong> and learn to build real-world AI Systems.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p>The current edition of this newsletter is the second part in a small series titled <em><strong>&#8220;The Future of Agentic AI is Small&#8221;</strong></em>, where we unpack the technical details of NVIDIA&#8217;s Nemotron Family, a set of models, datasets, and techniques that push the boundary of Agentic AI to smaller, open, and more efficient models.</p><p>In the first part, we&#8217;ve covered the model family on a high level, spanning Nano 1B-15B models for Edge, Super 16B-50B for mid-tier, and Ultra 50B+ parameter models, which compete with frontier-level models on various benchmarks.</p><p>In the second part, we&#8217;ll focus on the multimodal star of the NVIDIA Nemotron Nano models, the Nano 2 VL 12B, released just a few weeks ago. </p><p>The Nano 2 VL 12B is the current leading open SVLM in the OCRBenchv2 benchmark, a benchmark designed to evaluate enterprise-scale document, invoices, and complex image understanding.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7MDj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb9b676f-4053-4545-9323-fa6846c46327_2802x1344.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7MDj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb9b676f-4053-4545-9323-fa6846c46327_2802x1344.png 424w, https://substackcdn.com/image/fetch/$s_!7MDj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb9b676f-4053-4545-9323-fa6846c46327_2802x1344.png 848w, https://substackcdn.com/image/fetch/$s_!7MDj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb9b676f-4053-4545-9323-fa6846c46327_2802x1344.png 1272w, https://substackcdn.com/image/fetch/$s_!7MDj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb9b676f-4053-4545-9323-fa6846c46327_2802x1344.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7MDj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb9b676f-4053-4545-9323-fa6846c46327_2802x1344.png" width="1456" height="698" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/eb9b676f-4053-4545-9323-fa6846c46327_2802x1344.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:698,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:443156,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176277074?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb9b676f-4053-4545-9323-fa6846c46327_2802x1344.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!7MDj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb9b676f-4053-4545-9323-fa6846c46327_2802x1344.png 424w, https://substackcdn.com/image/fetch/$s_!7MDj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb9b676f-4053-4545-9323-fa6846c46327_2802x1344.png 848w, https://substackcdn.com/image/fetch/$s_!7MDj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb9b676f-4053-4545-9323-fa6846c46327_2802x1344.png 1272w, https://substackcdn.com/image/fetch/$s_!7MDj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb9b676f-4053-4545-9323-fa6846c46327_2802x1344.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The Open NVIDIA Nemotron Nano 2 VL 12B model competes with Frontier Level AI Models on OCR, Multi-Image Reasoning, and Understanding.</figcaption></figure></div><p>We&#8217;ll cover the architecture, the text encoder, and the vision encoder that the Nano 2 VL uses, and explain the architectural improvements, the plug-and-play optimizers, reasoning modes, and more.</p><p>In this mini-series:<br>&#8594;<strong> &#9989; </strong><a href="https://multimodalai.substack.com/p/the-future-of-agentic-ai-is-small">Part I - The Nano 2 Family of SLMs for best-in-class Reasoning Models</a><strong><br></strong>&#8594; <strong>&#9989; </strong>Part II - The Nano 2 VL Model for Agentic AI capabilities on Vision Tasks</p><div><hr></div><h2>1. The Nemotron Nano 2 VL 12B</h2><p>The Nano V2 VL was designed for strong real-world document understanding, long video comprehension, and multimodal reasoning. Compared to its predecessor, the Llama&#8209;3.1&#8209;Nemotron&#8209;Nano&#8209;VL&#8209;8B, this version packs improvements across multiple vision benchmarks, notably on complex OCR-related benchmarks and Video/Image reasoning ones.</p><p>It does that through enhancements in architecture, image processing tweaks, dataset curation, training recipes, and inference optimizations, all of which are described in the research paper, and which we&#8217;ll cover in this article.</p><p>To outline a summary of the improvements Nano 2 VL brings:</p><ul><li><p><strong>Leading accuracy</strong> on document/OCR/vision-language tasks, placing Top 1 in SLM Open Models and Top 3 competing with frontier models such as Gemini 2.5 Pro.</p></li><li><p><strong>Context handling</strong> from 16k tokens in the previous Nano VL (v1), up to 128k context window, enabling very long documents / long videos / multi-page inputs / complex reasoning.</p></li><li><p><strong>Architecturally</strong>, built on a hybrid &#8220;Mamba-Transformer&#8221; backbone, bringing faster inference due to the linear compute time that Mamba + State Space Models (SSM) brings, as well as a powerful Vision Encoder trained on multi-scale resolution images.</p></li><li><p><strong>Throughput</strong> in video handling with &#8220;Efficient Video Sampling (EVS)&#8221;, a technique to reduce redundant tokens in long videos and multi-image setups.</p></li></ul><p>To understand the impact of these improvements that Nano v2 VL brings, first, we need to briefly cover the previous iteration of this VLM and pinpoint the performance, accuracy, its architecture, and rankings.</p><h3>1.1 The Nemotron Nano VL - 8B (previous version)</h3><p>The previous Nemotron VLM was built on the powerful Meta Llama 3.1 architecture for the Language Decoder and the C-Radiov2-H Vision Encoder by NVIDIA. The language decoder in the first version, <strong>Llama-3.1-Instruct-8B,</strong> is Meta&#8217;s mid-sized instruction-tuned LLM for high-quality reasoning and task-following.</p><p>Being an Instruct model, during post-training, it was aligned to adhere to user prompts and preferences, making it perform reliably in conversational tasks.</p><p>Architecturally, Llama-3.1-Instruct-8B uses a decoder-only Transformer with grouped-query attention that helps inference throughput, but we&#8217;ll see in a bit how that differs from what the Text Decoder in Nano 2 VL brings.</p><p>For the Vision Encoder, the previous Nemotron VL model used NVIDIA RADIOv2 Vision Encoder. This encoder was built under a paradigm called &#8220;agglomerative modeling&#8221;. That means that instead of relying on a single specialized teacher model, the design distills multiple teacher vision models simultaneously into a single student backbone that learns to mimic all of them across all resolutions. We&#8217;ll see more details on this one in a bit.</p><p>Now, let&#8217;s present an overview of what we&#8217;ve discussed above, in the following Figure.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QZ1d!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f05e586-3e05-49b3-a54c-b396fd6cf1fd_2860x1446.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QZ1d!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f05e586-3e05-49b3-a54c-b396fd6cf1fd_2860x1446.png 424w, https://substackcdn.com/image/fetch/$s_!QZ1d!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f05e586-3e05-49b3-a54c-b396fd6cf1fd_2860x1446.png 848w, https://substackcdn.com/image/fetch/$s_!QZ1d!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f05e586-3e05-49b3-a54c-b396fd6cf1fd_2860x1446.png 1272w, https://substackcdn.com/image/fetch/$s_!QZ1d!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f05e586-3e05-49b3-a54c-b396fd6cf1fd_2860x1446.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QZ1d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f05e586-3e05-49b3-a54c-b396fd6cf1fd_2860x1446.png" width="1456" height="736" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f05e586-3e05-49b3-a54c-b396fd6cf1fd_2860x1446.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:736,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:528122,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176277074?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f05e586-3e05-49b3-a54c-b396fd6cf1fd_2860x1446.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QZ1d!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f05e586-3e05-49b3-a54c-b396fd6cf1fd_2860x1446.png 424w, https://substackcdn.com/image/fetch/$s_!QZ1d!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f05e586-3e05-49b3-a54c-b396fd6cf1fd_2860x1446.png 848w, https://substackcdn.com/image/fetch/$s_!QZ1d!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f05e586-3e05-49b3-a54c-b396fd6cf1fd_2860x1446.png 1272w, https://substackcdn.com/image/fetch/$s_!QZ1d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f05e586-3e05-49b3-a54c-b396fd6cf1fd_2860x1446.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 1. An overview of the previous Nemotron Nano VL model, including benchmark scores, architecture design, and notes.</figcaption></figure></div><p>Although it&#8217;s an SVLM (Small Vision Language Model), with only 8B parameters, it still ranked high on multiple Multimodal Tasks, including AI2D, OCRBenchv2, and ChartQA. Just to get an idea of what the data from these benchmarks looks like, let&#8217;s inspect a few samples from the AI2D Benchmark, where the Nemotron Nano VL (v1) scored 85% accuracy.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5n21!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c5ab3a-f456-402b-9d0f-807a1adcabdd_1854x1072.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5n21!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c5ab3a-f456-402b-9d0f-807a1adcabdd_1854x1072.png 424w, https://substackcdn.com/image/fetch/$s_!5n21!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c5ab3a-f456-402b-9d0f-807a1adcabdd_1854x1072.png 848w, https://substackcdn.com/image/fetch/$s_!5n21!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c5ab3a-f456-402b-9d0f-807a1adcabdd_1854x1072.png 1272w, https://substackcdn.com/image/fetch/$s_!5n21!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c5ab3a-f456-402b-9d0f-807a1adcabdd_1854x1072.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5n21!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c5ab3a-f456-402b-9d0f-807a1adcabdd_1854x1072.png" width="1456" height="842" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/91c5ab3a-f456-402b-9d0f-807a1adcabdd_1854x1072.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:842,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:317283,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176277074?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c5ab3a-f456-402b-9d0f-807a1adcabdd_1854x1072.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5n21!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c5ab3a-f456-402b-9d0f-807a1adcabdd_1854x1072.png 424w, https://substackcdn.com/image/fetch/$s_!5n21!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c5ab3a-f456-402b-9d0f-807a1adcabdd_1854x1072.png 848w, https://substackcdn.com/image/fetch/$s_!5n21!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c5ab3a-f456-402b-9d0f-807a1adcabdd_1854x1072.png 1272w, https://substackcdn.com/image/fetch/$s_!5n21!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91c5ab3a-f456-402b-9d0f-807a1adcabdd_1854x1072.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 2: A Screenshot from the AI2D benchmarking datasets on HuggingFace.</figcaption></figure></div><p>And to see a zoomed-in sample of an image in this set (3rd row), we can reason the complexity of the Task, the model having to reason across all the animals in the image, and also &#8220;understand&#8221; the connections between the arrows and the question &amp; options presented:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tK55!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e30f9d8-04b7-46f1-aa66-b19f74a3904c_1036x712.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tK55!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e30f9d8-04b7-46f1-aa66-b19f74a3904c_1036x712.png 424w, https://substackcdn.com/image/fetch/$s_!tK55!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e30f9d8-04b7-46f1-aa66-b19f74a3904c_1036x712.png 848w, https://substackcdn.com/image/fetch/$s_!tK55!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e30f9d8-04b7-46f1-aa66-b19f74a3904c_1036x712.png 1272w, https://substackcdn.com/image/fetch/$s_!tK55!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e30f9d8-04b7-46f1-aa66-b19f74a3904c_1036x712.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tK55!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e30f9d8-04b7-46f1-aa66-b19f74a3904c_1036x712.png" width="470" height="323.011583011583" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1e30f9d8-04b7-46f1-aa66-b19f74a3904c_1036x712.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:712,&quot;width&quot;:1036,&quot;resizeWidth&quot;:470,&quot;bytes&quot;:601137,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176277074?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e30f9d8-04b7-46f1-aa66-b19f74a3904c_1036x712.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!tK55!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e30f9d8-04b7-46f1-aa66-b19f74a3904c_1036x712.png 424w, https://substackcdn.com/image/fetch/$s_!tK55!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e30f9d8-04b7-46f1-aa66-b19f74a3904c_1036x712.png 848w, https://substackcdn.com/image/fetch/$s_!tK55!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e30f9d8-04b7-46f1-aa66-b19f74a3904c_1036x712.png 1272w, https://substackcdn.com/image/fetch/$s_!tK55!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e30f9d8-04b7-46f1-aa66-b19f74a3904c_1036x712.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 3. A zoomed-in image from the AI2D dataset, outlining the complex connections and visual context in the dataset samples.</figcaption></figure></div><p>Now that we have a complete overview of the previous Nemotron Nano VL version, let&#8217;s follow the same process for the Nemotron Nano 2 VL.</p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/p/small-vlms-will-soon-compete-with?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Neural Bits! This post is public, so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/p/small-vlms-will-soon-compete-with?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/p/small-vlms-will-soon-compete-with?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h3>1.2 The Nemotron Nano 2 VL - 12B (the new version)</h3><p>We could consider the Nano 2 VL model as built from the ground up, bringing changes to the Vision Encoder, Language Decoder, Post Training methods, and Image/Video processing workflow.</p><p>The Nano 2 VL builds on the Nemotron Nano 2 12B Language Model, this time, which is a more efficient and robust architecture compared to the Llama 3.1 used in the previous version. The Nano 2 - 12B LLM is a decoder-only stack where standard Transformer blocks are interleaved with Mamba-2 style state-space layers to improve efficiency and long-context scaling.</p><blockquote><p><strong>Note: </strong>We&#8217;ve covered the Nemotron Nano 2 12B Text Encoder model in the Part I of this article. <br>&#8594; <strong><a href="https://multimodalai.substack.com/p/the-future-of-agentic-ai-is-small">Read it here.</a></strong></p></blockquote><p>The Vision Encoder uses the same paradigm of &#8220;agglomerative models&#8221; but with a newer variant, <strong>c-RADIOv2-VLM-H</strong>, replacing the previous base and benefiting from improved multi-teacher distillation, multi-resolution consistency, and stronger dense features and robustness.</p><p>To put everything in a single Figure, we&#8217;ll have:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4Vv2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2309b09-4b6e-455f-b947-8d298230ae8e_1762x1008.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4Vv2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2309b09-4b6e-455f-b947-8d298230ae8e_1762x1008.png 424w, https://substackcdn.com/image/fetch/$s_!4Vv2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2309b09-4b6e-455f-b947-8d298230ae8e_1762x1008.png 848w, https://substackcdn.com/image/fetch/$s_!4Vv2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2309b09-4b6e-455f-b947-8d298230ae8e_1762x1008.png 1272w, https://substackcdn.com/image/fetch/$s_!4Vv2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2309b09-4b6e-455f-b947-8d298230ae8e_1762x1008.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4Vv2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2309b09-4b6e-455f-b947-8d298230ae8e_1762x1008.png" width="1456" height="833" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e2309b09-4b6e-455f-b947-8d298230ae8e_1762x1008.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:833,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:239998,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176277074?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2309b09-4b6e-455f-b947-8d298230ae8e_1762x1008.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4Vv2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2309b09-4b6e-455f-b947-8d298230ae8e_1762x1008.png 424w, https://substackcdn.com/image/fetch/$s_!4Vv2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2309b09-4b6e-455f-b947-8d298230ae8e_1762x1008.png 848w, https://substackcdn.com/image/fetch/$s_!4Vv2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2309b09-4b6e-455f-b947-8d298230ae8e_1762x1008.png 1272w, https://substackcdn.com/image/fetch/$s_!4Vv2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2309b09-4b6e-455f-b947-8d298230ae8e_1762x1008.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 4: Overview of the Nemotron Nano 2 VL 12B model, describing the Language Decoder and Vision Encoder models used.</figcaption></figure></div><p>This time, the Nano 2 VL model is the leading open SVLM on the OCRBenchV2. To inspect a few samples of this benchmark, we have very complex use cases across invoices, documents, charts, and banners with tasks on Text Recognition, Ad Placement, Math Calculation, VQA (Visual Question Answering), and Text Extraction.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ycBf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b73eb07-e9ed-4375-a901-2632d45ef095_1685x1401.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ycBf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b73eb07-e9ed-4375-a901-2632d45ef095_1685x1401.png 424w, https://substackcdn.com/image/fetch/$s_!ycBf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b73eb07-e9ed-4375-a901-2632d45ef095_1685x1401.png 848w, https://substackcdn.com/image/fetch/$s_!ycBf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b73eb07-e9ed-4375-a901-2632d45ef095_1685x1401.png 1272w, https://substackcdn.com/image/fetch/$s_!ycBf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b73eb07-e9ed-4375-a901-2632d45ef095_1685x1401.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ycBf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b73eb07-e9ed-4375-a901-2632d45ef095_1685x1401.png" width="1456" height="1211" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2b73eb07-e9ed-4375-a901-2632d45ef095_1685x1401.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1211,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ycBf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b73eb07-e9ed-4375-a901-2632d45ef095_1685x1401.png 424w, https://substackcdn.com/image/fetch/$s_!ycBf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b73eb07-e9ed-4375-a901-2632d45ef095_1685x1401.png 848w, https://substackcdn.com/image/fetch/$s_!ycBf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b73eb07-e9ed-4375-a901-2632d45ef095_1685x1401.png 1272w, https://substackcdn.com/image/fetch/$s_!ycBf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b73eb07-e9ed-4375-a901-2632d45ef095_1685x1401.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 5: A view of the samples and tasks in the OCRBenchV2 Benchmark.</figcaption></figure></div><p>Now, let&#8217;s compare them side-by-side using a bar-chart across a variety of Multimodal Benchmarks, designed for Document Understanding and Image/Video reasoning tasks:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UlQX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de78378-7409-4e6a-8801-a73346ba44b1_3408x1864.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UlQX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de78378-7409-4e6a-8801-a73346ba44b1_3408x1864.png 424w, https://substackcdn.com/image/fetch/$s_!UlQX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de78378-7409-4e6a-8801-a73346ba44b1_3408x1864.png 848w, https://substackcdn.com/image/fetch/$s_!UlQX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de78378-7409-4e6a-8801-a73346ba44b1_3408x1864.png 1272w, https://substackcdn.com/image/fetch/$s_!UlQX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de78378-7409-4e6a-8801-a73346ba44b1_3408x1864.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UlQX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de78378-7409-4e6a-8801-a73346ba44b1_3408x1864.png" width="1456" height="796" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6de78378-7409-4e6a-8801-a73346ba44b1_3408x1864.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:796,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1185555,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176277074?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de78378-7409-4e6a-8801-a73346ba44b1_3408x1864.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UlQX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de78378-7409-4e6a-8801-a73346ba44b1_3408x1864.png 424w, https://substackcdn.com/image/fetch/$s_!UlQX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de78378-7409-4e6a-8801-a73346ba44b1_3408x1864.png 848w, https://substackcdn.com/image/fetch/$s_!UlQX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de78378-7409-4e6a-8801-a73346ba44b1_3408x1864.png 1272w, https://substackcdn.com/image/fetch/$s_!UlQX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6de78378-7409-4e6a-8801-a73346ba44b1_3408x1864.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 6: Comparing Nemotron Nano VL (previous version) with the current Nemotron Nano 2 VL across Multimodal Benchmarks.</figcaption></figure></div><p>Now that we have a clear idea of how these models are different and what improvements the Nano 2 VL brings, let&#8217;s inspect in more detail the interesting parts of the Vision Backbone (the RADIO Encoder) and the techniques used to align this model in post-training, as well as why EVS is important and how it works.</p><h2>2. Understanding the RADIO Vision Encoder</h2><p><strong>RADIOv2.5</strong> is an &#8220;agglomerative&#8221; vision encoder by NVIDIA, which is trained by distilling multiple top VFMs (Vision Foundation Models) such as OpenAI CLIP, Meta DINO, and Meta SAM into a single backbone. </p><p>Instead of inheriting the bias of one teacher, it learns the strengths of many teachers, keeping global semantics, dense features, and segmentation-friendly spatial maps. An overview of that process could be seen in the following Figure.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZO8O!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F948aefd9-cfeb-4256-82e3-1e204c84e66a_3772x840.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZO8O!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F948aefd9-cfeb-4256-82e3-1e204c84e66a_3772x840.png 424w, https://substackcdn.com/image/fetch/$s_!ZO8O!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F948aefd9-cfeb-4256-82e3-1e204c84e66a_3772x840.png 848w, https://substackcdn.com/image/fetch/$s_!ZO8O!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F948aefd9-cfeb-4256-82e3-1e204c84e66a_3772x840.png 1272w, https://substackcdn.com/image/fetch/$s_!ZO8O!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F948aefd9-cfeb-4256-82e3-1e204c84e66a_3772x840.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZO8O!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F948aefd9-cfeb-4256-82e3-1e204c84e66a_3772x840.png" width="1456" height="324" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/948aefd9-cfeb-4256-82e3-1e204c84e66a_3772x840.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:324,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:381699,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176277074?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F948aefd9-cfeb-4256-82e3-1e204c84e66a_3772x840.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!ZO8O!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F948aefd9-cfeb-4256-82e3-1e204c84e66a_3772x840.png 424w, https://substackcdn.com/image/fetch/$s_!ZO8O!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F948aefd9-cfeb-4256-82e3-1e204c84e66a_3772x840.png 848w, https://substackcdn.com/image/fetch/$s_!ZO8O!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F948aefd9-cfeb-4256-82e3-1e204c84e66a_3772x840.png 1272w, https://substackcdn.com/image/fetch/$s_!ZO8O!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F948aefd9-cfeb-4256-82e3-1e204c84e66a_3772x840.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Figure 7: Multi-teacher distillation of VFMs (Vision Foundational Models) into a single backbone, RADIO2.5.</figcaption></figure></div><p>Document understanding or encoding images with complex details is a difficult task for Vision Models. Small text, skewed images, or low-resolution images pose a challenge for pretty much any VLM. The RADIO encoder mitigates that with multi-resolution consistency. Earlier encoders produced different features at different resolutions. RADIOv2.5, on the other hand, is trained with paired low/high-res teacher signals, so its features stay consistent across scales. </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/subscribe?"><span>Subscribe now</span></a></p><p>Let&#8217;s understand how exactly that works, using the following Figure 8:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!G2Od!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5b48274-c3cf-4b23-bbf6-9c66695d857a_2842x2010.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!G2Od!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5b48274-c3cf-4b23-bbf6-9c66695d857a_2842x2010.png 424w, https://substackcdn.com/image/fetch/$s_!G2Od!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5b48274-c3cf-4b23-bbf6-9c66695d857a_2842x2010.png 848w, https://substackcdn.com/image/fetch/$s_!G2Od!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5b48274-c3cf-4b23-bbf6-9c66695d857a_2842x2010.png 1272w, https://substackcdn.com/image/fetch/$s_!G2Od!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5b48274-c3cf-4b23-bbf6-9c66695d857a_2842x2010.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!G2Od!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5b48274-c3cf-4b23-bbf6-9c66695d857a_2842x2010.png" width="1456" height="1030" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b5b48274-c3cf-4b23-bbf6-9c66695d857a_2842x2010.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1030,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2999285,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176277074?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5b48274-c3cf-4b23-bbf6-9c66695d857a_2842x2010.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!G2Od!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5b48274-c3cf-4b23-bbf6-9c66695d857a_2842x2010.png 424w, https://substackcdn.com/image/fetch/$s_!G2Od!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5b48274-c3cf-4b23-bbf6-9c66695d857a_2842x2010.png 848w, https://substackcdn.com/image/fetch/$s_!G2Od!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5b48274-c3cf-4b23-bbf6-9c66695d857a_2842x2010.png 1272w, https://substackcdn.com/image/fetch/$s_!G2Od!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5b48274-c3cf-4b23-bbf6-9c66695d857a_2842x2010.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 8: How Multi-teacher distillation of (CLIP, SAM, Dino) works in training the RADIO Vision Encoder.</figcaption></figure></div><p>Here, we have 4 configurations (iterations) of a model training step. Each mode uses a different Teacher configuration, enabling the student to learn both features at high resolution and at low resolution at the same time, thus generalizing better and maintaining accuracy.</p><p>Another feature of RADIOv2.5 is token merging. This compresses redundant regions while preserving important details, and helps keep the token counts low, which translates into the encoder being capable of processing more Images at once, or having longer videos passed as input. </p><blockquote><p><strong>Note:</strong> This is particularly important for high-resolution images passed as input, as they&#8217;re split into multiple tiles before being passed to the model. Merging tokens, helps keeping the information density high with fewer tokens, something that might cause challenges for other Vision Encoders, as preserving each token will quickly fill-up the context window.</p></blockquote><p>Now that we&#8217;ve covered the internals of how the RADIOv2.5 encoder works, we could use Figure 9 from the RADIOv2.5 research paper to sum up an overview:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NwwY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a38e4d-d32f-4857-a40f-519d0b7ad4bc_3048x1302.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NwwY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a38e4d-d32f-4857-a40f-519d0b7ad4bc_3048x1302.png 424w, https://substackcdn.com/image/fetch/$s_!NwwY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a38e4d-d32f-4857-a40f-519d0b7ad4bc_3048x1302.png 848w, https://substackcdn.com/image/fetch/$s_!NwwY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a38e4d-d32f-4857-a40f-519d0b7ad4bc_3048x1302.png 1272w, https://substackcdn.com/image/fetch/$s_!NwwY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a38e4d-d32f-4857-a40f-519d0b7ad4bc_3048x1302.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NwwY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a38e4d-d32f-4857-a40f-519d0b7ad4bc_3048x1302.png" width="1456" height="622" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/83a38e4d-d32f-4857-a40f-519d0b7ad4bc_3048x1302.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:622,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1839216,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176277074?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a38e4d-d32f-4857-a40f-519d0b7ad4bc_3048x1302.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!NwwY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a38e4d-d32f-4857-a40f-519d0b7ad4bc_3048x1302.png 424w, https://substackcdn.com/image/fetch/$s_!NwwY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a38e4d-d32f-4857-a40f-519d0b7ad4bc_3048x1302.png 848w, https://substackcdn.com/image/fetch/$s_!NwwY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a38e4d-d32f-4857-a40f-519d0b7ad4bc_3048x1302.png 1272w, https://substackcdn.com/image/fetch/$s_!NwwY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83a38e4d-d32f-4857-a40f-519d0b7ad4bc_3048x1302.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 9: The improvements that Radio2.5-H brings over the previous iterations of agglomerative models (e.g, RADIO2.1 used in the previous version of this VL)</figcaption></figure></div><p>And as a last step of this section, let&#8217;s see a few benchmark results across multiple image-feature extraction tasks:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8gy1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3f568e-0e37-4c6e-bbc7-f12d42a2a83e_3028x842.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8gy1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3f568e-0e37-4c6e-bbc7-f12d42a2a83e_3028x842.png 424w, https://substackcdn.com/image/fetch/$s_!8gy1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3f568e-0e37-4c6e-bbc7-f12d42a2a83e_3028x842.png 848w, https://substackcdn.com/image/fetch/$s_!8gy1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3f568e-0e37-4c6e-bbc7-f12d42a2a83e_3028x842.png 1272w, https://substackcdn.com/image/fetch/$s_!8gy1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3f568e-0e37-4c6e-bbc7-f12d42a2a83e_3028x842.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8gy1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3f568e-0e37-4c6e-bbc7-f12d42a2a83e_3028x842.png" width="1456" height="405" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1a3f568e-0e37-4c6e-bbc7-f12d42a2a83e_3028x842.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:405,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:891030,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176277074?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3f568e-0e37-4c6e-bbc7-f12d42a2a83e_3028x842.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8gy1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3f568e-0e37-4c6e-bbc7-f12d42a2a83e_3028x842.png 424w, https://substackcdn.com/image/fetch/$s_!8gy1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3f568e-0e37-4c6e-bbc7-f12d42a2a83e_3028x842.png 848w, https://substackcdn.com/image/fetch/$s_!8gy1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3f568e-0e37-4c6e-bbc7-f12d42a2a83e_3028x842.png 1272w, https://substackcdn.com/image/fetch/$s_!8gy1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a3f568e-0e37-4c6e-bbc7-f12d42a2a83e_3028x842.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 10: Comparison of dense task benchmarks against other agglomerative models. (Taken from RADIOv2.5 Research Paper)</figcaption></figure></div><p>In the last section, we&#8217;ll bring everything together and use the official diagram for the Nemotron Nano 2 VL architecture, from the research paper, to outline each component and how it works - building on top of what we&#8217;ve learned in the previous sections.</p><div><hr></div><h2>3. Painting the Complete Architecture</h2><p>From the Nemotron Nano 2 VL Research Paper, we get this Figure to visualize the architecture of the 12B model. Starting from the bottom up, we have the Text Input (prompt) and Image Input (represented as Tiled Image on the diagram). </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LrHY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc49a2929-ffe9-4fa4-9629-acdfa72d523f_1146x1134.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LrHY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc49a2929-ffe9-4fa4-9629-acdfa72d523f_1146x1134.png 424w, https://substackcdn.com/image/fetch/$s_!LrHY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc49a2929-ffe9-4fa4-9629-acdfa72d523f_1146x1134.png 848w, https://substackcdn.com/image/fetch/$s_!LrHY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc49a2929-ffe9-4fa4-9629-acdfa72d523f_1146x1134.png 1272w, https://substackcdn.com/image/fetch/$s_!LrHY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc49a2929-ffe9-4fa4-9629-acdfa72d523f_1146x1134.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LrHY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc49a2929-ffe9-4fa4-9629-acdfa72d523f_1146x1134.png" width="1146" height="1134" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c49a2929-ffe9-4fa4-9629-acdfa72d523f_1146x1134.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1134,&quot;width&quot;:1146,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:345982,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176277074?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc49a2929-ffe9-4fa4-9629-acdfa72d523f_1146x1134.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LrHY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc49a2929-ffe9-4fa4-9629-acdfa72d523f_1146x1134.png 424w, https://substackcdn.com/image/fetch/$s_!LrHY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc49a2929-ffe9-4fa4-9629-acdfa72d523f_1146x1134.png 848w, https://substackcdn.com/image/fetch/$s_!LrHY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc49a2929-ffe9-4fa4-9629-acdfa72d523f_1146x1134.png 1272w, https://substackcdn.com/image/fetch/$s_!LrHY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc49a2929-ffe9-4fa4-9629-acdfa72d523f_1146x1134.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 11: An overview of the Nemotron Nano 2 VL 12B model architecture. (Taken from the Research Paper)</figcaption></figure></div><p>Both these inputs are passed through their respective encoders (i.e, Text is tokenized, Image is tiled and encoded, and tokens are projected), and all token embeddings land in a common, multimodal embedding space. Then, the Language Decoder processes interleaved (i.e, common space) embeddings and produces the answers.</p><p>Having this overall picture, let&#8217;s unpack the interesting components and provide a bit more detail on how exactly all these processes work. Since we&#8217;re covering the Nano 2 VL model, we&#8217;ll focus mostly on how Images/Videos are processed and passed through the model.</p><p></p><div><hr></div><h3>3.1 Starting with Image Tilling &amp; Patching</h3><p>Let&#8217;s first build the intuition on why we need to split images into patches and/or split them into multiple tiles.</p><p>Transformers were originally built for language, where input is already a sequence of discrete units (tokens). These tokens fit naturally into the Transformer architecture, because they have an &#8216;order&#8217; and `position` in a sentence. </p><p>Images, however, are <strong>2D grids</strong>, not sequences. A Transformer can&#8217;t directly take a 2D array of pixels and compute attention - it needs a <strong>sequence</strong> of vectors. So that&#8217;s why we convert an image into a sequence by slicing it into patches, to &#8220;mimic&#8221; the order of words in a sentence.</p><blockquote><p><strong>Note: </strong>In the end, embeddings for both words (text tokens) and visual patches (vision tokens) will end-up in the same latent embedding space for the Language Model to sample and process from.</p></blockquote><p>Now, in VLMs, the concept of patching is different than tiling. There&#8217;s a hierarchy order that these processing steps must follow:</p><ol><li><p><strong>Tiling</strong> = splits the entire image into multiple <strong>large tiles</strong> (e.g., 512&#215;512 or 1024&#215;1024), often with overlap. Each tile is then patched separately by the vision encoder.</p></li><li><p><strong>Patching = </strong>turning a 2D image into 1D tokens with positional encodings, such that the Transformer knows how patches relate to each other across an image.</p></li></ol><p>Tiling and Patching are concepts used in all Foundation Models (e.g, GPT, Gemini, Claude) or VLMs. If we have high-resolution images, or ones with weird aspect ratios (i.e, very tall PDFs, panoramic images), or images with dense text and diagrams, we <strong>split them into different tiles</strong> to capture all the visual context.</p><p>Then, each tile is <strong>patched individually</strong> such that the Transformer knows how image regions relate (i.e, Patch 1 from Tile 1, with Patch 64 from Tile 2).</p><blockquote><p><strong>Note</strong>: If we were to use patching alone, we&#8217;ll generate huge numbers of patches filling-up the entire context of the LLM.</p></blockquote><p>Now that we have understood the core ideas behind Tiling and Patching, let&#8217;s visualize them in the following Figure, which contains specific details on what resolutions and layouts the RADIO Encoder within Nano 2 VL 12B model supports:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6fOc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F373ea7c3-9905-40ec-9406-abbac6ed7a97_3300x2056.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6fOc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F373ea7c3-9905-40ec-9406-abbac6ed7a97_3300x2056.png 424w, https://substackcdn.com/image/fetch/$s_!6fOc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F373ea7c3-9905-40ec-9406-abbac6ed7a97_3300x2056.png 848w, https://substackcdn.com/image/fetch/$s_!6fOc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F373ea7c3-9905-40ec-9406-abbac6ed7a97_3300x2056.png 1272w, https://substackcdn.com/image/fetch/$s_!6fOc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F373ea7c3-9905-40ec-9406-abbac6ed7a97_3300x2056.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6fOc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F373ea7c3-9905-40ec-9406-abbac6ed7a97_3300x2056.png" width="1456" height="907" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/373ea7c3-9905-40ec-9406-abbac6ed7a97_3300x2056.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:907,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3255473,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176277074?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F373ea7c3-9905-40ec-9406-abbac6ed7a97_3300x2056.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6fOc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F373ea7c3-9905-40ec-9406-abbac6ed7a97_3300x2056.png 424w, https://substackcdn.com/image/fetch/$s_!6fOc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F373ea7c3-9905-40ec-9406-abbac6ed7a97_3300x2056.png 848w, https://substackcdn.com/image/fetch/$s_!6fOc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F373ea7c3-9905-40ec-9406-abbac6ed7a97_3300x2056.png 1272w, https://substackcdn.com/image/fetch/$s_!6fOc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F373ea7c3-9905-40ec-9406-abbac6ed7a97_3300x2056.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>For the next step, let&#8217;s visualize and build an idea on how the RADIO Vision Encoder extracts and represents Image Features.</p><h3>3.1 How RADIO Encoder Extracts Features</h3><p>This is a shorter section, but it&#8217;ll build an intuition on the effects of Multi-Resolution training of the Vision Encoder, and how exactly it can extract important dense features from images.</p><p>In the following Figure 13, we have a representation of the dense features mapping on different images, showcasing how RADIOv2.5 can produce low-level Meta Dino-like features and high-level Meta SAM-like features. If we look at the yellow boxes with hashed outlines, we can see the distinct clustering of features part of the same object. </p><p>In the first image, for example, there is a clear distinction between the Person (blue), Forest(green), and Mountain(red) sections, and the features (colors) are clustered to outline fine-grained details and delimitations of objects.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MUrL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7274162b-c0b4-4b69-9f9d-e8bc9712e8c4_3104x1720.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MUrL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7274162b-c0b4-4b69-9f9d-e8bc9712e8c4_3104x1720.png 424w, https://substackcdn.com/image/fetch/$s_!MUrL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7274162b-c0b4-4b69-9f9d-e8bc9712e8c4_3104x1720.png 848w, https://substackcdn.com/image/fetch/$s_!MUrL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7274162b-c0b4-4b69-9f9d-e8bc9712e8c4_3104x1720.png 1272w, https://substackcdn.com/image/fetch/$s_!MUrL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7274162b-c0b4-4b69-9f9d-e8bc9712e8c4_3104x1720.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MUrL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7274162b-c0b4-4b69-9f9d-e8bc9712e8c4_3104x1720.png" width="1456" height="807" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7274162b-c0b4-4b69-9f9d-e8bc9712e8c4_3104x1720.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:807,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:6982253,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176277074?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7274162b-c0b4-4b69-9f9d-e8bc9712e8c4_3104x1720.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!MUrL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7274162b-c0b4-4b69-9f9d-e8bc9712e8c4_3104x1720.png 424w, https://substackcdn.com/image/fetch/$s_!MUrL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7274162b-c0b4-4b69-9f9d-e8bc9712e8c4_3104x1720.png 848w, https://substackcdn.com/image/fetch/$s_!MUrL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7274162b-c0b4-4b69-9f9d-e8bc9712e8c4_3104x1720.png 1272w, https://substackcdn.com/image/fetch/$s_!MUrL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7274162b-c0b4-4b69-9f9d-e8bc9712e8c4_3104x1720.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 13: Visualizations of model features exhibiting the mode switch issue (low res, to high res). PCA is used to project patch tokens into a 3D space representing RGB colors. The visualizations illustrate how the baseline RADIO switches from producing DINO-like features at low resolution to producing SAM-like features at high resolution.</figcaption></figure></div><h3>3.2 How Nano 2 VL Handles Long Video Input</h3><p>In this section, we cover the EVS - Efficient Video Sampling plugin that the model is using to reduce repetitive/redundant tokens on multi-image inputs, using the context window more efficiently.</p><blockquote><p><strong>Note: </strong>To understand EVS in a simple sentence, think that most video content has static elements, areas that don&#8217;t change from frame to frame. We don&#8217;t need to encode all those tokens, we can encode only the &#8220;moving areas&#8221; from a video.</p></blockquote><p>Nemotron Nano 2 VL uses EVS successfully for efficient video processing, which speeds up video inference by 4x, a major speed-up, with minimal accuracy loss. Let&#8217;s understand that with an actual example, we&#8217;ll use a few images from the Joe Rogan Podcast as an example.</p><blockquote><p><strong>Note: </strong>In any podcast setting, the background rarely changes, it can largely change between 2 modes only: when either of the person is speaking. </p></blockquote><p>Here, the region marked in Red rarely changes. So if we select a 60-second video portion of the podcast and pass it to Nemotron Nano 2 VL, we&#8217;ll fill just a small slice of the Context Window of the model, leaving a lot of room for generation text tokens, longer video, reasoning tokens, etc.</p><p>That&#8217;s because the visual information was compressed to remove or merge areas that don&#8217;t change in the video, and that&#8217;s thanks to what EVS does.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!O62g!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f5e7a3-3ed7-48b9-b8a4-15280b8bf08a_1922x1410.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!O62g!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f5e7a3-3ed7-48b9-b8a4-15280b8bf08a_1922x1410.png 424w, https://substackcdn.com/image/fetch/$s_!O62g!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f5e7a3-3ed7-48b9-b8a4-15280b8bf08a_1922x1410.png 848w, https://substackcdn.com/image/fetch/$s_!O62g!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f5e7a3-3ed7-48b9-b8a4-15280b8bf08a_1922x1410.png 1272w, https://substackcdn.com/image/fetch/$s_!O62g!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f5e7a3-3ed7-48b9-b8a4-15280b8bf08a_1922x1410.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!O62g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f5e7a3-3ed7-48b9-b8a4-15280b8bf08a_1922x1410.png" width="1456" height="1068" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/82f5e7a3-3ed7-48b9-b8a4-15280b8bf08a_1922x1410.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1068,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3736659,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176277074?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f5e7a3-3ed7-48b9-b8a4-15280b8bf08a_1922x1410.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!O62g!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f5e7a3-3ed7-48b9-b8a4-15280b8bf08a_1922x1410.png 424w, https://substackcdn.com/image/fetch/$s_!O62g!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f5e7a3-3ed7-48b9-b8a4-15280b8bf08a_1922x1410.png 848w, https://substackcdn.com/image/fetch/$s_!O62g!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f5e7a3-3ed7-48b9-b8a4-15280b8bf08a_1922x1410.png 1272w, https://substackcdn.com/image/fetch/$s_!O62g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82f5e7a3-3ed7-48b9-b8a4-15280b8bf08a_1922x1410.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 14: An example of a frame sequence from an episode of The Joe Rogan Experience Podcast, annotating the visual area that doesn&#8217;t change visual information.</figcaption></figure></div><p>For a more robust overview of EVS and how it works, we can inspect Figure 15:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!blx4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6326c889-2400-4f52-a66d-0374cc1c47f7_1622x1498.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!blx4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6326c889-2400-4f52-a66d-0374cc1c47f7_1622x1498.png 424w, https://substackcdn.com/image/fetch/$s_!blx4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6326c889-2400-4f52-a66d-0374cc1c47f7_1622x1498.png 848w, https://substackcdn.com/image/fetch/$s_!blx4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6326c889-2400-4f52-a66d-0374cc1c47f7_1622x1498.png 1272w, https://substackcdn.com/image/fetch/$s_!blx4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6326c889-2400-4f52-a66d-0374cc1c47f7_1622x1498.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!blx4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6326c889-2400-4f52-a66d-0374cc1c47f7_1622x1498.png" width="1456" height="1345" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6326c889-2400-4f52-a66d-0374cc1c47f7_1622x1498.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1345,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:468020,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176277074?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6326c889-2400-4f52-a66d-0374cc1c47f7_1622x1498.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!blx4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6326c889-2400-4f52-a66d-0374cc1c47f7_1622x1498.png 424w, https://substackcdn.com/image/fetch/$s_!blx4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6326c889-2400-4f52-a66d-0374cc1c47f7_1622x1498.png 848w, https://substackcdn.com/image/fetch/$s_!blx4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6326c889-2400-4f52-a66d-0374cc1c47f7_1622x1498.png 1272w, https://substackcdn.com/image/fetch/$s_!blx4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6326c889-2400-4f52-a66d-0374cc1c47f7_1622x1498.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 15: A complete overview of EVS (Efficient Video Sampling), a plugin by NVIDIA that reduces the number of vision tokens we could compress a video sequence into, preserving the Context Window of the model.</figcaption></figure></div><p>As a summary, EVS improves inference throughput, up to 4x, while maintaining the accuracy and working outside of the model, as a pre-processing step to shrink and compress Vision Tokens, before passing them to the model. </p><p>In the next section, we&#8217;ll provide a brief overview of the Datasets and Training Recipes used to train the Nemotron Nano 2 VL model.</p><div><hr></div><h2>4. The Open Source Aspect</h2><p>In this section, we&#8217;ll have a look at the Training Recipe, which describes how the model was trained, aligned, on which datasets, and for how long. This is one important aspect that defines a truly Open model.</p><p>Nemotron Nano V2 VL was trained via Pretraining + <strong>4-stage SFT </strong>pipeline. SFT stands for Supervised Finetuning, and it implies custom-engineered datasets and samples to align the model to specific behaviours. </p><h4>0. Pretraining - Warming Up (36B tokens)</h4><p>This stage focuses on aligning the RADIOv2.5 vision encoder with the frozen Nano 2 12B Language Model. From the architecture in Section 3, we had the Vision Projector layer, which is an MLP (Multi Layer Perceptron) responsible for projecting Vision Tokens into Language Space.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Yju9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F714926b4-1b1e-4079-bf9e-929ca3007d4c_1380x884.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Yju9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F714926b4-1b1e-4079-bf9e-929ca3007d4c_1380x884.png 424w, https://substackcdn.com/image/fetch/$s_!Yju9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F714926b4-1b1e-4079-bf9e-929ca3007d4c_1380x884.png 848w, https://substackcdn.com/image/fetch/$s_!Yju9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F714926b4-1b1e-4079-bf9e-929ca3007d4c_1380x884.png 1272w, https://substackcdn.com/image/fetch/$s_!Yju9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F714926b4-1b1e-4079-bf9e-929ca3007d4c_1380x884.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Yju9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F714926b4-1b1e-4079-bf9e-929ca3007d4c_1380x884.png" width="1380" height="884" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/714926b4-1b1e-4079-bf9e-929ca3007d4c_1380x884.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:884,&quot;width&quot;:1380,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:137313,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176277074?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F714926b4-1b1e-4079-bf9e-929ca3007d4c_1380x884.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Yju9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F714926b4-1b1e-4079-bf9e-929ca3007d4c_1380x884.png 424w, https://substackcdn.com/image/fetch/$s_!Yju9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F714926b4-1b1e-4079-bf9e-929ca3007d4c_1380x884.png 848w, https://substackcdn.com/image/fetch/$s_!Yju9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F714926b4-1b1e-4079-bf9e-929ca3007d4c_1380x884.png 1272w, https://substackcdn.com/image/fetch/$s_!Yju9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F714926b4-1b1e-4079-bf9e-929ca3007d4c_1380x884.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 16: Visualization of MLP Projection of Vision tokens into the Shared Latent Space of the LLM.</figcaption></figure></div><p>The training set included ~2.2M multimodal samples (captioning, VQA, grounding, OCR, document extraction), aiming to stabilise early multimodal alignment without affecting language capabilities (LLM was frozen in this setup).<br></p><h4>1. Core Multimodal SFT-1 (112B Tokens, 16k Context Size)</h4><p>This was the main data stage and the largest contribution to quality. Datasets cover <strong>40B text tokens </strong>on reasoning, code, math, multilingual dialogue, and <strong>72B multimodal tokens</strong> on captioning, TextVQA, DocVQA, ChartQA, and more.</p><p>The main outcome of this stage was strong OCR capabilities, general VQA, and document understanding and reasoning.</p><h4>2. Video &amp; Multi-Image SFT (55B Tokens, 49k Context Size)</h4><p>This stage focused on building long-context and temporal reasoning. Datasets include Kinetics, YouCook2, ActivityNet, and VideoQA datasets, all of which contain multiple short clips of performing different actions. Below you can find an example of an entry from the YouCook2 dataset:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!T9Pg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57cf234-c0da-48f5-aa68-4a5427d6a464_2618x560.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!T9Pg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57cf234-c0da-48f5-aa68-4a5427d6a464_2618x560.png 424w, https://substackcdn.com/image/fetch/$s_!T9Pg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57cf234-c0da-48f5-aa68-4a5427d6a464_2618x560.png 848w, https://substackcdn.com/image/fetch/$s_!T9Pg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57cf234-c0da-48f5-aa68-4a5427d6a464_2618x560.png 1272w, https://substackcdn.com/image/fetch/$s_!T9Pg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57cf234-c0da-48f5-aa68-4a5427d6a464_2618x560.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!T9Pg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57cf234-c0da-48f5-aa68-4a5427d6a464_2618x560.png" width="1456" height="311" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d57cf234-c0da-48f5-aa68-4a5427d6a464_2618x560.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:311,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:875686,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176277074?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57cf234-c0da-48f5-aa68-4a5427d6a464_2618x560.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!T9Pg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57cf234-c0da-48f5-aa68-4a5427d6a464_2618x560.png 424w, https://substackcdn.com/image/fetch/$s_!T9Pg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57cf234-c0da-48f5-aa68-4a5427d6a464_2618x560.png 848w, https://substackcdn.com/image/fetch/$s_!T9Pg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57cf234-c0da-48f5-aa68-4a5427d6a464_2618x560.png 1272w, https://substackcdn.com/image/fetch/$s_!T9Pg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57cf234-c0da-48f5-aa68-4a5427d6a464_2618x560.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Figure 17: A sample from the YouCook2 Dataset, one of the largest task-oriented, instructional video datasets in the vision community</figcaption></figure></div><h4>3. Code/Text Recovery (15B Tokens, 49k Context Size)</h4><p>During the previous two stages that focused on multimodal reasoning, the team behind Nemotron Nano 2 VL noticed that code-reasoning abilities dipped, so this stage aims to recover the accuracy on the underrepresented text &amp; code reasoning tasks.</p><p>This stage focused on code reasoning (~1M samples) to recover text abilities, restoring math, code, and text reasoning benchmarks.</p><h4>4. Long-Context Scaling (12B Tokens, up to 300k Context Size)</h4><p>The fourth and final stage focused on building multi-image reasoning and long-video understanding, emphasizing long context. Remember, the Nano 2 VL model has a 128k context window, allowing it to process large inputs, and this stage aligned the model to those characteristics.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CAHH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89f3b6b6-1c37-4752-9e4e-88d16cdb2b08_3828x354.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CAHH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89f3b6b6-1c37-4752-9e4e-88d16cdb2b08_3828x354.png 424w, https://substackcdn.com/image/fetch/$s_!CAHH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89f3b6b6-1c37-4752-9e4e-88d16cdb2b08_3828x354.png 848w, https://substackcdn.com/image/fetch/$s_!CAHH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89f3b6b6-1c37-4752-9e4e-88d16cdb2b08_3828x354.png 1272w, https://substackcdn.com/image/fetch/$s_!CAHH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89f3b6b6-1c37-4752-9e4e-88d16cdb2b08_3828x354.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CAHH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89f3b6b6-1c37-4752-9e4e-88d16cdb2b08_3828x354.png" width="1456" height="135" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/89f3b6b6-1c37-4752-9e4e-88d16cdb2b08_3828x354.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:135,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:102624,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176277074?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89f3b6b6-1c37-4752-9e4e-88d16cdb2b08_3828x354.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CAHH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89f3b6b6-1c37-4752-9e4e-88d16cdb2b08_3828x354.png 424w, https://substackcdn.com/image/fetch/$s_!CAHH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89f3b6b6-1c37-4752-9e4e-88d16cdb2b08_3828x354.png 848w, https://substackcdn.com/image/fetch/$s_!CAHH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89f3b6b6-1c37-4752-9e4e-88d16cdb2b08_3828x354.png 1272w, https://substackcdn.com/image/fetch/$s_!CAHH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89f3b6b6-1c37-4752-9e4e-88d16cdb2b08_3828x354.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Figure 18: Overview of the Training Recipe of Nemotron Nano 2 VL model. Total training covers <strong>~220B multimodal+text tokens</strong>. (Taken from the Research Paper).</figcaption></figure></div><p>Having these details helps developers trust the model they&#8217;re building on top of, be able to explain and interpret the outputs, and mitigate biases.</p><blockquote><p><strong>Note: </strong>All the details in this section, are extracted and summarized from the Research Paper, which I recommend you reading.</p></blockquote><h2>5. The Model on HuggingFace</h2><p>You can find and get started with Nemotron Nano 2 VL models on NVIDIA&#8217;s HuggingFace Collection. The Nano 2 VL model comes in 3 different quantizations, BF16, FP8, and NVFP4 (i.e, NVIDIA&#8217;s new FP4 format compatible with Blackwell Architectures).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Xq2c!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eeb75fa-da94-4c1c-9544-5b767e063f10_1892x2098.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Xq2c!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eeb75fa-da94-4c1c-9544-5b767e063f10_1892x2098.png 424w, https://substackcdn.com/image/fetch/$s_!Xq2c!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eeb75fa-da94-4c1c-9544-5b767e063f10_1892x2098.png 848w, https://substackcdn.com/image/fetch/$s_!Xq2c!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eeb75fa-da94-4c1c-9544-5b767e063f10_1892x2098.png 1272w, https://substackcdn.com/image/fetch/$s_!Xq2c!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eeb75fa-da94-4c1c-9544-5b767e063f10_1892x2098.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Xq2c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eeb75fa-da94-4c1c-9544-5b767e063f10_1892x2098.png" width="1456" height="1615" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5eeb75fa-da94-4c1c-9544-5b767e063f10_1892x2098.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1615,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1111003,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176277074?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eeb75fa-da94-4c1c-9544-5b767e063f10_1892x2098.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Xq2c!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eeb75fa-da94-4c1c-9544-5b767e063f10_1892x2098.png 424w, https://substackcdn.com/image/fetch/$s_!Xq2c!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eeb75fa-da94-4c1c-9544-5b767e063f10_1892x2098.png 848w, https://substackcdn.com/image/fetch/$s_!Xq2c!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eeb75fa-da94-4c1c-9544-5b767e063f10_1892x2098.png 1272w, https://substackcdn.com/image/fetch/$s_!Xq2c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eeb75fa-da94-4c1c-9544-5b767e063f10_1892x2098.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 19. The NVIDIA Nemotron V2 model collection on Hugging Face.</figcaption></figure></div><p>The models are zero-day compatible with vLLM, so you could follow the tutorial on the model card from <a href="https://huggingface.co/nvidia/NVIDIA-Nemotron-Nano-12B-v2-VL-BF16">HuggingFace</a>, starting a vLLM server and building the client to interact with it. Additionally, you can test the model on <a href="https://openrouter.ai/nvidia/nemotron-nano-12b-v2-vl:free">Open Router </a>or <a href="https://www.baseten.co/blog/high-performance-agents-for-financial-services-with-nvidia-nemotron-on-baseten/#using-vision-language-models-in-financial-services">Baseten</a> and <a href="https://app.hyperbolic.ai/models/nvidia-nemotron-nano-12b-v2-vl-bf16">Hyperbolic</a>, as well as deploy it pre-packaged using NVIDIA NIM <a href="https://build.nvidia.com/nvidia/nemotron-nano-12b-v2-vl/deploy">(NVIDIA Inference Microservice)</a>.</p><h2>6. Video Demo</h2><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;4443b5b5-552d-4efd-a276-d790abea7a6c&quot;,&quot;duration&quot;:null}"></div><div><hr></div><h2>7. Conclusion</h2><p>In this article, we&#8217;ve covered the Nemotron Nano 2 VL, an open-source, small Agentic AI-ready model, specifically tuned for multi-image reasoning, document understanding, and video understanding.</p><p>We&#8217;ve started by comparing it with the previous version, the Llama-3.1-Nemotron-VL, across the benchmark results and architecture components, outlining how the newer model brings improvements at each level, from accuracy to inference throughput.</p><p>The Nano 2 VL model is the leading open SVLM (Small Vision Language Model) on a complex OCR benchmark (the OCRBenchV2), mainly thanks to the Training Recipe and Architecture improvements it brings.</p><p>We&#8217;ve also unpacked the Vision Encoder (RADIO v2.5-H), Text Decoder (Nano 2 12B), and the EVS Plugin for long-video inputs, as well as  iterating and explaining the finetuning stages and dataset used to train this model, and showcased a short demo on how the model does using a set of 6 pages from a PDF document.</p><p><strong>Thank you for reading!</strong> See you next week</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Neural Bits is supported by its readers. If you enjoy reading my work, consider subscribing.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h4>References</h4><p>[1] NVIDIA. (2025). <em>Nemotron Nano V2 VL: Model report</em>. arXiv. <a href="https://arxiv.org/abs/2511.03929?utm_source=chatgpt.com">https://arxiv.org/abs/2511.03929</a></p><p>[2] NVIDIA. (2025). <em>Llama-3.1-Nemotron-Nano-VL-8B-V1</em>. Hugging Face. <a href="https://huggingface.co/nvidia/Llama-3.1-Nemotron-Nano-VL-8B-V1?utm_source=chatgpt.com">https://huggingface.co/nvidia/Llama-3.1-Nemotron-Nano-VL-8B-V1</a></p><p>[3] Bagrov, N., Khvedchenia, E., Tymchenko, B., Geifman, Y., Zilberstein, R., &amp; the NVIDIA team. (2025). <em>Efficient Video Sampling (EVS): Pruning temporally redundant tokens for faster VLM inference</em>. arXiv. <a href="https://arxiv.org/abs/2510.14624">https://arxiv.org/abs/2510.14624</a></p><p>[4] Heinrich, G., Ranzinger, M., Yin, H., Molchanov, P., &amp; Pan, Y. (2025). <em>RADIOv2.5: Improved baselines for agglomerative vision foundation models</em>. arXiv. <a href="https://arxiv.org/pdf/2412.07679">https://arxiv.org/pdf/2412.07679</a></p><p>[5] Wang, H., Maaz, M., Khan, S., &amp; colleagues. (2025). <em>LongVideoBench: A benchmark for long-context video understanding in large vision-language models</em>. arXiv. <a href="https://arxiv.org/abs/2407.15754">https://arxiv.org/abs/2407.15754</a></p><p>[6] Wang, H., &amp; Team. (2025). <em>MMBench-Doc: Benchmarking long-context document understanding with visualizations</em>. arXiv. <a href="https://arxiv.org/abs/2407.01523">https://arxiv.org/abs/2407.01523</a></p><p>[7] ling99. (n.d.). <em>OCRBench-v2 leaderboard</em>. Hugging Face Spaces. <a href="https://huggingface.co/spaces/ling99/OCRBench-v2-leaderboard">https://huggingface.co/spaces/ling99/OCRBench-v2-leaderboard</a></p><p>[8] LMMS-Lab. (n.d.). <em>AI2D dataset</em>. Hugging Face Datasets. <a href="https://huggingface.co/datasets/lmms-lab/ai2d">https://huggingface.co/datasets/lmms-lab/ai2d</a></p><div><hr></div>]]></content:encoded></item><item><title><![CDATA[The Future of Agentic AI is Small.]]></title><description><![CDATA[How NVIDIA&#8217;s Nemotron Nano V2 SLM, built for long-context reasoning, fast inference, can compete with models 4-5x its size.]]></description><link>https://read.theaimerge.com/p/the-future-of-agentic-ai-is-small</link><guid isPermaLink="false">https://read.theaimerge.com/p/the-future-of-agentic-ai-is-small</guid><dc:creator><![CDATA[Alex Razvant]]></dc:creator><pubDate>Sat, 15 Nov 2025 14:47:33 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!o88x!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F586c1afa-b2c9-4b44-866a-27d8a98e99ce_3066x1092.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Welcome to Neural Bits. Each week, I write about practical, production-ready AI/ML Engineering. Join over <strong><a href="https://multimodalai.substack.com/subscribe">7000+ engineers</a></strong> and learn to build real-world AI Systems.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p>As you already know, I love technical deep dives.</p><p>This is Part I of a small 2-part series where I unpack the new NVIDIA Nemotron models<br>In this first piece, I&#8217;m focusing on the text-only side of the family, the Nemotron Nano v2 Transformer-Hybrid models, which outcompete other popular and powerful open models on a large set of reasoning Benchmarks.</p><p>In Part II of this series, I&#8217;ll be covering the latest addition, the Nemotron Nano 2 VL 12B, which is a powerful VLM for multi-image, long video reasoning, and document understanding.</p><p>In this mini-series:</p><p>&#8594;<strong> &#9989; Part I - The Nano 2 Family of SLMs for best-in-class Reasoning Models.<br></strong>&#8594; <strong>&#9989; <a href="https://multimodalai.substack.com/p/small-vlms-will-soon-compete-with">Part II - The Nano 2 VL Model for Agentic AI capabilities on Vision Tasks</a></strong></p><p>If you&#8217;re building agents, research workflows, or anything that relies on &#8220;thinking steps,&#8221; Nemotron Nano v2 is one of the most interesting architectures you can study right now.</p><p>(To navigate the topics, please use the Table of Contents on the left)</p><div><hr></div><h2>The NVIDIA Nemotron Family: Open Models for Agentic AI</h2><p>NVIDIA Nemotron is not only a model architecture, although it might seem so.</p><p>It&#8217;s a family of models, curated datasets, and finetuning recipes, all open-source following NVIDIA&#8217;s license, allowing developers to build efficient and specialized AI Systems.</p><blockquote><p><strong>Note: </strong>A training recipe describes the step by step workflow of finetuning a model. For instance, starting with SFT (Supervised Finetuning), then iterations of Reinforcement Learning steps using <em>Group Relative Policy Optimization</em> (<em>GRPO</em>).</p></blockquote><p>Nemotron models are openly available and integrated across the AI ecosystem so they can be deployed anywhere - from edge to cloud. These are a result of NVIDIA&#8217;s direction to create fully transparent models, helping developers build domain-specific AI agents and own the explainability of their outputs.</p><h4>Unpacking the Nemotron Model Family</h4><p>We can summarize the key details in 3 major components, as shown in Figure 1.</p><p> </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NqoE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118f7be5-28e4-41c6-8bfa-315da25141bc_3066x1516.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NqoE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118f7be5-28e4-41c6-8bfa-315da25141bc_3066x1516.png 424w, https://substackcdn.com/image/fetch/$s_!NqoE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118f7be5-28e4-41c6-8bfa-315da25141bc_3066x1516.png 848w, https://substackcdn.com/image/fetch/$s_!NqoE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118f7be5-28e4-41c6-8bfa-315da25141bc_3066x1516.png 1272w, https://substackcdn.com/image/fetch/$s_!NqoE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118f7be5-28e4-41c6-8bfa-315da25141bc_3066x1516.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NqoE!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118f7be5-28e4-41c6-8bfa-315da25141bc_3066x1516.png" width="1200" height="593.4065934065934" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/118f7be5-28e4-41c6-8bfa-315da25141bc_3066x1516.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:720,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:737321,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/178766528?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118f7be5-28e4-41c6-8bfa-315da25141bc_3066x1516.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!NqoE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118f7be5-28e4-41c6-8bfa-315da25141bc_3066x1516.png 424w, https://substackcdn.com/image/fetch/$s_!NqoE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118f7be5-28e4-41c6-8bfa-315da25141bc_3066x1516.png 848w, https://substackcdn.com/image/fetch/$s_!NqoE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118f7be5-28e4-41c6-8bfa-315da25141bc_3066x1516.png 1272w, https://substackcdn.com/image/fetch/$s_!NqoE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F118f7be5-28e4-41c6-8bfa-315da25141bc_3066x1516.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 1: The NVIDIA Nemotron Family of Models, Training Recipes, and Open Datasets</figcaption></figure></div><h4>Competing with Frontier Models</h4><p>One notable example is <strong>Llama-3_3-Nemotron-Super-49B-v1_5</strong>, which builds on top of<strong> <a href="https://www.google.com/search?q=Meta%27s+Llama+models&amp;oq=llama+nemotron+&amp;gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIHCAEQABiABDIHCAIQABiABDIHCAMQABiABDIHCAQQABiABDIGCAUQRRg8MgYIBhBFGDwyBggHEEUYPNIBCDI1NzVqMGo0qAIAsAIB&amp;sourceid=chrome&amp;ie=UTF-8&amp;mstk=AUtExfBBCa8-h6r_itScOSe6HRshwp4ZXY0bthzpOlWaAKq7DWEI-dalcXoyxX94LjIXdXkZbHnL1-bJSWAmeTmrBG7ubBwnhfujg0O2HWgKAfymURxc1DdCmH0yjNvWYMvgsV8WTNHVL-dijYh0wRrpYxEImj2lBmneA_4mtJ1yaSpqhsuWSMy-EyPFy18QC0H3hTFSNksMB4qRcWOT4O-8_yrvJOWL3rmg1uH_KHdV-Zp_hYMdTHKJHxc_IxHq5R4gXuQOmNyFwYEVbqlnHTgaZB8N&amp;csui=3&amp;ved=2ahUKEwjwguzJ_fOQAxUB2gIHHXNkNigQgK4QegQIARAC">Meta Llama 3.3 </a></strong>and is optimized for advanced reasoning and agentic AI tasks. At only 49B parameters, it ranks higher than Qwen3-32B MoE, and it overthrows the previous Llama-Nemotron-Ultra-253B, a model 5x its size, across a large set of reasoning and scientific benchmarks.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bBhj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F136b4c5d-d1ad-4139-9783-cb442a1389a7_2466x1120.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bBhj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F136b4c5d-d1ad-4139-9783-cb442a1389a7_2466x1120.png 424w, https://substackcdn.com/image/fetch/$s_!bBhj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F136b4c5d-d1ad-4139-9783-cb442a1389a7_2466x1120.png 848w, https://substackcdn.com/image/fetch/$s_!bBhj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F136b4c5d-d1ad-4139-9783-cb442a1389a7_2466x1120.png 1272w, https://substackcdn.com/image/fetch/$s_!bBhj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F136b4c5d-d1ad-4139-9783-cb442a1389a7_2466x1120.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bBhj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F136b4c5d-d1ad-4139-9783-cb442a1389a7_2466x1120.png" width="1456" height="661" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/136b4c5d-d1ad-4139-9783-cb442a1389a7_2466x1120.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:661,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;image&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="image" title="image" srcset="https://substackcdn.com/image/fetch/$s_!bBhj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F136b4c5d-d1ad-4139-9783-cb442a1389a7_2466x1120.png 424w, https://substackcdn.com/image/fetch/$s_!bBhj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F136b4c5d-d1ad-4139-9783-cb442a1389a7_2466x1120.png 848w, https://substackcdn.com/image/fetch/$s_!bBhj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F136b4c5d-d1ad-4139-9783-cb442a1389a7_2466x1120.png 1272w, https://substackcdn.com/image/fetch/$s_!bBhj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F136b4c5d-d1ad-4139-9783-cb442a1389a7_2466x1120.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 2. Llama Nemotron Super 49B, an older version of the Nemotron Models family, yields the highest accuracy in multiple reasoning benchmarks.</figcaption></figure></div><p>To put that in balance, the Llama-Nemotron-Ultra-253B competes with Frontier Models such as Gemini 2.5 Pro, OpenAI o3-mini, and takes the lead on the popular DeepSeek R1, a 650B+ reasoning model, the latest Llama 4 Maverick, GPT4-o, and others, on the GPQA Benchmark as shown in Figure 3.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GOGH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45951d98-d453-4972-b8a0-8c334537c3c3_2464x1026.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GOGH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45951d98-d453-4972-b8a0-8c334537c3c3_2464x1026.png 424w, https://substackcdn.com/image/fetch/$s_!GOGH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45951d98-d453-4972-b8a0-8c334537c3c3_2464x1026.png 848w, https://substackcdn.com/image/fetch/$s_!GOGH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45951d98-d453-4972-b8a0-8c334537c3c3_2464x1026.png 1272w, https://substackcdn.com/image/fetch/$s_!GOGH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45951d98-d453-4972-b8a0-8c334537c3c3_2464x1026.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GOGH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45951d98-d453-4972-b8a0-8c334537c3c3_2464x1026.png" width="1456" height="606" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/45951d98-d453-4972-b8a0-8c334537c3c3_2464x1026.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:606,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:658931,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/178766528?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45951d98-d453-4972-b8a0-8c334537c3c3_2464x1026.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GOGH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45951d98-d453-4972-b8a0-8c334537c3c3_2464x1026.png 424w, https://substackcdn.com/image/fetch/$s_!GOGH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45951d98-d453-4972-b8a0-8c334537c3c3_2464x1026.png 848w, https://substackcdn.com/image/fetch/$s_!GOGH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45951d98-d453-4972-b8a0-8c334537c3c3_2464x1026.png 1272w, https://substackcdn.com/image/fetch/$s_!GOGH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45951d98-d453-4972-b8a0-8c334537c3c3_2464x1026.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 3. Llama 3.1 Nemotron Ultra placed in the Top-5 on the GPQA Scientific Reasoning Benchmark, close to Frontier-Level Models.</figcaption></figure></div><blockquote><p><strong>Note</strong>: GPQA is a challenging dataset of 448 multiple-choice questions written by domain experts in biology, physics, and chemistry. The questions are high-quality and extremely difficult: experts who have or are pursuing PhDs in the corresponding domains reach 65% accuracy (74% when discounting clear mistakes the experts identified in retrospect), while highly skilled non-expert validators only reach 34% accuracy, despite spending on average over 30 minutes with unrestricted access to the web (i.e., the questions are &#8220;Google-proof&#8221;).</p></blockquote><p>These are the text-only models, capable of advanced reasoning, deep research, tool calling, and overall Agentic AI-related tasks. They are designed for enterprise-grade accuracy and performance, compatible with popular Inference Frameworks (TGI, vLLM, TensorRT-LLM) or prebuilt as Inference Microservices (NVIDIA NIM) for large-scale deployment.</p><p>Companies such as CrowdStrike, ServiceNow, and DataRobot already use Nemotron in their products, and even NVIDIA uses it internally to help with new GPU Chip Designs. <a href="https://huggingface.co/blog/nvidia/nemotron-open-models-data">[3]</a></p><h4>The Nemotron Nano V2</h4><p>If the older generation of models were using known architectures, the Nemotron V2 iteration was built from the ground up, achieving not only higher accuracy compared to similar models in the SLM (Small Language Model) branch, but up to 6-7x times higher throughput on long sequences with reasoning mode active.</p><p>The Nano V2 versions, 12B and 9B both feature improvements on:</p><ul><li><p><strong>Architecture:</strong> a hybrid Transformer&#8209;Mamba backbone where most layers are Mamba&#8209;2 state&#8209;space modules with a few attention ones.</p></li><li><p><strong>Thinking budgets: </strong>allowing you to control how many reasoning tokens does the model spend. </p></li><li><p><strong>Context: </strong>longer context windows, up to 128K tokens.</p></li><li><p><strong>Performance:</strong> higher inference throughput, especially on long-sequence tasks.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kU25!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e86d4b6-c951-4bb3-8e98-46bfe9216671_2460x1030.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kU25!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e86d4b6-c951-4bb3-8e98-46bfe9216671_2460x1030.png 424w, https://substackcdn.com/image/fetch/$s_!kU25!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e86d4b6-c951-4bb3-8e98-46bfe9216671_2460x1030.png 848w, https://substackcdn.com/image/fetch/$s_!kU25!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e86d4b6-c951-4bb3-8e98-46bfe9216671_2460x1030.png 1272w, https://substackcdn.com/image/fetch/$s_!kU25!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e86d4b6-c951-4bb3-8e98-46bfe9216671_2460x1030.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kU25!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e86d4b6-c951-4bb3-8e98-46bfe9216671_2460x1030.png" width="1456" height="610" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3e86d4b6-c951-4bb3-8e98-46bfe9216671_2460x1030.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:610,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kU25!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e86d4b6-c951-4bb3-8e98-46bfe9216671_2460x1030.png 424w, https://substackcdn.com/image/fetch/$s_!kU25!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e86d4b6-c951-4bb3-8e98-46bfe9216671_2460x1030.png 848w, https://substackcdn.com/image/fetch/$s_!kU25!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e86d4b6-c951-4bb3-8e98-46bfe9216671_2460x1030.png 1272w, https://substackcdn.com/image/fetch/$s_!kU25!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e86d4b6-c951-4bb3-8e98-46bfe9216671_2460x1030.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 4. Nemotron Nano v2 9B Distilled model outperforms Qwen3 8B tasks and benchmarks requiring advanced reasoning capabilities. Taken from Nano 2 9B Model Card.</figcaption></figure></div><p>This can be seen in more detail in the following Figure, comparing Nemotron Nano v2 B with Qwen3-8B, across various reasoning benchmarks, and throughput on long input and output sequences. In the figure, to interpret the numbers, the ISL stands for (Input Sequence Long) and OSL stands for (Output Sequence Long). </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PuXu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73aa4f17-4c78-4245-90e7-cebb39b77bad_2304x864.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PuXu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73aa4f17-4c78-4245-90e7-cebb39b77bad_2304x864.png 424w, https://substackcdn.com/image/fetch/$s_!PuXu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73aa4f17-4c78-4245-90e7-cebb39b77bad_2304x864.png 848w, https://substackcdn.com/image/fetch/$s_!PuXu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73aa4f17-4c78-4245-90e7-cebb39b77bad_2304x864.png 1272w, https://substackcdn.com/image/fetch/$s_!PuXu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73aa4f17-4c78-4245-90e7-cebb39b77bad_2304x864.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PuXu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73aa4f17-4c78-4245-90e7-cebb39b77bad_2304x864.png" width="1456" height="546" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/73aa4f17-4c78-4245-90e7-cebb39b77bad_2304x864.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:546,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PuXu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73aa4f17-4c78-4245-90e7-cebb39b77bad_2304x864.png 424w, https://substackcdn.com/image/fetch/$s_!PuXu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73aa4f17-4c78-4245-90e7-cebb39b77bad_2304x864.png 848w, https://substackcdn.com/image/fetch/$s_!PuXu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73aa4f17-4c78-4245-90e7-cebb39b77bad_2304x864.png 1272w, https://substackcdn.com/image/fetch/$s_!PuXu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F73aa4f17-4c78-4245-90e7-cebb39b77bad_2304x864.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 5. Comparing Nemotron Nano V2 9B with Qwen 3 8B across benchmarks and inference throughput, where the Nano V2 takes the lead thanks to the Transformer-H and Mamba-2 architecture improvements.</figcaption></figure></div><p>One more important feature that the Nano V2 brings is the ability to control the &#8220;Thinking Budget&#8221; at runtime. During inference, the user can specify how many tokens the model is allowed to &#8220;think&#8221;, allowing for controlled flow of Agentic AI tasks, notably if building Deep Research Agents, or Multi-Agent systems that involve step-by-step reasoning. </p><p>That considerable jump in inference throughput comes from the Transformer-H Hybrid architecture, which replaces a large chunk of the Attention Layers with Mamba 2 Layers, an interesting concept and an overall newer approach to Transformer models that we&#8217;ll unpack in the next section.</p><div><hr></div><h2>The Transformer-H Architecture and Mamba-2 Layers</h2><p>The original Transformer architecture is built around self-attention plus feed-forward sub-layers, which has been the backbone of nearly all current large language models. </p><p>Because of the attention mechanism, each token can incorporate information from any other token in the sequence, as when we compute attention scores, we have a large MatMul between Queries, Keys, and Values that gives very good in-context learning, as each token &#8220;looks&#8221; at each other token.</p><p>But the attention mechanism has <strong>quadratic cost</strong> O(n&#178;) in vanilla form, and the KV-cache in decoding can grow large. Although there are multiple methods to compute attention, as we&#8217;ll see in the following Figure, the MxN matrix will still grow with each token being added to the sequence.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HciT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab197a1-e820-41bb-a3bc-e3fdcd6cc85b_1208x270.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HciT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab197a1-e820-41bb-a3bc-e3fdcd6cc85b_1208x270.png 424w, https://substackcdn.com/image/fetch/$s_!HciT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab197a1-e820-41bb-a3bc-e3fdcd6cc85b_1208x270.png 848w, https://substackcdn.com/image/fetch/$s_!HciT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab197a1-e820-41bb-a3bc-e3fdcd6cc85b_1208x270.png 1272w, https://substackcdn.com/image/fetch/$s_!HciT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab197a1-e820-41bb-a3bc-e3fdcd6cc85b_1208x270.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HciT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab197a1-e820-41bb-a3bc-e3fdcd6cc85b_1208x270.png" width="1208" height="270" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5ab197a1-e820-41bb-a3bc-e3fdcd6cc85b_1208x270.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:270,&quot;width&quot;:1208,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HciT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab197a1-e820-41bb-a3bc-e3fdcd6cc85b_1208x270.png 424w, https://substackcdn.com/image/fetch/$s_!HciT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab197a1-e820-41bb-a3bc-e3fdcd6cc85b_1208x270.png 848w, https://substackcdn.com/image/fetch/$s_!HciT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab197a1-e820-41bb-a3bc-e3fdcd6cc85b_1208x270.png 1272w, https://substackcdn.com/image/fetch/$s_!HciT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ab197a1-e820-41bb-a3bc-e3fdcd6cc85b_1208x270.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Figure 6. Types of Attention Patterns, presented in the Longformer paper, that illustrate how Attention scales quadratically. Taken from the Longformer 2020 paper.</figcaption></figure></div><p>The Mamba-2 layers introduce a different approach to this problem by keeping an internal hidden state that evolves, driven by the tokens added to the sequence instead of maintaining full attention between all tokens.</p><p>The original Mamba, introduced in &#8220;<a href="https://arxiv.org/abs/2405.21060">Mamba: Linear-Time Sequence Modeling with Selective State Spaces</a>,&#8221; demonstrated that <strong>State Space Models (SSMs)</strong> can compete with Transformers while scaling much more efficiently due to their linear computation cost.</p><p>However, transformers are better at tasks requiring precise recall of specific input elements, a capability that SSMs can struggle with because their compressed state is fixed and may lose details. </p><p>A great in-depth article on how Mamba and SSM work was written by Maarten Grootendorst in his <a href="https://newsletter.maartengrootendorst.com/p/a-visual-guide-to-mamba-and-state">Exploring Language Models Newsletter</a>. Below is an attached animation from that article. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cam8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5547a54a-5f47-41c0-a2ee-2ba5bcceefb8_1920x1080.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cam8!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5547a54a-5f47-41c0-a2ee-2ba5bcceefb8_1920x1080.gif 424w, https://substackcdn.com/image/fetch/$s_!cam8!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5547a54a-5f47-41c0-a2ee-2ba5bcceefb8_1920x1080.gif 848w, https://substackcdn.com/image/fetch/$s_!cam8!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5547a54a-5f47-41c0-a2ee-2ba5bcceefb8_1920x1080.gif 1272w, https://substackcdn.com/image/fetch/$s_!cam8!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5547a54a-5f47-41c0-a2ee-2ba5bcceefb8_1920x1080.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cam8!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5547a54a-5f47-41c0-a2ee-2ba5bcceefb8_1920x1080.gif" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5547a54a-5f47-41c0-a2ee-2ba5bcceefb8_1920x1080.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!cam8!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5547a54a-5f47-41c0-a2ee-2ba5bcceefb8_1920x1080.gif 424w, https://substackcdn.com/image/fetch/$s_!cam8!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5547a54a-5f47-41c0-a2ee-2ba5bcceefb8_1920x1080.gif 848w, https://substackcdn.com/image/fetch/$s_!cam8!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5547a54a-5f47-41c0-a2ee-2ba5bcceefb8_1920x1080.gif 1272w, https://substackcdn.com/image/fetch/$s_!cam8!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5547a54a-5f47-41c0-a2ee-2ba5bcceefb8_1920x1080.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Mamba-2 extends this idea using a theoretical framework called <strong>State Space Duality (SSD)</strong>, which combines the two based on the deep connections between attention mechanisms and SSMs.</p><p>The Mamba-2 layer acts as a <strong>state-space operator</strong>:</p><ul><li><p>It maintains a continuous hidden state;</p></li><li><p>Updates this state token-by-token using learned transition dynamics;</p></li><li><p>Produces outputs that capture long-range dependencies without needing explicit attention maps.</p></li></ul><p>At each step, the new state = a scaled version of the previous state plus the new input. In Mamba-2, this SSM idea is refined into the Structured State Space Duality (SSD) layer, a design that shows SSMs and attention are mathematically linked. </p><p>The SSD layer can run in two ways (thus the Duality)<br>-  A linear, recurrent mode (inference)<br>-  A matrix-based &#8220;attention&#8221; mode (efficient for training).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iJ6R!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e0a59dd-a81b-401d-b251-bf6cec18d455_2832x1430.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iJ6R!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e0a59dd-a81b-401d-b251-bf6cec18d455_2832x1430.png 424w, https://substackcdn.com/image/fetch/$s_!iJ6R!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e0a59dd-a81b-401d-b251-bf6cec18d455_2832x1430.png 848w, https://substackcdn.com/image/fetch/$s_!iJ6R!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e0a59dd-a81b-401d-b251-bf6cec18d455_2832x1430.png 1272w, https://substackcdn.com/image/fetch/$s_!iJ6R!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e0a59dd-a81b-401d-b251-bf6cec18d455_2832x1430.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iJ6R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e0a59dd-a81b-401d-b251-bf6cec18d455_2832x1430.png" width="1456" height="735" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4e0a59dd-a81b-401d-b251-bf6cec18d455_2832x1430.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:735,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1056468,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/178766528?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e0a59dd-a81b-401d-b251-bf6cec18d455_2832x1430.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iJ6R!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e0a59dd-a81b-401d-b251-bf6cec18d455_2832x1430.png 424w, https://substackcdn.com/image/fetch/$s_!iJ6R!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e0a59dd-a81b-401d-b251-bf6cec18d455_2832x1430.png 848w, https://substackcdn.com/image/fetch/$s_!iJ6R!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e0a59dd-a81b-401d-b251-bf6cec18d455_2832x1430.png 1272w, https://substackcdn.com/image/fetch/$s_!iJ6R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e0a59dd-a81b-401d-b251-bf6cec18d455_2832x1430.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 7. Illustration of Mamba-2 SSD and how a new token that joins the sequence influences the hidden state update.</figcaption></figure></div><div><hr></div><h4>The Nemotron Nano V2 Architecture</h4><p>To dive a bit more into the architecture details, this model combines Mamba-2 Layers with Attention and FFN layers, trimming most of the Attention layers, and replacing them with Mamba-2 Layers.</p><p>As presented in the &#8220;<a href="https://arxiv.org/abs/2508.14444">NVIDIA Nemotron Nano 2: An Accurate and Efficient Hybrid Mamba-Transformer Reasoning Model</a>&#8221; research paper, if we extract the Model Architecture, we can see the exact configuration of layers being used.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5ZIL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d30522a-ee6b-4f02-820b-c35749717534_2692x940.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5ZIL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d30522a-ee6b-4f02-820b-c35749717534_2692x940.png 424w, https://substackcdn.com/image/fetch/$s_!5ZIL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d30522a-ee6b-4f02-820b-c35749717534_2692x940.png 848w, https://substackcdn.com/image/fetch/$s_!5ZIL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d30522a-ee6b-4f02-820b-c35749717534_2692x940.png 1272w, https://substackcdn.com/image/fetch/$s_!5ZIL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d30522a-ee6b-4f02-820b-c35749717534_2692x940.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5ZIL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d30522a-ee6b-4f02-820b-c35749717534_2692x940.png" width="1456" height="508" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2d30522a-ee6b-4f02-820b-c35749717534_2692x940.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:508,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:278427,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/178766528?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d30522a-ee6b-4f02-820b-c35749717534_2692x940.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5ZIL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d30522a-ee6b-4f02-820b-c35749717534_2692x940.png 424w, https://substackcdn.com/image/fetch/$s_!5ZIL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d30522a-ee6b-4f02-820b-c35749717534_2692x940.png 848w, https://substackcdn.com/image/fetch/$s_!5ZIL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d30522a-ee6b-4f02-820b-c35749717534_2692x940.png 1272w, https://substackcdn.com/image/fetch/$s_!5ZIL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d30522a-ee6b-4f02-820b-c35749717534_2692x940.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Specifically, in the Nano V2 architecture, there are 62 total layers, with 28/28 split between FFN and Mamba Layers and 6 Attention Layers. That is described in the paper directly, in the Model Architecture section, where I&#8217;ve outlined them with yellow.</p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/p/the-future-of-agentic-ai-is-small?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">Thanks for reading Neural Bits! This post is public, so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/p/the-future-of-agentic-ai-is-small?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/p/the-future-of-agentic-ai-is-small?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mkBB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F642bcfb8-2493-4ae9-80ec-732568a3ec25_2726x932.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mkBB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F642bcfb8-2493-4ae9-80ec-732568a3ec25_2726x932.png 424w, https://substackcdn.com/image/fetch/$s_!mkBB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F642bcfb8-2493-4ae9-80ec-732568a3ec25_2726x932.png 848w, https://substackcdn.com/image/fetch/$s_!mkBB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F642bcfb8-2493-4ae9-80ec-732568a3ec25_2726x932.png 1272w, https://substackcdn.com/image/fetch/$s_!mkBB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F642bcfb8-2493-4ae9-80ec-732568a3ec25_2726x932.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mkBB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F642bcfb8-2493-4ae9-80ec-732568a3ec25_2726x932.png" width="1456" height="498" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/642bcfb8-2493-4ae9-80ec-732568a3ec25_2726x932.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:498,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:738775,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/178766528?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F642bcfb8-2493-4ae9-80ec-732568a3ec25_2726x932.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mkBB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F642bcfb8-2493-4ae9-80ec-732568a3ec25_2726x932.png 424w, https://substackcdn.com/image/fetch/$s_!mkBB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F642bcfb8-2493-4ae9-80ec-732568a3ec25_2726x932.png 848w, https://substackcdn.com/image/fetch/$s_!mkBB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F642bcfb8-2493-4ae9-80ec-732568a3ec25_2726x932.png 1272w, https://substackcdn.com/image/fetch/$s_!mkBB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F642bcfb8-2493-4ae9-80ec-732568a3ec25_2726x932.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We can&#8217;t completely remove Attention layers, as they provide global context, something that Mamba-2 layers could be struggling as the longer a sequence grows, the hidden state update might loose information, as each new token added to the sequence updates the new hidden state.</p><p>The Reason for doing that is that Attention layers provide global context, whereas Mamba-2 layers handle state transitions more cheaply than full attention, which largely increases the throughput of the model during inference. </p><p>If we inspect the Nano v2 architecture using the HuggingFace Safetensors Explorer, we notice the exact details mentioned above. In this next Safetensors view, we look directly at the tensors structure and how they&#8217;re mapped by the HuggingFace Transformers Library when composing the model and loading it&#8217;s weights.</p><p>We see 62 layers, but notice the `mixer` component in the layer&#8217;s name as this is something specific to Mamba-2 layers:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IuuP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa67d8dc-ff44-4042-b6be-113eb2ce67d4_2362x1767.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IuuP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa67d8dc-ff44-4042-b6be-113eb2ce67d4_2362x1767.png 424w, https://substackcdn.com/image/fetch/$s_!IuuP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa67d8dc-ff44-4042-b6be-113eb2ce67d4_2362x1767.png 848w, https://substackcdn.com/image/fetch/$s_!IuuP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa67d8dc-ff44-4042-b6be-113eb2ce67d4_2362x1767.png 1272w, https://substackcdn.com/image/fetch/$s_!IuuP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa67d8dc-ff44-4042-b6be-113eb2ce67d4_2362x1767.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IuuP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa67d8dc-ff44-4042-b6be-113eb2ce67d4_2362x1767.png" width="550" height="411.36675824175825" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fa67d8dc-ff44-4042-b6be-113eb2ce67d4_2362x1767.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1089,&quot;width&quot;:1456,&quot;resizeWidth&quot;:550,&quot;bytes&quot;:923634,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/178766528?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa67d8dc-ff44-4042-b6be-113eb2ce67d4_2362x1767.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!IuuP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa67d8dc-ff44-4042-b6be-113eb2ce67d4_2362x1767.png 424w, https://substackcdn.com/image/fetch/$s_!IuuP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa67d8dc-ff44-4042-b6be-113eb2ce67d4_2362x1767.png 848w, https://substackcdn.com/image/fetch/$s_!IuuP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa67d8dc-ff44-4042-b6be-113eb2ce67d4_2362x1767.png 1272w, https://substackcdn.com/image/fetch/$s_!IuuP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffa67d8dc-ff44-4042-b6be-113eb2ce67d4_2362x1767.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 8. Viewing the Nemotron Nano V2 Safetensors file, with the layers structure, shapes, and precision types.</figcaption></figure></div><p>In the context of Mamba / Mamba-2,  the &#8220;mixer&#8221; refers to the module that processes the token sequence dimension via SSM mechanisms rather than (or alongside) standard attention. In practice, the difference between Attention and using SSM is better noticed at inference time.</p><h4>Comparing Attention with Mamba-SSM</h4><p>Because Mamba keeps an internal state, the throughput scales linearly with the sequence length, as each new token in the sequence acts as a signal to update the hidden state.</p><p>For transformers, that token is added to the MxN Attention Matrix, and its attention score is computed w.r.t all the other tokens in the sequence.</p><p>The underlying result is that once the sequence grows, Attention will yield OOM Errors, whereas Mamba scales linearly.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!o88x!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F586c1afa-b2c9-4b44-866a-27d8a98e99ce_3066x1092.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!o88x!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F586c1afa-b2c9-4b44-866a-27d8a98e99ce_3066x1092.png 424w, https://substackcdn.com/image/fetch/$s_!o88x!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F586c1afa-b2c9-4b44-866a-27d8a98e99ce_3066x1092.png 848w, https://substackcdn.com/image/fetch/$s_!o88x!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F586c1afa-b2c9-4b44-866a-27d8a98e99ce_3066x1092.png 1272w, https://substackcdn.com/image/fetch/$s_!o88x!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F586c1afa-b2c9-4b44-866a-27d8a98e99ce_3066x1092.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!o88x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F586c1afa-b2c9-4b44-866a-27d8a98e99ce_3066x1092.png" width="1456" height="519" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/586c1afa-b2c9-4b44-866a-27d8a98e99ce_3066x1092.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:519,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:657273,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/178766528?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F586c1afa-b2c9-4b44-866a-27d8a98e99ce_3066x1092.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!o88x!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F586c1afa-b2c9-4b44-866a-27d8a98e99ce_3066x1092.png 424w, https://substackcdn.com/image/fetch/$s_!o88x!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F586c1afa-b2c9-4b44-866a-27d8a98e99ce_3066x1092.png 848w, https://substackcdn.com/image/fetch/$s_!o88x!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F586c1afa-b2c9-4b44-866a-27d8a98e99ce_3066x1092.png 1272w, https://substackcdn.com/image/fetch/$s_!o88x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F586c1afa-b2c9-4b44-866a-27d8a98e99ce_3066x1092.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 9. Comparing the throughput between Mamba + SSM layers and Attention, outlining how Mamba scales linearly with sequence length, whereas Transformers resulted in OOM, given the same batch size.</figcaption></figure></div><div><hr></div><h2>Getting Started with the Nemotron Nano V2</h2><p>As a hands-on approach, let&#8217;s try to serve Nemotron Nano V2 model and then build a client in Python, to try out the Thinking Budgets approach that these models introduce.</p><p>As with any model on <a href="https://huggingface.co/nvidia/NVIDIA-Nemotron-Nano-9B-v2/tree/main">HuggingFace</a>, you can use and test it directly with the Transformers library plug-and-play.</p><pre><code>import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained(&#8221;nvidia/NVIDIA-Nemotron-Nano-9B-v2&#8221;)
model = AutoModelForCausalLM.from_pretrained(
    &#8220;nvidia/NVIDIA-Nemotron-Nano-9B-v2&#8221;,
    torch_dtype=torch.bfloat16,
    trust_remote_code=True,
    device_map=&#8221;auto&#8221;
)

messages = [
    {&#8221;role&#8221;: &#8220;system&#8221;, &#8220;content&#8221;: &#8220;/think&#8221;},
    {&#8221;role&#8221;: &#8220;user&#8221;, &#8220;content&#8221;: &#8220;Tell me a story about Mamba-2&#8221;},
]

tokenized_chat = tokenizer.apply_chat_template(
    messages,
    tokenize=True,
    add_generation_prompt=True,
    return_tensors=&#8221;pt&#8221;
).to(model.device)

outputs = model.generate(
    tokenized_chat,
    max_new_tokens=32,
    eos_token_id=tokenizer.eos_token_id
)
print(tokenizer.decode(outputs[0]))</code></pre><blockquote><p>The model, in BF16 Precision would require 12-16GB VRAM if you&#8217;re planning to load and run it on a GPU.</p></blockquote><p>This call will parse the repository, load the tokenizer, and unpack the Safetensors checkpoint shards, loading them into memory and constructing the Model Graph, which is composed of Tensor Types, Precision Types, Layers etc.</p><p>This process of parsing a model, loading the weights, and preparing the Model Graph is the same in all Inference Engines, from vLLM, TGI, Transformers, llama.cpp and more.</p><h4>Using Thinking Budget Client with vLLM</h4><p>With vLLM, you&#8217;d start a Server to host the model, and then build a Client in Python that connects to the Server and sends requests.</p><ol><li><p><strong>Starting the Server</strong> - you also need to pass `mamba_ssm_cache` as this model uses the Transformer-H Architecture with Mamba-2 layers.</p><pre><code>pip install -U &#8220;vllm&gt;=0.10.1&#8221;
vllm serve nvidia/NVIDIA-Nemotron-Nano-9B-v2 \
    --trust-remote-code \
    --max-num-seqs 64 \
    --mamba_ssm_cache_dtype float32</code></pre></li><li><p><strong>Build the Client in Python</strong></p><pre><code>from typing import Any, Dict, List

import openai
from transformers import AutoTokenizer


class ThinkingBudgetClient:
   def __init__(self, base_url: str, api_key: str, tok_path: str):
       self.base_url = base_url
       self.api_key = api_key
       self.tokenizer = AutoTokenizer.from_pretrained(tok_path)
       self.client = openai.OpenAI(self.base_url, self.api_key)


   def chat_completion(
       self,
       model: str,
       messages: List[Dict[str, Any]],
       max_thinking_budget: int = 512,
       max_tokens: int = 1024,
       **kwargs,
   ) -&gt; Dict[str, Any]:
       assert (
           max_tokens &gt; max_thinking_budget
       ), f&#8221;thinking budget must be smaller than maximum new tokens. Given {max_tokens=} and {max_thinking_budget=}&#8221;


       # 1. first call chat completion to get reasoning content
       response = self.client.chat.completions.create(
           model=model, messages=messages, max_tokens=max_thinking_budget, **kwargs
       )
       content = response.choices[0].message.content


       reasoning_content = content
       if not &#8220;&lt;/think&gt;&#8221; in reasoning_content:
           # reasoning content is too long, closed with a period (.)
           reasoning_content = f&#8221;{reasoning_content}.\n&lt;/think&gt;\n\n&#8221;
       reasoning_tokens_len = len(
           self.tokenizer.encode(reasoning_content, add_special_tokens=False)
       )
       remaining_tokens = max_tokens - reasoning_tokens_len
       assert (
           remaining_tokens &gt; 0
       ), f&#8221;remaining tokens must be positive. Given {remaining_tokens=}. Increase the max_tokens or lower the max_thinking_budget.&#8221;


       # 2. append reasoning content to messages and call completion
       messages.append({&#8221;role&#8221;: &#8220;assistant&#8221;, &#8220;content&#8221;: reasoning_content})
       prompt = self.tokenizer.apply_chat_template(
           messages,
           tokenize=False,
           continue_final_message=True,
       )
       response = self.client.completions.create(
           model=model, prompt=prompt, max_tokens=remaining_tokens, **kwargs
       )


       response_data = {
           &#8220;reasoning_content&#8221;: reasoning_content.strip().strip(&#8221;&lt;/think&gt;&#8221;).strip(),
           &#8220;content&#8221;: response.choices[0].text,
           &#8220;finish_reason&#8221;: response.choices[0].finish_reason,
       }
       return response_data</code></pre></li></ol><ol start="3"><li><p><strong>Sending the Request</strong> - limiting to 32 thinking tokens only.</p><pre><code>tok_path = &#8220;nvidia/NVIDIA-Nemotron-Nano-9B-v2&#8221;
client = ThinkingBudgetClient(
   base_url=&#8221;http://localhost:8000/v1&#8221;,
   api_key=&#8221;EMPTY&#8221;,
   tok_path=tok_path,
)

messages=[
       {&#8221;role&#8221;: &#8220;system&#8221;, &#8220;content&#8221;: &#8220;You are a helpful assistant. /think&#8221;},
       {&#8221;role&#8221;: &#8220;user&#8221;, &#8220;content&#8221;: &#8220;What is 2+2?&#8221;},
   ],

result = client.chat_completion(
   model=&#8221;nvidia/NVIDIA-Nemotron-Nano-9B-v2&#8221;,
   messages=messages,
   max_thinking_budget=32,
   max_tokens=512,
   temperature=0.6,
   top_p=0.95,
)
print(result)</code></pre></li></ol><p>You should see a response similar to, limited by our max_thinking_budget:</p><pre><code>{&#8217;reasoning_content&#8217;: &#8220;Okay, the user asked, What is 2+2? Let me think. Well, 2 plus 2 equals 4.&#8221;, &#8216;content&#8217;: &#8216;2 + 2 equals **4**.\n&#8217;, &#8216;finish_reason&#8217;: &#8216;stop&#8217;}</code></pre><div><hr></div><h3>Conclusion</h3><p>In Part I of this mini-series, we&#8217;ve started with an overview on the NVIDIA Nemotron Family of Models, Datasets, and Training recipes, covering the improvements that Nemotron Models bring, the datasets and techniques they&#8217;ve been trained with and how they rank on popular reasoning benchmarks for Agentic AI tasks.</p><p>In short, the Nemotron line of models from NVIDIA is aimed to be small, capable, Agentic AI-ready models that run fast, require low compute, and can be deployed at scale from cloud to Edge.</p><p>Also in this article, we&#8217;ve covered the most notable architecture improvement, replacing traditional Attention Layers with SSM (State Space Models), notably Mamba-2 layers, and have explained the differences, benefits, and impact this has on Inference Throughput.</p><p>In Part II of this series, we&#8217;ll cover the Nemotron Nano 2 VL 12B, a model that has the same powers as the Nano 2, but adds the Vision Modality, leading to the OCRBenchv2, a very complex Benchmark on Document Understanding and Multi-Image Reasoning.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://multimodalai.substack.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share Neural Bits&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://multimodalai.substack.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share Neural Bits</span></a></p><p>Thanks for reading, don&#8217;t miss the next article!</p><div><hr></div><h3>References:</h3><p>[1] NVIDIA. (2025). <em>Nemotron Nano V2 Reasoning Benchmarks.</em> HuggingFace.<br><a href="https://huggingface.co/nvidia/NVIDIA-Nemotron-Nano-9B-v2">https://huggingface.co/nvidia/NVIDIA-Nemotron-Nano-9B-v2</a></p><p>[2] NVIDIA. (2025). <em>Nemotron Nano 2 VL Model Card.</em> HuggingFace.<br><a href="https://huggingface.co/nvidia/NVIDIA-Nemotron-Nano-12B-v2-VL-BF16">https://huggingface.co/nvidia/NVIDIA-Nemotron-Nano-12B-v2-VL-BF16</a></p><p>[3] Nemotron&#8217;s Open Secret: Accelerating AI Development with Open Models, Data, and Recipes. (2025). HuggingFace.co.<br><a href="https://huggingface.co/blog/nvidia/nemotron-open-models-data">https://huggingface.co/blog/nvidia/nemotron-open-models-data</a></p><p>[4] (2023). <em>GPQA: A Graduate-Level Google-Proof Q&amp;A Benchmark</em>. ArXiv.org. <a href="https://arxiv.org/abs/2311.12022">https://arxiv.org/abs/2311.12022</a></p><p>[5] NVIDIA Research. (2025). <em>Nemotron Nano 2: Hybrid Mamba-Transformer Architecture.</em><br><a href="https://arxiv.org/abs/2508.14444">https://arxiv.org/abs/2508.14444</a></p><p>[6] Gu &amp; Dao. (2024). <em>Mamba: Linear-Time State-Space Models.</em><br><a href="https://arxiv.org/abs/2405.21060">https://arxiv.org/abs/2405.21060</a></p><div><hr></div>]]></content:encoded></item><item><title><![CDATA[What You Don’t See: My Engineering Process Behind Each Article]]></title><description><![CDATA[My Working Desk. How I capture ideas, sketch System Design Diagrams, Write and Build AI Projects for this newsletter.]]></description><link>https://read.theaimerge.com/p/what-you-dont-see-my-engineering</link><guid isPermaLink="false">https://read.theaimerge.com/p/what-you-dont-see-my-engineering</guid><dc:creator><![CDATA[Alex Razvant]]></dc:creator><pubDate>Sat, 01 Nov 2025 14:02:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!MaBs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd538134d-b384-456e-b228-ce99f8a1385e.heic" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Welcome to Neural Bits. Each week, I write about practical, production-ready AI/ML Engineering. Join over <strong><a href="https://multimodalai.substack.com/subscribe">6700+ engineers</a></strong> and learn to build real-world AI Systems.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p><strong>How does the behind-the-scenes of writing this Newsletter look?</strong></p><p>What you see and read in here is the final result of days, and sometimes 1-2 weeks of tinkering, sketching, building, editing, maybe recording, and finally publishing.</p><p>I spend a lot of time designing, coding, breaking things, fixing them again, and writing about what I learn. But the parts I rarely show are what happens before any code runs.</p><p>For this article, I initially thought to publish another deep dive on AI Systems. But as I didn&#8217;t feel it was complete yet, for my standards, I wanted to slow down a bit and show you the hidden side of the process.</p><p>Even though this post isn&#8217;t technical, it captures something just as important - the thinking process that drives good engineering work.</p><blockquote><p><strong>Tip: </strong>If you&#8217;re an Engineer, you&#8217;ll quickly notice that your job isn&#8217;t just to write code.</p></blockquote><p>You&#8217;ll spend just as much time, if not more, reading and writing. </p><p>Explaining how systems work. Reviewing architecture documents. Writing design and tooling proposals.</p><p>Communicating clearly becomes just as valuable as building efficiently.</p><p>On that note, let me show you the behind-the-scenes of my work, building AI Systems and then writing and explaining them.</p><div><hr></div><h3>Everything happens mostly here, at my desk</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MaBs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd538134d-b384-456e-b228-ce99f8a1385e.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MaBs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd538134d-b384-456e-b228-ce99f8a1385e.heic 424w, https://substackcdn.com/image/fetch/$s_!MaBs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd538134d-b384-456e-b228-ce99f8a1385e.heic 848w, https://substackcdn.com/image/fetch/$s_!MaBs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd538134d-b384-456e-b228-ce99f8a1385e.heic 1272w, https://substackcdn.com/image/fetch/$s_!MaBs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd538134d-b384-456e-b228-ce99f8a1385e.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MaBs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd538134d-b384-456e-b228-ce99f8a1385e.heic" width="728" height="546" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d538134d-b384-456e-b228-ce99f8a1385e.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1092,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:2739203,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176640695?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd538134d-b384-456e-b228-ce99f8a1385e.heic&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!MaBs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd538134d-b384-456e-b228-ce99f8a1385e.heic 424w, https://substackcdn.com/image/fetch/$s_!MaBs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd538134d-b384-456e-b228-ce99f8a1385e.heic 848w, https://substackcdn.com/image/fetch/$s_!MaBs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd538134d-b384-456e-b228-ce99f8a1385e.heic 1272w, https://substackcdn.com/image/fetch/$s_!MaBs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd538134d-b384-456e-b228-ce99f8a1385e.heic 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">My working desk.</figcaption></figure></div><p>Every topic I write about usually begins as a single line I drop into my Content System in Notion. It might come from a bug I&#8217;m trying to fix, a concept I want to understand, or just a random curiosity while reading.<br><br>Whenever I find something useful, a paragraph, a code snippet, a paper, or a full blog post - I save it. </p><p>Over time, I gather a lot of notes that I could filter and group into a rough plan or a more general topic that addresses a potential reader&#8217;s purpose.</p><p>On weekends, I go through those notes again and try to group them under a bigger topic I could turn into an article. </p><blockquote><p><strong>Tip: </strong>This is a habit I&#8217;ve learned from a Staff Engineer, of keeping an internal progress log in Apple Notes, Obsidian or Markdown files.</p></blockquote><p>It&#8217;s simple but powerful. When you come back to a project later, you already have the full context waiting for you. Fun fact, it&#8217;s a bit like building your own RAG system, where your notes are the knowledge base, and your brain is the LLM model.</p><p>Back at it, after iterating the notes, I start to plan the structure, compose the diagrams and visuals, and jump to implementation.</p><div><hr></div><h3>A real example of the Writing Process</h3><p>In January of this year, I published an article on the basics of <a href="https://multimodalai.substack.com/p/the-mlai-engineers-starter-guide">GPU Programming for AI Engineers</a>, one of my most-read pieces so far, with over 12k views and 110 Likes. </p><p>It came from a pile of scattered notes: CUDA, GPU architecture, custom kernels in C++ and Python, and the new Triton language from OpenAI. Around that time, I was also studying Unsloth and JIT, trying to understand how it optimizes LLM finetuning using Triton kernels.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eNON!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acf2be8-9f22-413e-b8bc-d9d3afa8e115_1884x852.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eNON!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acf2be8-9f22-413e-b8bc-d9d3afa8e115_1884x852.png 424w, https://substackcdn.com/image/fetch/$s_!eNON!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acf2be8-9f22-413e-b8bc-d9d3afa8e115_1884x852.png 848w, https://substackcdn.com/image/fetch/$s_!eNON!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acf2be8-9f22-413e-b8bc-d9d3afa8e115_1884x852.png 1272w, https://substackcdn.com/image/fetch/$s_!eNON!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acf2be8-9f22-413e-b8bc-d9d3afa8e115_1884x852.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eNON!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acf2be8-9f22-413e-b8bc-d9d3afa8e115_1884x852.png" width="1456" height="658" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7acf2be8-9f22-413e-b8bc-d9d3afa8e115_1884x852.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:658,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:177309,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176640695?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acf2be8-9f22-413e-b8bc-d9d3afa8e115_1884x852.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!eNON!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acf2be8-9f22-413e-b8bc-d9d3afa8e115_1884x852.png 424w, https://substackcdn.com/image/fetch/$s_!eNON!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acf2be8-9f22-413e-b8bc-d9d3afa8e115_1884x852.png 848w, https://substackcdn.com/image/fetch/$s_!eNON!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acf2be8-9f22-413e-b8bc-d9d3afa8e115_1884x852.png 1272w, https://substackcdn.com/image/fetch/$s_!eNON!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7acf2be8-9f22-413e-b8bc-d9d3afa8e115_1884x852.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Some Notes in my Notion Board where I capture ideas and information about a topic.</figcaption></figure></div><p>All these notes were connected. So I grouped them, built a few examples, added visuals, and turned it into a clear and easy-to-digest guide. </p><blockquote><p><strong>Tip: </strong>Good writing is clear thinking made visible. This is an insight I&#8217;ve learned from &#8220;On Writing Well&#8221; by William Zinsser [2]</p></blockquote><p>While I was also learning myself, I put my thoughts and gotchas on paper. </p><p><em>Why did it resonate so much?</em> </p><p>Because AI engineers rarely build their own GPU kernels, researchers do.</p><p>But understanding how Kernels and GPUs work is a major advantage for anyone working with AI. </p><p>Thus, a hands-on introduction to how GPUs work: what CUDA is, VRAM, what a kernel looks like, and how to build one in C++, CudaPy, and Triton proved to be so helpful.</p><div><hr></div><h3>A real example of the Designing Process</h3><p>Writing code for simple tutorials is easy. </p><p>You could do the initial scaffolding and share those as Jupyter Notebooks or a single Python script.</p><p>Building a bigger project with multiple components requires sketches and System Design at first.</p><p>On top of that, explaining each component and its role is super difficult if you don&#8217;t have the blueprint for that already set.</p><blockquote><p><strong>Note: </strong>Just as in any software application, re-designing components on the run adds tech depth and more engineering hours for refactoring later. </p></blockquote><p>And that is something that&#8217;s often swept under the rug, prioritizing shipping new features.</p><p>Before I write any code, I usually try to nail down how everything fits together. At first, pen and paper, most of the time nothing fancy - just quick diagrams to help me see how the pieces fit together.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SYKs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F853c5039-36e0-4349-ab84-ae96bb42f618_5712x4284.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SYKs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F853c5039-36e0-4349-ab84-ae96bb42f618_5712x4284.heic 424w, https://substackcdn.com/image/fetch/$s_!SYKs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F853c5039-36e0-4349-ab84-ae96bb42f618_5712x4284.heic 848w, https://substackcdn.com/image/fetch/$s_!SYKs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F853c5039-36e0-4349-ab84-ae96bb42f618_5712x4284.heic 1272w, https://substackcdn.com/image/fetch/$s_!SYKs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F853c5039-36e0-4349-ab84-ae96bb42f618_5712x4284.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SYKs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F853c5039-36e0-4349-ab84-ae96bb42f618_5712x4284.heic" width="1456" height="1092" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/853c5039-36e0-4349-ab84-ae96bb42f618_5712x4284.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1092,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2471529,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176640695?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F853c5039-36e0-4349-ab84-ae96bb42f618_5712x4284.heic&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SYKs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F853c5039-36e0-4349-ab84-ae96bb42f618_5712x4284.heic 424w, https://substackcdn.com/image/fetch/$s_!SYKs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F853c5039-36e0-4349-ab84-ae96bb42f618_5712x4284.heic 848w, https://substackcdn.com/image/fetch/$s_!SYKs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F853c5039-36e0-4349-ab84-ae96bb42f618_5712x4284.heic 1272w, https://substackcdn.com/image/fetch/$s_!SYKs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F853c5039-36e0-4349-ab84-ae96bb42f618_5712x4284.heic 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">This is a System Design sketch of the Data Pipeline on a course I&#8217;m working on.</figcaption></figure></div><p>However, using quick sketches doesn&#8217;t cover everything. I had multiple instances where something I thought about initially doesn&#8217;t scale, has a major flaw, or simply doesn&#8217;t work.</p><blockquote><p><strong>Tip:</strong> Chip Huyen&#8217;s book &#8216;Designing Machine Learning Systems&#8217; [5] contains really good advice on how to properly design ML Systems.</p></blockquote><p>There were times when I had a flashing idea of how to add a component or remove another one entirely from my initial plan. In my case, these ideas stay latent in the back of my mind and come up at unusual times.</p><p>For example, one instance I remember was when I was reading Atomic Habits [1] by James Clear, relaxing on the couch, and suddenly, I got the idea of how I could fix the Storage structure component in one of my projects.</p><p>Totally unexpected, no connection between the book I was reading and the initial diagram sketch I&#8217;ve done a few weeks prior.</p><p>Usually, those ideas don&#8217;t stay in your mind for too long, so you've got <strong>to act fast.</strong></p><p>In that case, a system design diagram can turn into something like this, which is messier, but closer to the final working version.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!18cw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec4387eb-0f0f-42b7-a921-6764652b6a5f.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!18cw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec4387eb-0f0f-42b7-a921-6764652b6a5f.heic 424w, https://substackcdn.com/image/fetch/$s_!18cw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec4387eb-0f0f-42b7-a921-6764652b6a5f.heic 848w, https://substackcdn.com/image/fetch/$s_!18cw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec4387eb-0f0f-42b7-a921-6764652b6a5f.heic 1272w, https://substackcdn.com/image/fetch/$s_!18cw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec4387eb-0f0f-42b7-a921-6764652b6a5f.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!18cw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec4387eb-0f0f-42b7-a921-6764652b6a5f.heic" width="1456" height="1092" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ec4387eb-0f0f-42b7-a921-6764652b6a5f.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1092,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2974650,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176640695?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec4387eb-0f0f-42b7-a921-6764652b6a5f.heic&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!18cw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec4387eb-0f0f-42b7-a921-6764652b6a5f.heic 424w, https://substackcdn.com/image/fetch/$s_!18cw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec4387eb-0f0f-42b7-a921-6764652b6a5f.heic 848w, https://substackcdn.com/image/fetch/$s_!18cw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec4387eb-0f0f-42b7-a921-6764652b6a5f.heic 1272w, https://substackcdn.com/image/fetch/$s_!18cw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec4387eb-0f0f-42b7-a921-6764652b6a5f.heic 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">This is the result of a flashing idea, put on paper as quickly as possible.</figcaption></figure></div><p>Just like in real engineering work, only after a system is reviewed and iterated over can you get to a plan to start implementing and turning sketches into real working components.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!29ny!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3b617e2-b3b3-4ad5-b8da-96ef62ed6660_2143x2065.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!29ny!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3b617e2-b3b3-4ad5-b8da-96ef62ed6660_2143x2065.png 424w, https://substackcdn.com/image/fetch/$s_!29ny!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3b617e2-b3b3-4ad5-b8da-96ef62ed6660_2143x2065.png 848w, https://substackcdn.com/image/fetch/$s_!29ny!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3b617e2-b3b3-4ad5-b8da-96ef62ed6660_2143x2065.png 1272w, https://substackcdn.com/image/fetch/$s_!29ny!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3b617e2-b3b3-4ad5-b8da-96ef62ed6660_2143x2065.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!29ny!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3b617e2-b3b3-4ad5-b8da-96ef62ed6660_2143x2065.png" width="728" height="701.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d3b617e2-b3b3-4ad5-b8da-96ef62ed6660_2143x2065.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1403,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:1400409,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176640695?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3b617e2-b3b3-4ad5-b8da-96ef62ed6660_2143x2065.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!29ny!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3b617e2-b3b3-4ad5-b8da-96ef62ed6660_2143x2065.png 424w, https://substackcdn.com/image/fetch/$s_!29ny!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3b617e2-b3b3-4ad5-b8da-96ef62ed6660_2143x2065.png 848w, https://substackcdn.com/image/fetch/$s_!29ny!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3b617e2-b3b3-4ad5-b8da-96ef62ed6660_2143x2065.png 1272w, https://substackcdn.com/image/fetch/$s_!29ny!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd3b617e2-b3b3-4ad5-b8da-96ef62ed6660_2143x2065.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A few final diagrams, results of multiple sketches and re-iterations.</figcaption></figure></div><p>Before reaching this stage, there&#8217;s a lot of invisible work, revisiting assumptions, balancing trade-offs, and running thought experiments before any code exists.</p><blockquote><p><strong>Note: </strong>In real AI/ML or SWE projects, you won&#8217;t do this alone, but as part of a team. Understanding how this process works keeps everyone on the same page.</p></blockquote><p>That&#8217;s the heart of <strong>engineering thinking</strong>. The cheapest bugs to fix are the ones you catch in your design, not your deployment, which is more important for AI/ML projects than standard software and SDLC (Software Development Lifecycle).</p><h4>The big plot twist</h4><p>In software engineering, we can design, build, test, and deploy in a fairly linear way. All the tooling and components are established, resilient, and tested in production.</p><p>In AI/ML, the cycle loops back on itself (MLOps). Standardization is still a work in progress. </p><p>We&#8217;re at the phase where we have a lot of tools and techniques, but fewer standardizations and production-tested methods.</p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/p/what-you-dont-see-my-engineering?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption">If you&#8217;ve found it helpful. Share this post!</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/p/what-you-dont-see-my-engineering?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/p/what-you-dont-see-my-engineering?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><p></p><p>That&#8217;s why designing AI Systems is, at times, far more complex than standard applications.</p><div><hr></div><h3>A real example of the Building Process</h3><p>Once the system design feels solid enough, or at least has fewer gaps, I start building.</p><blockquote><p><strong>Note: </strong>As an example, I&#8217;ll be using a recent AI Agent based project I&#8217;ve worked on.</p></blockquote><p>I begin by setting up the foundations, mostly starting with a blank, single Python script that will get me something working as fast as possible. At this stage, I usually avoid optimizations or abstractions - just focusing on getting something to run end-to-end, pure Python.</p><p>I don&#8217;t finetune or optimize models yet, version or track my prompts, add in databases, or throw in MCP and Agents. </p><p>If I need multiple customizable prompts, for example, I&#8217;ll extract them from Python and save them alongside code, in Markdown.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zEPC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9360a01d-d7dc-47df-8230-c9fc287599f9_680x492.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zEPC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9360a01d-d7dc-47df-8230-c9fc287599f9_680x492.png 424w, https://substackcdn.com/image/fetch/$s_!zEPC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9360a01d-d7dc-47df-8230-c9fc287599f9_680x492.png 848w, https://substackcdn.com/image/fetch/$s_!zEPC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9360a01d-d7dc-47df-8230-c9fc287599f9_680x492.png 1272w, https://substackcdn.com/image/fetch/$s_!zEPC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9360a01d-d7dc-47df-8230-c9fc287599f9_680x492.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zEPC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9360a01d-d7dc-47df-8230-c9fc287599f9_680x492.png" width="492" height="355.9764705882353" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9360a01d-d7dc-47df-8230-c9fc287599f9_680x492.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:492,&quot;width&quot;:680,&quot;resizeWidth&quot;:492,&quot;bytes&quot;:62084,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176640695?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9360a01d-d7dc-47df-8230-c9fc287599f9_680x492.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zEPC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9360a01d-d7dc-47df-8230-c9fc287599f9_680x492.png 424w, https://substackcdn.com/image/fetch/$s_!zEPC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9360a01d-d7dc-47df-8230-c9fc287599f9_680x492.png 848w, https://substackcdn.com/image/fetch/$s_!zEPC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9360a01d-d7dc-47df-8230-c9fc287599f9_680x492.png 1272w, https://substackcdn.com/image/fetch/$s_!zEPC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9360a01d-d7dc-47df-8230-c9fc287599f9_680x492.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">An initial structure for storing prompts alongside code.</figcaption></figure></div><p>Next, I split the project into components to separate concerns and add strict models that will define the workflow, since I already have the system design diagrams in place. For example, I can define a collection of reusable <strong>Pydantic models</strong> that act as contracts between components.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9LJw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F418a1144-eb63-4a65-ac59-110e64826772_524x326.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9LJw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F418a1144-eb63-4a65-ac59-110e64826772_524x326.png 424w, https://substackcdn.com/image/fetch/$s_!9LJw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F418a1144-eb63-4a65-ac59-110e64826772_524x326.png 848w, https://substackcdn.com/image/fetch/$s_!9LJw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F418a1144-eb63-4a65-ac59-110e64826772_524x326.png 1272w, https://substackcdn.com/image/fetch/$s_!9LJw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F418a1144-eb63-4a65-ac59-110e64826772_524x326.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9LJw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F418a1144-eb63-4a65-ac59-110e64826772_524x326.png" width="482" height="299.8702290076336" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/418a1144-eb63-4a65-ac59-110e64826772_524x326.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:326,&quot;width&quot;:524,&quot;resizeWidth&quot;:482,&quot;bytes&quot;:30348,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176640695?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F418a1144-eb63-4a65-ac59-110e64826772_524x326.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9LJw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F418a1144-eb63-4a65-ac59-110e64826772_524x326.png 424w, https://substackcdn.com/image/fetch/$s_!9LJw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F418a1144-eb63-4a65-ac59-110e64826772_524x326.png 848w, https://substackcdn.com/image/fetch/$s_!9LJw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F418a1144-eb63-4a65-ac59-110e64826772_524x326.png 1272w, https://substackcdn.com/image/fetch/$s_!9LJw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F418a1144-eb63-4a65-ac59-110e64826772_524x326.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Example of a collection of reusable Pydantic Models.</figcaption></figure></div><p>These data models help me validate input/output, keep types consistent, and debug issues in isolation. </p><p>Some of the next steps would be to build the minimal functionality on each component, as defined in the System diagram, and aim to test them in integration.</p><p><strong>As I&#8217;m reaching the email length limit, I&#8217;ll skip over the details of those steps for now</strong>, but this is usually where structuring the project is something I&#8217;ll consider.</p><p>As the codebase grows, I want it to stay easy to navigate and evolve, without different components becoming tangled in ways they shouldn&#8217;t.</p><p>The exact setup can vary. </p><p>I usually follow the Clean Architecture software pattern, which I&#8217;m most familiar with.</p><p>A nice template for your AI projects, that follows the Clean Architecture pattern, is this one by <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Miguel Otero Pedrido&quot;,&quot;id&quot;:89972117,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!LZBx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b58b1f5-4d25-4dcf-9f48-b67a6e6e1316_1200x1200.jpeg&quot;,&quot;uuid&quot;:&quot;53841b44-45c9-43bb-b8c7-3d3cf76cba58&quot;}" data-component-name="MentionToDOM"></span> (from The Neural Maze [4]), which I recommend if you want to start fresh or already have an AI project that became cluttered and you want to bring a scalable and readable structure to it.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-pU6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78cf6872-d28a-4403-8371-fecb0143f9ff_1850x1440.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-pU6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78cf6872-d28a-4403-8371-fecb0143f9ff_1850x1440.png 424w, https://substackcdn.com/image/fetch/$s_!-pU6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78cf6872-d28a-4403-8371-fecb0143f9ff_1850x1440.png 848w, https://substackcdn.com/image/fetch/$s_!-pU6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78cf6872-d28a-4403-8371-fecb0143f9ff_1850x1440.png 1272w, https://substackcdn.com/image/fetch/$s_!-pU6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78cf6872-d28a-4403-8371-fecb0143f9ff_1850x1440.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-pU6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78cf6872-d28a-4403-8371-fecb0143f9ff_1850x1440.png" width="1456" height="1133" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/78cf6872-d28a-4403-8371-fecb0143f9ff_1850x1440.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1133,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:312891,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/176640695?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78cf6872-d28a-4403-8371-fecb0143f9ff_1850x1440.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-pU6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78cf6872-d28a-4403-8371-fecb0143f9ff_1850x1440.png 424w, https://substackcdn.com/image/fetch/$s_!-pU6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78cf6872-d28a-4403-8371-fecb0143f9ff_1850x1440.png 848w, https://substackcdn.com/image/fetch/$s_!-pU6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78cf6872-d28a-4403-8371-fecb0143f9ff_1850x1440.png 1272w, https://substackcdn.com/image/fetch/$s_!-pU6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F78cf6872-d28a-4403-8371-fecb0143f9ff_1850x1440.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Agent API Cookiecutter template from Miguel at <a href="https://github.com/neural-maze/agent-api-cookiecutter/tree/main">The Neural Maze</a>.</figcaption></figure></div><p>Be it Clean Architecture [3], Clean Architecture with DDD, or Vertical Slice, the key idea remains the same: keep boundaries clear and logic isolated.</p><div><hr></div><h2>Ending Notes</h2><p>Every article, project, or idea starts the same way - rough notes and bad sketches.</p><p>If there&#8217;s one thing I&#8217;ve learned through all of this, it&#8217;s that <strong>clarity comes from iteration</strong>. The more you think, design, and rebuild, the simpler things become.</p><p>That&#8217;s when everything finally clicks.</p><p>I hope this gave you a few insights into how to think about your own engineering process.</p><p>Thank you for reading. See you next week! </p><div><hr></div><h3>References</h3><p>[1] <em>Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones</em>. (2025, June 24). James Clear. <a href="https://jamesclear.com/atomic-habits">https://jamesclear.com/atomic-habits</a></p><p>[2] <em>Amazon.com: On Writing Well, Zinsser, William: </em><a href="https://www.amazon.com/Writing-Well-Classic-Guide-Nonfiction/dp/0060891548">https://www.amazon.com/Writing-Well-Classic-Guide-Nonfiction/dp/0060891548</a></p><p>[3] <em>Clean Architecture: A Craftsman&#8217;s Guide to Software Structure and Design (Robert C. Martin Series)</em> <a href="https://www.amazon.com/Clean-Architecture-Craftsmans-Software-Structure/dp/0134494164">https://www.amazon.com/Clean-Architecture-Craftsmans-Software-Structure/dp/0134494164</a></p><p>[4] Pedrido, M. O. (2025, August 6). <em>The Neural Maze</em>. Substack.com; The Neural Maze. <a href="https://theneuralmaze.substack.com/">https://theneuralmaze.substack.com/</a></p><p>&#8204; [5] <em>Amazon.com: Designing Machine Learning Systems: An Iterative Process for Production-Ready Applications: 9781098107963: Huyen, Chip: Books</em>. (2025). Amazon.com. <a href="https://www.amazon.com/Designing-Machine-Learning-Systems-Production-Ready/dp/1098107969">https://www.amazon.com/Designing-Machine-Learning-Systems-Production-Ready/dp/1098107969</a></p><p>&#8204;</p>]]></content:encoded></item><item><title><![CDATA[The Complete Guide to Ollama: Local LLM Inference Made Simple]]></title><description><![CDATA[A deep dive into Ollama&#8217;s architecture, going through model management, OpenAI API schema and local inference integrations with CLI, Docker and Python.]]></description><link>https://read.theaimerge.com/p/the-complete-guide-to-ollama-local</link><guid isPermaLink="false">https://read.theaimerge.com/p/the-complete-guide-to-ollama-local</guid><pubDate>Sat, 25 Oct 2025 13:02:36 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!7m9l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a3cc8e4-87e4-48fa-bb2a-ea6d1e61d629_2861x2390.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Welcome to Neural Bits. Each week, I write about practical, production-ready AI/ML Engineering. Join over <strong><a href="https://multimodalai.substack.com/subscribe">6600+ engineers</a></strong> and build real-world AI Systems.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p>It has been seven years since the original GPT architecture was developed, and roughly three years since solutions to deploy LLMs both locally and in the cloud became mainstream. </p><p>Just two years ago, we got the first release of vLLM, soon followed by llama.cpp, GGUF, Ollama, SG-Lang, and many others. At first, their roles weren&#8217;t entirely clear, but over time, each found its niche and purpose within the LLM ecosystem.</p><p>A key responsibility of an AI Engineer is to design an AI System, going through all of its components. From data ingestion to building the knowledge base, preference finetuning the LLMs, prompt engineering, building Agents, and enhancing them with tools, memory, and evaluation workflows, and the list goes on.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UKaT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4588496-b5a7-4b83-a1c4-dc3dce5cfb0d_3750x3750.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UKaT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4588496-b5a7-4b83-a1c4-dc3dce5cfb0d_3750x3750.png 424w, https://substackcdn.com/image/fetch/$s_!UKaT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4588496-b5a7-4b83-a1c4-dc3dce5cfb0d_3750x3750.png 848w, https://substackcdn.com/image/fetch/$s_!UKaT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4588496-b5a7-4b83-a1c4-dc3dce5cfb0d_3750x3750.png 1272w, https://substackcdn.com/image/fetch/$s_!UKaT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4588496-b5a7-4b83-a1c4-dc3dce5cfb0d_3750x3750.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UKaT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4588496-b5a7-4b83-a1c4-dc3dce5cfb0d_3750x3750.png" width="1456" height="1456" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b4588496-b5a7-4b83-a1c4-dc3dce5cfb0d_3750x3750.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1456,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:510273,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/175878656?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4588496-b5a7-4b83-a1c4-dc3dce5cfb0d_3750x3750.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UKaT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4588496-b5a7-4b83-a1c4-dc3dce5cfb0d_3750x3750.png 424w, https://substackcdn.com/image/fetch/$s_!UKaT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4588496-b5a7-4b83-a1c4-dc3dce5cfb0d_3750x3750.png 848w, https://substackcdn.com/image/fetch/$s_!UKaT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4588496-b5a7-4b83-a1c4-dc3dce5cfb0d_3750x3750.png 1272w, https://substackcdn.com/image/fetch/$s_!UKaT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4588496-b5a7-4b83-a1c4-dc3dce5cfb0d_3750x3750.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 1: The landscape of AI solutions split by layers, where Inference is a small but crucial part of the entire picture.</figcaption></figure></div><p>However, before starting work on all the above-mentioned, an AI Engineer would have to think about the entire scope of a project and evaluate and select the most appropriate tools for each workload across the AI development pipeline.</p><p>This time, we&#8217;re talking about Inference, specifically LLM Inference solutions for rapid prototyping of any System that relies on LLMs or Agents.</p><p>The AI landscape is <strong>quite large enough</strong>, with more tools and frameworks joining the race, but there are only a few that deserve your time and attention, judging by the most common use cases an AI Engineer would work on.</p><p>In this article, we&#8217;ll focus on <strong>Ollama</strong>, which is currently one of the simplest and most efficient ways to run and develop with LLMs locally, without the burden of complex setups and configurations.</p><p>Let&#8217;s define the structure of this article.</p><h2>Table of Contents</h2><ol><li><p><em>What is Ollama, and why does it matter</em></p></li><li><p><em><strong>[VIDEO]</strong> What happens once you install Ollama</em></p></li><li><p><em>The High-Level Architecture</em></p></li><li><p><em><strong>[VIDEO]</strong> Customizing Ollama Models Locally</em></p></li><li><p><em><strong>[VIDEO]</strong> Adding Models from HuggingFace</em></p></li><li><p><em><strong>[VIDEO]</strong> Running Ollama OpenAI API Python Client</em></p></li><li><p><em>Running Ollama Server in Docker</em></p></li><li><p><em>Conclusion</em></p></li></ol><div><hr></div><h2>1. What is Ollama, and why does it matter</h2><p>Ollama is an open-source inference framework that simplifies the process of running LLMs locally. The repository has over 500 contributors and <strong><a href="https://github.com/ollama/ollama">over 150k stars</a></strong>, making it a mature, active, and well-maintained codebase with frequent releases, which enforces its position in the LLM Inference landscape.</p><blockquote><p><strong>Pro Tip:</strong> Whenever considering a tool or framework to use, always look for the liveness of the codebase, stars, contributions, PRs and releases and pick something that&#8217;s active and established within the field.</p></blockquote><p>Using <strong><a href="https://ollama.com/">Ollama</a></strong>, you can easily prototype and build applications on top of LLMs without having to connect to APIs or Cloud LLM Providers. Although it also contains a model registry and exposes an API connection just like the others, you can run your LLM models locally with Ollama.</p><p>What is the Key Value Proposition of Ollama?</p><ol><li><p>We should start with <em>Privacy</em>, running LLMs on your local hardware.</p></li><li><p>Next would be <em>Accessibility</em>, as it simplifies the setup massively. For example, to get your model running locally with `llama.cpp`, you might spend a few hours around the `Makefile`.</p></li><li><p>Third, <em>Customisation</em>, bring your own models to be served with Ollama, with a few extra steps of converting the format to a Modelfile for non-existing ones.</p></li><li><p>Lastly, <em>Quantization</em> allows LLM models to run on older-generation NVIDIA GPUs, lower VRAM GPUs, AMD, M1, traditional CPUs, or even Edge Hardware.</p></li></ol><p>Amongst developers that are working on LLM-powered applications, Ollama is one of the top choices for the local inference serving component.</p><p>Before diving into the interesting bits of how Ollama works, first, let&#8217;s go through and understand how it&#8217;s installed on your system, as there are a few subtle differences varying across macOS, Linux, and Windows.</p><h2>What happens once you install Ollama</h2><p>Ollama is built in Go, also known as Golang, which is a compiled language alongside others such as C++, C, Rust, or C#. </p><p>That means, when you install it, a compiled binary for your specific CPU architecture and OS configuration is copied and added to your applications. On Windows, the installer comes with an `.exe`, on macOS, the installer comes as a `.pkg`, whereas on Linux, you install it via an `install.sh`.</p><h4>MacOS and Windows</h4><p>On Windows and Mac, the setup is quite straightforward in terms of what&#8217;s happening under the hood. You go to the Ollama website, select your OS, <a href="https://ollama.com/download/mac">download the installer</a>, and then a GUI guides you through the process.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aWzz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67fccdfa-5089-4d77-bcbe-7a1412e6972d_1135x649.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aWzz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67fccdfa-5089-4d77-bcbe-7a1412e6972d_1135x649.png 424w, https://substackcdn.com/image/fetch/$s_!aWzz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67fccdfa-5089-4d77-bcbe-7a1412e6972d_1135x649.png 848w, https://substackcdn.com/image/fetch/$s_!aWzz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67fccdfa-5089-4d77-bcbe-7a1412e6972d_1135x649.png 1272w, https://substackcdn.com/image/fetch/$s_!aWzz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67fccdfa-5089-4d77-bcbe-7a1412e6972d_1135x649.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!aWzz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67fccdfa-5089-4d77-bcbe-7a1412e6972d_1135x649.png" width="579" height="331.07577092511013" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/67fccdfa-5089-4d77-bcbe-7a1412e6972d_1135x649.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:649,&quot;width&quot;:1135,&quot;resizeWidth&quot;:579,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Ollama Webpage&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Ollama Webpage" title="Ollama Webpage" srcset="https://substackcdn.com/image/fetch/$s_!aWzz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67fccdfa-5089-4d77-bcbe-7a1412e6972d_1135x649.png 424w, https://substackcdn.com/image/fetch/$s_!aWzz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67fccdfa-5089-4d77-bcbe-7a1412e6972d_1135x649.png 848w, https://substackcdn.com/image/fetch/$s_!aWzz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67fccdfa-5089-4d77-bcbe-7a1412e6972d_1135x649.png 1272w, https://substackcdn.com/image/fetch/$s_!aWzz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67fccdfa-5089-4d77-bcbe-7a1412e6972d_1135x649.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 2. Ollama landing page when downloading the Ollama binary.</figcaption></figure></div><p>For Linux, on the other hand, a few more steps take place, which you might be curious about, and that&#8217;s what we&#8217;re diving into in the next section.</p><h4>Ollama on Linux</h4><p>On Linux, we get an `install.sh` script, which sets up Ollama on our Linux machine. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_7LJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe15959e5-2842-4185-82f0-b0c5e1af4d01_1058x732.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_7LJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe15959e5-2842-4185-82f0-b0c5e1af4d01_1058x732.png 424w, https://substackcdn.com/image/fetch/$s_!_7LJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe15959e5-2842-4185-82f0-b0c5e1af4d01_1058x732.png 848w, https://substackcdn.com/image/fetch/$s_!_7LJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe15959e5-2842-4185-82f0-b0c5e1af4d01_1058x732.png 1272w, https://substackcdn.com/image/fetch/$s_!_7LJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe15959e5-2842-4185-82f0-b0c5e1af4d01_1058x732.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_7LJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe15959e5-2842-4185-82f0-b0c5e1af4d01_1058x732.png" width="627" height="433.80340264650283" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e15959e5-2842-4185-82f0-b0c5e1af4d01_1058x732.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:732,&quot;width&quot;:1058,&quot;resizeWidth&quot;:627,&quot;bytes&quot;:64995,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/175878656?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe15959e5-2842-4185-82f0-b0c5e1af4d01_1058x732.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!_7LJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe15959e5-2842-4185-82f0-b0c5e1af4d01_1058x732.png 424w, https://substackcdn.com/image/fetch/$s_!_7LJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe15959e5-2842-4185-82f0-b0c5e1af4d01_1058x732.png 848w, https://substackcdn.com/image/fetch/$s_!_7LJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe15959e5-2842-4185-82f0-b0c5e1af4d01_1058x732.png 1272w, https://substackcdn.com/image/fetch/$s_!_7LJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe15959e5-2842-4185-82f0-b0c5e1af4d01_1058x732.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 3. The Ollama install option for Linux Distributions.</figcaption></figure></div><p>Most of the time, you&#8217;d be installing it using the provided command, but for engineers who require customization or want to disable specific Flags, there&#8217;s a Manual Install workflow one could take. For instance, as an AI Engineer installing Ollama locally, you might want to:</p><ol><li><p><em><strong>Disable</strong></em> Ollama from starting automatically when your System boots up.</p></li><li><p>Test Ollama on CPU only, <em><strong>disable HW</strong></em> Acceleration.</p></li><li><p><strong>Pin Ollama</strong> to a specific CUDA version on your System.</p></li></ol><blockquote><p><strong>Tip: </strong>For all the steps mentioned above, you&#8217;ll want to manually install it. For a default instalation, which is the common option - just use the install.sh script.</p></blockquote><h4>The System Configuration for Ollama on Linux</h4><p>Let&#8217;s do a short but deep dive on what&#8217;s happening underneath when you run the install.sh script to install Ollama on Linux. To summarize that, we have the following 3 components:</p><ol><li><p><em>Installing the System Dependencies</em></p><pre><code>NEEDS=$(require curl awk grep sed tee xargs)
if [ -n &#8220;$NEEDS&#8221; ]; then
    status &#8220;ERROR: The following tools are required but missing:&#8221;
    for NEED in $NEEDS; do
        echo &#8220;  - $NEED&#8221;
    done
    exit 1
fi

for BINDIR in /usr/local/bin /usr/bin /bin; do
    echo $PATH | grep -q $BINDIR &amp;&amp; break || continue
done
OLLAMA_INSTALL_DIR=$(dirname ${BINDIR})</code></pre></li><li><p><em>Configuring Ollama as a SystemD Service</em></p><pre><code>cat &lt;&lt;EOF | $SUDO tee /etc/systemd/system/ollama.service &gt;/dev/null
[Unit]
Description=Ollama Service
After=network-online.target

[Service]
ExecStart=$BINDIR/ollama serve
User=ollama
Group=ollama
Restart=always
RestartSec=3
Environment=&#8221;PATH=$PATH&#8221;

[Install]
WantedBy=default.target</code></pre></li><li><p><em>Installing GPU Libraries (if GPU present)</em></p><pre><code>check_gpu() {
    # Look for devices based on vendor ID for NVIDIA and AMD
    case $1 in
        lspci)
            case $2 in
                nvidia) available lspci &amp;&amp; lspci -d &#8216;10de:&#8217; | grep -q &#8216;NVIDIA&#8217; || return 1 ;;
                amdgpu) available lspci &amp;&amp; lspci -d &#8216;1002:&#8217; | grep -q &#8216;AMD&#8217; || return 1 ;;
            esac ;;
        lshw)
            case $2 in
                nvidia) available lshw &amp;&amp; $SUDO lshw -c display -numeric -disable network | grep -q &#8216;vendor: .* \[10DE\]&#8217; || return 1 ;;
                amdgpu) available lshw &amp;&amp; $SUDO lshw -c display -numeric -disable network | grep -q &#8216;vendor: .* \[1002\]&#8217; || return 1 ;;
            esac ;;
        nvidia-smi) available nvidia-smi || return 1 ;;
    esac
}</code></pre></li></ol><p>Follow this <strong>live-coding</strong> tutorial, where we walk through all these components.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;be91c36f-6e92-48a3-99d5-6f49ab29504f&quot;,&quot;duration&quot;:null}"></div><div><hr></div><h2>The High-Level Architecture</h2><p>When you download Ollama for Mac or Windows, you get an executable that, once started, automatically brings up an HTTP server as a process in the system&#8217;s applications. </p><p>Ollama is composed of three components: Model, Server, and Inference Engine. Starting with the model, this is your GGUF LLM Checkpoint.</p><blockquote><p><strong>Tip: </strong>To see a similar deep-dive on GGUF, GGML and llama.cpp, see <strong><a href="https://multimodalai.substack.com/p/an-ai-engineers-guide-to-running">this previous article.</a></strong></p></blockquote><p>Given that, Ollama is not actually handling the heavy processing of the AI inference. It just acts as an abstraction layer on top to orchestrate everything, with the heavy lifting being done by the llama.cpp &#8594; GGLM &#8594; GGUF pipeline.</p><p>In Figure 4 below, we describe a summarized diagram of how everything couples together:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Jmyy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe37b1c64-b618-4392-9b79-bf2d938961e3_1363x2376.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Jmyy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe37b1c64-b618-4392-9b79-bf2d938961e3_1363x2376.png 424w, https://substackcdn.com/image/fetch/$s_!Jmyy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe37b1c64-b618-4392-9b79-bf2d938961e3_1363x2376.png 848w, https://substackcdn.com/image/fetch/$s_!Jmyy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe37b1c64-b618-4392-9b79-bf2d938961e3_1363x2376.png 1272w, https://substackcdn.com/image/fetch/$s_!Jmyy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe37b1c64-b618-4392-9b79-bf2d938961e3_1363x2376.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Jmyy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe37b1c64-b618-4392-9b79-bf2d938961e3_1363x2376.png" width="271" height="472.41085840058696" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e37b1c64-b618-4392-9b79-bf2d938961e3_1363x2376.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2376,&quot;width&quot;:1363,&quot;resizeWidth&quot;:271,&quot;bytes&quot;:340639,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/175878656?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe37b1c64-b618-4392-9b79-bf2d938961e3_1363x2376.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Jmyy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe37b1c64-b618-4392-9b79-bf2d938961e3_1363x2376.png 424w, https://substackcdn.com/image/fetch/$s_!Jmyy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe37b1c64-b618-4392-9b79-bf2d938961e3_1363x2376.png 848w, https://substackcdn.com/image/fetch/$s_!Jmyy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe37b1c64-b618-4392-9b79-bf2d938961e3_1363x2376.png 1272w, https://substackcdn.com/image/fetch/$s_!Jmyy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe37b1c64-b618-4392-9b79-bf2d938961e3_1363x2376.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 4. The simplified workflow of how Ollama works on top of GGML and Llama.cpp</figcaption></figure></div><p>From a workflow perspective, this is how Ollama handles things under the hood:</p><ol><li><p>You have an LLM Model Checkpoint in GGUF</p></li><li><p>When Ollama loads the model, it starts a llama.cpp inference server as a separate server, and passes the GGUF model path to it.</p></li><li><p>The llama.cpp server unpacks the GGUF file using the GGML library and creates a computation graph of the model.</p></li><li><p>When Ollama receives a Prompt, it routes it to the llama.cpp server that handles the workload.</p></li><li><p>Ollama then streams the decoded text token to the caller or returns the full response.</p></li></ol><p>The takeaway here is that Ollama is an easy-to-set-up and use abstraction. Getting started with llama.cpp directly involves building the binary for your system architecture, running manual scripts, and learning additional commands. </p><p>We&#8217;re unpacking Ollama first as it&#8217;s both the fastest and familiar way to get up and running with local LLMs.</p><blockquote><p><strong>Query</strong>: In future tutorials, we might also look into low-level llama.cpp for Advanced Users. </p></blockquote><h4>The End-to-End Ollama Workflow</h4><p>In Figure 5 below, we map every action that takes place once you start a model using the Interactive CLI (Terminal) to chat with your model. Starting with loading using `ollama run &lt;model_name&gt;:&lt;version&gt;`, the HTTP Server will route the request and start a `llama.cpp` server to act as the Inference Engine.</p><p>Then, with each input prompt, the Ollama server routes it to llama.cpp for inference, and streams back the generated tokens.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7m9l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a3cc8e4-87e4-48fa-bb2a-ea6d1e61d629_2861x2390.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7m9l!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a3cc8e4-87e4-48fa-bb2a-ea6d1e61d629_2861x2390.png 424w, https://substackcdn.com/image/fetch/$s_!7m9l!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a3cc8e4-87e4-48fa-bb2a-ea6d1e61d629_2861x2390.png 848w, https://substackcdn.com/image/fetch/$s_!7m9l!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a3cc8e4-87e4-48fa-bb2a-ea6d1e61d629_2861x2390.png 1272w, https://substackcdn.com/image/fetch/$s_!7m9l!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a3cc8e4-87e4-48fa-bb2a-ea6d1e61d629_2861x2390.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7m9l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a3cc8e4-87e4-48fa-bb2a-ea6d1e61d629_2861x2390.png" width="1456" height="1216" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8a3cc8e4-87e4-48fa-bb2a-ea6d1e61d629_2861x2390.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1216,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:462650,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/175878656?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a3cc8e4-87e4-48fa-bb2a-ea6d1e61d629_2861x2390.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!7m9l!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a3cc8e4-87e4-48fa-bb2a-ea6d1e61d629_2861x2390.png 424w, https://substackcdn.com/image/fetch/$s_!7m9l!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a3cc8e4-87e4-48fa-bb2a-ea6d1e61d629_2861x2390.png 848w, https://substackcdn.com/image/fetch/$s_!7m9l!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a3cc8e4-87e4-48fa-bb2a-ea6d1e61d629_2861x2390.png 1272w, https://substackcdn.com/image/fetch/$s_!7m9l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a3cc8e4-87e4-48fa-bb2a-ea6d1e61d629_2861x2390.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 5: Ollama model workflow across the loading of the model and routing the chat requests to the llama.cpp inference engine.</figcaption></figure></div><p>Running pre-defined models is pretty straightforward, with no additional steps required. However, for adding custom models, we have a few options that is downloading a model from Ollama Library, editing a model locally, or bringing our own model from a HuggingFace GGUF Checkpoint.</p><h2>Ollama Models Locally</h2><p>Before showcasing how to register new models with Ollama, first, we have to explain what a Modelfile is.</p><blockquote><p><strong>Def:</strong> From the documentation, a Modelfile is the blueprint to create and share models with Ollama.</p></blockquote><p>If you think of an Ollama model as a Docker Image, the Modelfile is similar to the Dockerfile used to build the layers for that image. In an Ollama Model file, we store the source of the model, the parameters such as Chat Template, Sampling TopK, TopP, Documentation, License, and other additional fields as a blueprint configuration for the model.</p><p>Here&#8217;s a basic example (<a href="https://ollama.readthedocs.io/en/modelfile/#basic-modelfile">from the docs</a>):</p><pre><code>FROM llama3.2
# sets the temperature to 1 [higher is more creative, lower is more coherent]
PARAMETER temperature 1
# sets the context window size to 4096, this controls how many tokens the LLM can use as context to generate the next token
PARAMETER num_ctx 4096

# sets a custom system message to specify the behavior of the chat assistant
SYSTEM You are Mario from super mario bros, acting as an assistant.</code></pre><p>Also, for downloading models locally, you could simply use the `ollama pull` command and inspect the <strong><a href="https://ollama.com/library">Ollama Model Library</a></strong> for any model.</p><pre><code>ollama pull gemma3:4b</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!meGp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ef7ac64-0d32-49db-b635-cdadebe1fa6d_1492x1210.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!meGp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ef7ac64-0d32-49db-b635-cdadebe1fa6d_1492x1210.png 424w, https://substackcdn.com/image/fetch/$s_!meGp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ef7ac64-0d32-49db-b635-cdadebe1fa6d_1492x1210.png 848w, https://substackcdn.com/image/fetch/$s_!meGp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ef7ac64-0d32-49db-b635-cdadebe1fa6d_1492x1210.png 1272w, https://substackcdn.com/image/fetch/$s_!meGp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ef7ac64-0d32-49db-b635-cdadebe1fa6d_1492x1210.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!meGp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ef7ac64-0d32-49db-b635-cdadebe1fa6d_1492x1210.png" width="1456" height="1181" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9ef7ac64-0d32-49db-b635-cdadebe1fa6d_1492x1210.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1181,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:155577,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/175878656?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ef7ac64-0d32-49db-b635-cdadebe1fa6d_1492x1210.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!meGp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ef7ac64-0d32-49db-b635-cdadebe1fa6d_1492x1210.png 424w, https://substackcdn.com/image/fetch/$s_!meGp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ef7ac64-0d32-49db-b635-cdadebe1fa6d_1492x1210.png 848w, https://substackcdn.com/image/fetch/$s_!meGp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ef7ac64-0d32-49db-b635-cdadebe1fa6d_1492x1210.png 1272w, https://substackcdn.com/image/fetch/$s_!meGp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ef7ac64-0d32-49db-b635-cdadebe1fa6d_1492x1210.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 6: The Ollama Model Library with pre-configured GGUF checkpoints, alongside their Modelfiles.</figcaption></figure></div><p>In the following <strong>live-coding segment</strong>, we&#8217;ll go through:</p><ul><li><p>Viewing Model files for existing Models</p></li><li><p>Editing the Gemma3-1B Model file and registering a new Model</p></li><li><p>Comparing model versions by changing the Sampling Configurations</p></li></ul><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;135315bc-24ac-4286-9bf5-81ae80eaca9d&quot;,&quot;duration&quot;:null}"></div><div><hr></div><h2>Adding Models from HuggingFace</h2><p>As a second option, we could download GGUF checkpoints for any LLM model from HuggingFace and register them as a custom model in our local Ollama registry.</p><p>In the following live-coding segment, we&#8217;ll go through:</p><ul><li><p>Creating a Python Environment with UV</p></li><li><p>Installing the HuggingFace Hub CLI</p></li><li><p>Authenticating using an Access Token</p></li><li><p>Downloading Phi-3-mini-4k-instruct-Q4_K.gguf</p></li><li><p>Registering and testing it in Ollama</p></li></ul><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;ca7a6831-0cd6-4fd1-aa5a-201a5dba5257&quot;,&quot;duration&quot;:null}"></div><div><hr></div><h2>Running Ollama OpenAI API Python Client</h2><p>In the previous examples, we&#8217;ve showcased the Interactive Ollama Client, which runs in the CLI. That&#8217;s more of a playground, or for rapid prototyping to test how your model responds to different queries.</p><p>On a more serious note, if we build a real AI project, we need to define the client as part of an API or the Application itself. In this section, we&#8217;ll showcase how one could create an <a href="https://ollama.com/blog/openai-compatibility">Ollama Client</a> in Python using the <a href="https://github.com/openai/openai-openapi?tab=readme-ov-file">OpenAI API </a>Schema-compatible endpoints.</p><blockquote><p><strong>Info:</strong> When OpenAI<strong> </strong>launched the GPT-3 API in mid-2020, it was the first widely available commercial <strong><a href="https://github.com/openai/openai-openapi?tab=readme-ov-file">API</a></strong>, so developers got the time to familiarize themselves with the Schema formats and endpoints. Furthermore, to address the same developer base, the new frameworks and LLM providers choose to &#8220;adapt&#8221; to this schema format.</p></blockquote><p>The popular endpoints that you might&#8217;ve seen elsewhere if you&#8217;ve worked with LLM providers&#8217; APIs are:</p><ul><li><p><em><strong>/v1/completions</strong></em>: Text completions for a single, free-form text prompt.</p></li><li><p><em><strong>/v1/chat/completions</strong></em>: Generates conversational responses.</p></li><li><p><em><strong>/v1/models</strong></em>: Lists the available models, the server can load from cache.</p></li><li><p><em><strong>/v1/embeddings</strong></em>: Returns the raw embeddings of a text input.</p></li></ul><p>In the following video segment, we&#8217;re going to demonstrate how one can build and connect to the Ollama Server directly from Python, following the OpenAI API schema.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;a17ebd94-c4a8-43dd-8f83-358867aed9da&quot;,&quot;duration&quot;:null}"></div><h2>Running Ollama Server in Docker</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ALZm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82b3551c-4280-41c9-bceb-a230ef910f26_1314x960.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ALZm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82b3551c-4280-41c9-bceb-a230ef910f26_1314x960.png 424w, https://substackcdn.com/image/fetch/$s_!ALZm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82b3551c-4280-41c9-bceb-a230ef910f26_1314x960.png 848w, https://substackcdn.com/image/fetch/$s_!ALZm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82b3551c-4280-41c9-bceb-a230ef910f26_1314x960.png 1272w, https://substackcdn.com/image/fetch/$s_!ALZm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82b3551c-4280-41c9-bceb-a230ef910f26_1314x960.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ALZm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82b3551c-4280-41c9-bceb-a230ef910f26_1314x960.png" width="473" height="345.57077625570776" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/82b3551c-4280-41c9-bceb-a230ef910f26_1314x960.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:960,&quot;width&quot;:1314,&quot;resizeWidth&quot;:473,&quot;bytes&quot;:114604,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/175878656?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82b3551c-4280-41c9-bceb-a230ef910f26_1314x960.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ALZm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82b3551c-4280-41c9-bceb-a230ef910f26_1314x960.png 424w, https://substackcdn.com/image/fetch/$s_!ALZm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82b3551c-4280-41c9-bceb-a230ef910f26_1314x960.png 848w, https://substackcdn.com/image/fetch/$s_!ALZm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82b3551c-4280-41c9-bceb-a230ef910f26_1314x960.png 1272w, https://substackcdn.com/image/fetch/$s_!ALZm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82b3551c-4280-41c9-bceb-a230ef910f26_1314x960.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 7: Ollama is available as a Docker Image. (<strong><a href="https://ollama.com/blog/ollama-is-now-available-as-an-official-docker-image">Source</a></strong>)</figcaption></figure></div><p>If you build a multi-container application, the best solution is to run both the Ollama Server and your Application Client as separate Docker containers. Since last year, Ollama has been available as a Docker container that you could start up quite easily.</p><h4><strong>For CPU Only</strong></h4><pre><code>docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama</code></pre><h4><strong>For GPU Accelerated (NVIDIA)</strong></h4><p>You have to mount the GPUs using `&#8212;gpus=all` such that Docker socket can allow the container to use the GPU interface.</p><pre><code>docker run -d --gpus=all -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama</code></pre><h4><strong>For starting a model</strong></h4><pre><code><code>docker exec -it ollama ollama run gemma3:1b</code></code></pre><h4><strong>Service in Docker Compose</strong></h4><p>Using this setup, you could add more services to your Docker Compose and build a more advanced application with a robust and reproducible way for deployment.</p><pre><code>version: &#8220;3.9&#8221;

services:
  ollama:
    image: ollama/ollama:latest
    container_name: ollama
    restart: unless-stopped
    ports:
      - &#8220;11434:11434&#8221;
    volumes:
      - &lt;your_cache&gt;:/root/.ollama
    networks:
      - ollama-net
    environment:
      - OLLAMA_HOST=0.0.0.0
      deploy:
        resources:
          reservations:
            devices:
              - driver: nvidia
                count: all
                capabilities: [gpu]

networks:
  ollama-net:
    driver: bridge

volumes:
  &lt;your_cache&gt;:</code></pre><div><hr></div><h2>Ollama Cloud</h2><p>Ollama&#8217;s cloud is a new way to run open models using datacenter-grade hardware. Many new models are too large to fit on widely available GPUs or run very slowly. Ollama&#8217;s cloud provides a way to run these models fast while using Ollama&#8217;s App, CLI, and API.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3ZF0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F154e07f5-ebf7-4e44-9da2-29f18967157d_1330x964.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3ZF0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F154e07f5-ebf7-4e44-9da2-29f18967157d_1330x964.png 424w, https://substackcdn.com/image/fetch/$s_!3ZF0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F154e07f5-ebf7-4e44-9da2-29f18967157d_1330x964.png 848w, https://substackcdn.com/image/fetch/$s_!3ZF0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F154e07f5-ebf7-4e44-9da2-29f18967157d_1330x964.png 1272w, https://substackcdn.com/image/fetch/$s_!3ZF0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F154e07f5-ebf7-4e44-9da2-29f18967157d_1330x964.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3ZF0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F154e07f5-ebf7-4e44-9da2-29f18967157d_1330x964.png" width="1330" height="964" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/154e07f5-ebf7-4e44-9da2-29f18967157d_1330x964.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:964,&quot;width&quot;:1330,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:114935,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/175878656?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F154e07f5-ebf7-4e44-9da2-29f18967157d_1330x964.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3ZF0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F154e07f5-ebf7-4e44-9da2-29f18967157d_1330x964.png 424w, https://substackcdn.com/image/fetch/$s_!3ZF0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F154e07f5-ebf7-4e44-9da2-29f18967157d_1330x964.png 848w, https://substackcdn.com/image/fetch/$s_!3ZF0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F154e07f5-ebf7-4e44-9da2-29f18967157d_1330x964.png 1272w, https://substackcdn.com/image/fetch/$s_!3ZF0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F154e07f5-ebf7-4e44-9da2-29f18967157d_1330x964.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h2>Conclusion</h2><p>In this article, we&#8217;ve explored Ollama in depth, how it works under the hood, and how you can install, configure, and experiment with models using the CLI, Docker, or Python.</p><p>Ollama is one of the most, if not the most, developer-friendly solutions for running LLMs locally. It builds on top of the llama.cpp runtim, while abstracting away the complexity of model loading, quantization, and inference management. Its built-in high-performance HTTP server, written in Go, handles the multi-model orchestration and efficient request handling, all out of the box.</p><p>If you&#8217;re prototyping with small checkpoints, fine-tuning your own models, or deploying local LLMs for your Chatbots or Agentic Applications, <strong>Ollama is the best solution for that.</strong></p><p>In the first two articles, we covered llama.cpp, GGML, GGUF and Ollama. In the next series, we&#8217;ll move further towards building a more complex AI System and Agents, where we&#8217;ll be using Ollama and GGUF model checkpoints for local inference.</p><p>Stay tuned!</p><div><hr></div><p>Images and Media were generated by the author, if not otherwise stated.</p><div><hr></div><h4>References</h4><p><em>[1] Ollama</em>. (2024). Ollama. <a href="https://ollama.com/blog/openai-compatibility">https://ollama.com/blog/openai-compatibility</a></p><p><em>[2] Ollama</em>. (2023). Ollama. <a href="https://ollama.com/blog/ollama-is-now-available-as-an-official-docker-image">https://ollama.com/blog/ollama-is-now-available-as-an-official-docker-image</a></p><p><em>[3] OpenAI Platform</em>. (2025). Openai.com. <a href="https://platform.openai.com/docs/api-reference/introduction">https://platform.openai.com/docs/api-reference/introduction</a></p><p><em>[4] openai/openai-openapi: OpenAPI specification for the OpenAI API</em>. (2023, June 19). GitHub. <a href="https://github.com/openai/openai-openapi?tab=readme-ov-file">https://github.com/openai/openai-openapi?tab=readme-ov-file</a></p><p>[5] Razvant, A. (2025, October 18). <em>An AI Engineer&#8217;s Guide to Running LLMs on CPUs, GPUs, and Edge Devices</em>. Substack.com; Neural Bits. <a href="https://multimodalai.substack.com/p/an-ai-engineers-guide-to-running">https://multimodalai.substack.com/p/an-ai-engineers-guide-to-running</a></p><p>[&#8204;&#8204;6] Razvant, A. (2025, February 20). <em>Understanding LLM Inference</em>. Substack.com; Neural Bits. <a href="https://multimodalai.substack.com/p/understanding-llm-inference">https://multimodalai.substack.com/p/understanding-llm-inference</a></p><p>&#8204;</p>]]></content:encoded></item><item><title><![CDATA[I’ve Partnered with NVIDIA! 🔥]]></title><description><![CDATA[This means I can distill direct insights from NVIDIA experts!]]></description><link>https://read.theaimerge.com/p/ive-partnered-with-nvidia</link><guid isPermaLink="false">https://read.theaimerge.com/p/ive-partnered-with-nvidia</guid><dc:creator><![CDATA[Alex Razvant]]></dc:creator><pubDate>Sat, 04 Oct 2025 14:09:01 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!GhcX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327d8ad-c97d-4ccb-9f86-6bc893d72139_3750x3750.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Welcome to Neural Bits. Each week, I write about practical, production-ready AI/ML Engineering. Join over <strong><a href="https://multimodalai.substack.com/subscribe">6200 engineers</a></strong> and build real-world AI Systems.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p><strong>Hey all, awesome news!</strong></p><p>A big reason I started the Neural Bits Newsletter was to distill, showcase, and teach the real-world side of AI, avoiding hype and focusing on building real AI systems.</p><p>As a senior AI engineer, my technical writing focuses mainly on deep dives: going low-level into details, unpacking how things work, and then building systems that make it all come together. </p><p>My philosophy is simple: <strong>first deeply understand AI, then build with AI</strong>. <br>That&#8217;s what I&#8217;ve been doing for the past 8 years.</p><div><hr></div><h3><strong>How it started</strong></h3><p>I&#8217;ve been covering NVIDIA and AI for quite a while. One of my first articles on the newsletter was unpacking <a href="https://multimodalai.substack.com/p/deep-dive-into-nvidia-nims-for-generative">NVIDIA NIM</a>, then Triton Server, Dynamo, and more.</p><p>That caught NVIDIA&#8217;s eye. Many people working for NVIDIA engaged, reshared, and even messaged me about my content on AI/ML.</p><p>Over the past few months, I&#8217;ve had a few chats with NVIDIA, attended workshops, been invited to pre-release sessions, in-depth walkthroughs, and developer sessions. </p><p>Now that got supercharged!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Oiof!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e4d1957-c3ba-46bd-bc4b-340a016c849a_1532x702.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Oiof!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e4d1957-c3ba-46bd-bc4b-340a016c849a_1532x702.png 424w, https://substackcdn.com/image/fetch/$s_!Oiof!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e4d1957-c3ba-46bd-bc4b-340a016c849a_1532x702.png 848w, https://substackcdn.com/image/fetch/$s_!Oiof!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e4d1957-c3ba-46bd-bc4b-340a016c849a_1532x702.png 1272w, https://substackcdn.com/image/fetch/$s_!Oiof!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e4d1957-c3ba-46bd-bc4b-340a016c849a_1532x702.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Oiof!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e4d1957-c3ba-46bd-bc4b-340a016c849a_1532x702.png" width="1456" height="667" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1e4d1957-c3ba-46bd-bc4b-340a016c849a_1532x702.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:667,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:665284,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/175269831?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e4d1957-c3ba-46bd-bc4b-340a016c849a_1532x702.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Oiof!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e4d1957-c3ba-46bd-bc4b-340a016c849a_1532x702.png 424w, https://substackcdn.com/image/fetch/$s_!Oiof!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e4d1957-c3ba-46bd-bc4b-340a016c849a_1532x702.png 848w, https://substackcdn.com/image/fetch/$s_!Oiof!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e4d1957-c3ba-46bd-bc4b-340a016c849a_1532x702.png 1272w, https://substackcdn.com/image/fetch/$s_!Oiof!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e4d1957-c3ba-46bd-bc4b-340a016c849a_1532x702.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Some of my featured posts, reshared by NVIDIA Folks from various teams (GenAI, CUDA, TensoRT, NIM, RTX)</figcaption></figure></div><div><hr></div><h3><strong>A Technical Sneakpeek</strong></h3><p>Since I don&#8217;t want to keep this article informal only, I added a full walkthrough on NVIDIA Nemotron Models.</p><p>I&#8217;ve been keeping an eye on the entire landscape of AI models out there, lately on Agentic or Reasoning-powered ones. I&#8217;ve built with LLama 3, Qwen-2.5VL, Qwen3, and DeepSeek distilled versions.</p><p>Recently, the <a href="https://www.nvidia.com/en-us/ai-data-science/foundation-models/nemotron/">Nemotron Family</a> of models caught my eye.</p><blockquote><p>Reading the docs, multiple improvements were added, from post-training techniques, to new compute kernels and even new neural network layers.</p></blockquote><p>I&#8217;m planning to build something around the Nano models to enable agentic reasoning on low-resource compute, and will keep you updated on the topic. </p><p>For now, I&#8217;ve created this flowchart to cover the landscape of how these models were built, finetuned, and improved.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GhcX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327d8ad-c97d-4ccb-9f86-6bc893d72139_3750x3750.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GhcX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327d8ad-c97d-4ccb-9f86-6bc893d72139_3750x3750.png 424w, https://substackcdn.com/image/fetch/$s_!GhcX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327d8ad-c97d-4ccb-9f86-6bc893d72139_3750x3750.png 848w, https://substackcdn.com/image/fetch/$s_!GhcX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327d8ad-c97d-4ccb-9f86-6bc893d72139_3750x3750.png 1272w, https://substackcdn.com/image/fetch/$s_!GhcX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327d8ad-c97d-4ccb-9f86-6bc893d72139_3750x3750.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GhcX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327d8ad-c97d-4ccb-9f86-6bc893d72139_3750x3750.png" width="1456" height="1456" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3327d8ad-c97d-4ccb-9f86-6bc893d72139_3750x3750.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1456,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:754822,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/175269831?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327d8ad-c97d-4ccb-9f86-6bc893d72139_3750x3750.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!GhcX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327d8ad-c97d-4ccb-9f86-6bc893d72139_3750x3750.png 424w, https://substackcdn.com/image/fetch/$s_!GhcX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327d8ad-c97d-4ccb-9f86-6bc893d72139_3750x3750.png 848w, https://substackcdn.com/image/fetch/$s_!GhcX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327d8ad-c97d-4ccb-9f86-6bc893d72139_3750x3750.png 1272w, https://substackcdn.com/image/fetch/$s_!GhcX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3327d8ad-c97d-4ccb-9f86-6bc893d72139_3750x3750.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">NVIDIA Nemotron Model Family Landscape, techniques, improvements, variants, and real-world uses.</figcaption></figure></div><div><hr></div><h3><strong>What This Partnership Means</strong></h3><p>For over <strong>8 years</strong>, I&#8217;ve been working with AI and Deep Learning, building Vision AI Systems, RAG, and Multimodal RAG, everything around LLMs, and recently Agents and Multi-Agent Systems. I&#8217;ve shared deep dives into tools, frameworks, and workflows that AI engineers need to build, deploy robust and scalable<strong> </strong>AI workloads. </p><p>My content is different, deeply technical in the sense that I don&#8217;t stay at the surface, but go through the complete chain, from low-level concepts to best practices in building with AI.</p><p>My main goal is to bridge the gap between what&#8217;s real vs hyped up stuff. To talk about what an AI/ML Engineer really needs.</p><p>From Concepts, GPUs, Data, Pipelines, Models, Architectures, AI Research, Software Engineering, Deployments, Scale, APIs, Optimizations, etc.</p><p>With this partnership, I&#8217;ll now be collaborating directly with <strong>NVIDIA experts</strong>, giving you access to exclusive insights, tutorials, and deep dives.</p><p></p><div><hr></div><h3><strong>BONUS - Free NVIDIA Webinar</strong></h3><p>From CUDA, TensorRT-LLM, NeMo, Triton, to Dynamo, each of these frameworks and libraries powers a different part of the AI development chain. For an AI Engineer, it might be overwhelming at first to get through all of these.</p><p>Naturally, the next set of questions comes up:</p><ul><li><p> How can I get better at using NVIDIA&#8217;s software stack?</p></li><li><p>Which courses or certifications could I pick?</p></li></ul><p>This upcoming session will help you find those answers.</p><p>NVIDIA Training is hosting a FREE webinar to guide you through their Generative AI certification exams.</p><p><strong>Register here</strong>:  https://nvda.ws/4mBCirc<br>&#128197; Tuesday, October 7, 2025 | 9:00 a.m. CET</p><p>Seats are limited. Use your corporate email for better chances.</p><div><hr></div><h3><strong>What You Can Expect</strong></h3><ul><li><p>I won&#8217;t sell you or push for you to buy something. </p></li><li><p>I&#8217;ll be a source to distill complex concepts, from NVIDIA experts down to AI Engineers and aspiring AI enthusiasts.</p></li><li><p>I&#8217;ll keep the deep technical expertise in my articles.</p></li><li><p>I&#8217;ll focus on hands-on tutorials and practical projects you can follow step by step.</p></li></ul><div><hr></div><p>No fluff,<strong> </strong>no selling you anything - just real technical knowledge and actionable guidance on AI Engineering!</p><blockquote><p>Can&#8217;t wait to bring you the best out of this, straight to your inbox! &#129782;<br>Subscribe and stay tuned!</p></blockquote>]]></content:encoded></item><item><title><![CDATA[Piece of advice for AI Engineers]]></title><description><![CDATA[Answering a subscriber&#8217;s question: "What should I know about NVIDIA's AI Stack?&#8221;]]></description><link>https://read.theaimerge.com/p/piece-of-advice-for-ai-engineers</link><guid isPermaLink="false">https://read.theaimerge.com/p/piece-of-advice-for-ai-engineers</guid><dc:creator><![CDATA[Alex Razvant]]></dc:creator><pubDate>Sat, 27 Sep 2025 13:30:30 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!jg1-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe45a3bc5-7053-4249-8923-0ae33123e45f_1122x862.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em><strong>Welcome to Neural Bits</strong>. Each week, my subscribers receive an edition on practical, production-ready AI/ML Engineering, building skills that you need in your AI/ML Journey. Join over <strong><a href="https://multimodalai.substack.com/subscribe">6200 engineers</a></strong>, and learn how to build real-world AI Systems.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p>A few days ago, a subscriber preparing for an interview at NVIDIA asked me a simple but important question: </p><p><strong>&#8594; &#8220;What do I need to know about NVIDIA software to stand out?&#8221;</strong></p><p>That question made me realize something: while I&#8217;ve written about many of NVIDIA&#8217;s frameworks and libraries, I&#8217;ve never put together a clear step-by-step breakdown of what matters, where each tool fits, and why it&#8217;s important.</p><p>While most engineers focus on learning about the application layer, building RAG, Agents, or learning more about PyTorch, very few dive into the NVIDIA ecosystem that, in many ways, powers those frameworks.</p><p>This article is my attempt to bridge that gap for you. To keep it structured, I&#8217;ve broken it into these parts:</p><ol><li><p>AI Engineer vs AI User</p></li><li><p>A Pragmatic Mindset against Hype</p></li><li><p>Future-proof on NVIDIA&#8217;s AI tooling</p></li><li><p>What an AI Engineer should know about it</p></li></ol><p>Let&#8217;s decode it!</p><div><hr></div><h3>Setting the Ground</h3><h3>1. AI Engineer vs AI User</h3><p>First, we have to make this important distinction:</p><p>An <strong>AI Engineer</strong> isn&#8217;t the same as being an <strong>AI user</strong>. An engineer doesn&#8217;t just call models through an API, rely on blackbox dashboards to track tokens and usages, or outsource data cleaning and fine-tuning to external tools.</p><p>The title <em>engineer</em> implies ownership: you understand how each part of the AI system works, and you can actively design, optimize, and integrate those components yourself. </p><p>Making API calls is one thing - building robust AI systems is engineering.</p><h3>2. The Pragmatic Mindset</h3><p>AI is exciting, but the hype can mislead. Many roadmaps, courses, and shiny projects exist, but it&#8217;s crucial to <strong>separate what&#8217;s flashy from what&#8217;s useful</strong>.</p><p>Why? Let&#8217;s take AI Agents as an example.</p><blockquote><p>AI Agents are just a small part of what an AI System is and does, as an engineer you should focus on the entire system, not just the shiny part. </p></blockquote><p>It&#8217;s easy to spin up a POC AI Agent today, but the real work begins when you face infrastructure, optimization, evaluation, data pipelines, security and production deployment. </p><p>It&#8217;s better to keep a pragmatic mindset, master the software engineering concepts, and think in end-to-end systems.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jg1-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe45a3bc5-7053-4249-8923-0ae33123e45f_1122x862.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jg1-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe45a3bc5-7053-4249-8923-0ae33123e45f_1122x862.png 424w, https://substackcdn.com/image/fetch/$s_!jg1-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe45a3bc5-7053-4249-8923-0ae33123e45f_1122x862.png 848w, https://substackcdn.com/image/fetch/$s_!jg1-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe45a3bc5-7053-4249-8923-0ae33123e45f_1122x862.png 1272w, https://substackcdn.com/image/fetch/$s_!jg1-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe45a3bc5-7053-4249-8923-0ae33123e45f_1122x862.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jg1-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe45a3bc5-7053-4249-8923-0ae33123e45f_1122x862.png" width="474" height="364.16042780748666" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e45a3bc5-7053-4249-8923-0ae33123e45f_1122x862.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:862,&quot;width&quot;:1122,&quot;resizeWidth&quot;:474,&quot;bytes&quot;:153138,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/174676720?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe45a3bc5-7053-4249-8923-0ae33123e45f_1122x862.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!jg1-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe45a3bc5-7053-4249-8923-0ae33123e45f_1122x862.png 424w, https://substackcdn.com/image/fetch/$s_!jg1-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe45a3bc5-7053-4249-8923-0ae33123e45f_1122x862.png 848w, https://substackcdn.com/image/fetch/$s_!jg1-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe45a3bc5-7053-4249-8923-0ae33123e45f_1122x862.png 1272w, https://substackcdn.com/image/fetch/$s_!jg1-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe45a3bc5-7053-4249-8923-0ae33123e45f_1122x862.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Speaking of a pragmatic mindset, here&#8217;s a snippet from <a href="https://newsletter.pragmaticengineer.com/p/the-ai-engineering-stack">The Pragmatic Engineer Newsletter article with Chip Huyen</a> as a guest, only a single mention of Agents, multiple mentions of Infrastructure, Optimizations, Applications, and Security.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!REw3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48e11d54-218a-4899-9c64-8d457e582cde_1576x878.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!REw3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48e11d54-218a-4899-9c64-8d457e582cde_1576x878.png 424w, https://substackcdn.com/image/fetch/$s_!REw3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48e11d54-218a-4899-9c64-8d457e582cde_1576x878.png 848w, https://substackcdn.com/image/fetch/$s_!REw3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48e11d54-218a-4899-9c64-8d457e582cde_1576x878.png 1272w, https://substackcdn.com/image/fetch/$s_!REw3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48e11d54-218a-4899-9c64-8d457e582cde_1576x878.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!REw3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48e11d54-218a-4899-9c64-8d457e582cde_1576x878.png" width="618" height="344.2293956043956" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/48e11d54-218a-4899-9c64-8d457e582cde_1576x878.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:811,&quot;width&quot;:1456,&quot;resizeWidth&quot;:618,&quot;bytes&quot;:165920,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/174676720?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48e11d54-218a-4899-9c64-8d457e582cde_1576x878.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!REw3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48e11d54-218a-4899-9c64-8d457e582cde_1576x878.png 424w, https://substackcdn.com/image/fetch/$s_!REw3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48e11d54-218a-4899-9c64-8d457e582cde_1576x878.png 848w, https://substackcdn.com/image/fetch/$s_!REw3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48e11d54-218a-4899-9c64-8d457e582cde_1576x878.png 1272w, https://substackcdn.com/image/fetch/$s_!REw3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48e11d54-218a-4899-9c64-8d457e582cde_1576x878.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 2. AI Engineering Stack (feat. Chip Huyen) (<a href="https://newsletter.pragmaticengineer.com/p/the-ai-engineering-stack">source</a>)</figcaption></figure></div><div><hr></div><h3>3. Why NVIDIA Matters</h3><p>NVIDIA GPUs remain the <strong>standard for AI compute</strong>. Their ecosystem spans model training, inference, deployment, and optimization. Studying NVIDIA&#8217;s stack helps engineers understand the backbone of modern AI infrastructure. </p><blockquote><p>Why the <strong>standard</strong>? Here are three recent NVIDIA Investments:</p><ol><li><p><strong>NScale raises $1.1billion </strong><a href="https://www.cnbc.com/2025/09/25/nvidia-backed-uk-ai-firm-nscale-raises-1point1-billion-funding-round.html#:~:text=London%2Dbased%20AI%20data%20center,from%20Nvidia%2C%20Nokia%20and%20Dell.">backed by NVIDIA for the EU AI Supercluster.</a></p></li><li><p><strong>xAI Collosus Cluster</strong> <a href="https://x.ai/colossus">(200k NVIDIA Hopper GPUs)</a></p></li><li><p><strong>Meta&#8217;s Gen AI Infrastructure</strong> <a href="https://engineering.fb.com/2024/03/12/data-center-engineering/building-metas-genai-infrastructure/">(350k Hopper GPUs)</a></p></li></ol></blockquote><p>For you, this is a smart move to study and understand NVIDIA&#8217;s AI Ecosystem, as it powers a large chunk of AI Infrastructure.</p><p>Let&#8217;s decode it.</p><div><hr></div><h2>What an AI Engineer must know about GPUs</h2><p>On this topic, you should know and understand the basic hardware principles of what a GPU is, how it works, and all the key terms that describe its capabilities.</p><h4><strong>Learning the Hardware Components</strong></h4><ul><li><p><strong>Cores<br></strong>CUDA cores are good for general parallel computation, think of Shaders and Graphics rendering. Tensor cores are specialized for matrix multiplication, which is key in Transformer architectures.</p></li><li><p><strong>Memory Hierarchy </strong></p><ul><li><p><em><strong>VRAM</strong></em> - the global GPU memory. This memory is the place where your CPU will copy Tensors, Activations, and overall Data that will be used by your GPU.</p></li><li><p><em><strong>Shared Memory</strong></em> - This is smaller in size but much faster memory. This is the place where GPU kernel data resides. Your GPU will move data from VRAM to shared memory and then use it for computation, making it available across multiple threads.</p></li><li><p><strong>Registers </strong>- Smallest and fastest. GPU registers serve as the fastest, thread-private memory for temporary data storage, and they&#8217;re used by the SMs (Streaming Multiprocessors) to do computations.</p></li></ul></li><li><p><strong>Precision</strong></p><ul><li><p><strong>FP32 </strong>- This is the 32-bit Floating Point type, standard training format.</p></li><li><p><strong>FP16/BF16 </strong>-  Faster, less memory, commonly used for inference.</p></li><li><p><strong>FP8</strong> - New precision format, compatible with newer GPU architectures.</p></li></ul></li></ul><blockquote><p>To get practical, see my article on GPU Programming with code.</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;5ac06222-3f34-40f3-876e-d7faf2b072ee&quot;,&quot;caption&quot;:&quot;&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;The AI/ML Engineer's starter guide to GPU Programming&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:102147316,&quot;name&quot;:&quot;Alex Razvant&quot;,&quot;bio&quot;:&quot;Senior AI Engineer | I work on large-scale Vision AI &amp; MLOps | I share practical industry insights for AI/ML Engineers, on building production-ready AI Systems.&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0862f5c4-de09-482a-a322-7cf43751d511_1624x1624.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-01-30T08:00:51.206Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b90e43-1a47-4fd6-bcfb-8a4def1765cb_1539x1536.gif&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://multimodalai.substack.com/p/the-mlai-engineers-starter-guide&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:155911551,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:106,&quot;comment_count&quot;:4,&quot;publication_id&quot;:2799726,&quot;publication_name&quot;:&quot;Neural Bits&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!onU4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5740986b-9860-4ac5-b479-dd8853ab4f2e_1280x1280.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div></blockquote><div><hr></div><h4><strong>Learning to read a GPU Cheatsheet</strong></h4><p>The idea for sharing this came from Andrej Karpathy&#8217;s video on Large Language Models. He starts with a nice introduction on how LLMs work, and then, when going through model training, he shares the H100 GPU Cheatsheet to look into Precision formats. <a href="https://youtu.be/7xTGNNLPyMI?si=8pJS8ZNPfvTaps-R&amp;t=2441">(at 40:03 mark)</a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://www.youtube.com/watch?v=7xTGNNLPyMI&amp;t=2441s" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FYkp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe5e8b2-ef1f-4fbe-adbc-35c0e3d920d2_1746x998.png 424w, https://substackcdn.com/image/fetch/$s_!FYkp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe5e8b2-ef1f-4fbe-adbc-35c0e3d920d2_1746x998.png 848w, https://substackcdn.com/image/fetch/$s_!FYkp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe5e8b2-ef1f-4fbe-adbc-35c0e3d920d2_1746x998.png 1272w, https://substackcdn.com/image/fetch/$s_!FYkp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe5e8b2-ef1f-4fbe-adbc-35c0e3d920d2_1746x998.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FYkp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe5e8b2-ef1f-4fbe-adbc-35c0e3d920d2_1746x998.png" width="1456" height="832" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cbe5e8b2-ef1f-4fbe-adbc-35c0e3d920d2_1746x998.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:832,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1122773,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://www.youtube.com/watch?v=7xTGNNLPyMI&amp;t=2441s&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/174676720?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe5e8b2-ef1f-4fbe-adbc-35c0e3d920d2_1746x998.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!FYkp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe5e8b2-ef1f-4fbe-adbc-35c0e3d920d2_1746x998.png 424w, https://substackcdn.com/image/fetch/$s_!FYkp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe5e8b2-ef1f-4fbe-adbc-35c0e3d920d2_1746x998.png 848w, https://substackcdn.com/image/fetch/$s_!FYkp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe5e8b2-ef1f-4fbe-adbc-35c0e3d920d2_1746x998.png 1272w, https://substackcdn.com/image/fetch/$s_!FYkp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbe5e8b2-ef1f-4fbe-adbc-35c0e3d920d2_1746x998.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 3. Andrej Karpathy, going over the NVIDIA H100&#8217;s Cheatsheet (<a href="https://youtu.be/7xTGNNLPyMI?si=8pJS8ZNPfvTaps-R&amp;t=2441">source</a>)</figcaption></figure></div><p>A cheatsheet contains the GPU performance details, covering the Bandwidth, Precision Formats, Architecture variants, and more. This will help you understand why some GPUs are better at specific precisions, compute saturation, arithmetic intensity, and overall workload.</p><blockquote><p>As an AI Engineer, focus on learning at a high-level, how to extract key details about a GPU&#8217;s based on their cheatsheets. Find the A100 Cheatsheet below:</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2tpG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0494dd7a-7f4a-4c81-8dfb-51335fc382c0_768x1240.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2tpG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0494dd7a-7f4a-4c81-8dfb-51335fc382c0_768x1240.png 424w, https://substackcdn.com/image/fetch/$s_!2tpG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0494dd7a-7f4a-4c81-8dfb-51335fc382c0_768x1240.png 848w, https://substackcdn.com/image/fetch/$s_!2tpG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0494dd7a-7f4a-4c81-8dfb-51335fc382c0_768x1240.png 1272w, https://substackcdn.com/image/fetch/$s_!2tpG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0494dd7a-7f4a-4c81-8dfb-51335fc382c0_768x1240.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2tpG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0494dd7a-7f4a-4c81-8dfb-51335fc382c0_768x1240.png" width="450" height="726.5625" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0494dd7a-7f4a-4c81-8dfb-51335fc382c0_768x1240.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1240,&quot;width&quot;:768,&quot;resizeWidth&quot;:450,&quot;bytes&quot;:197112,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/174676720?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0494dd7a-7f4a-4c81-8dfb-51335fc382c0_768x1240.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2tpG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0494dd7a-7f4a-4c81-8dfb-51335fc382c0_768x1240.png 424w, https://substackcdn.com/image/fetch/$s_!2tpG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0494dd7a-7f4a-4c81-8dfb-51335fc382c0_768x1240.png 848w, https://substackcdn.com/image/fetch/$s_!2tpG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0494dd7a-7f4a-4c81-8dfb-51335fc382c0_768x1240.png 1272w, https://substackcdn.com/image/fetch/$s_!2tpG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0494dd7a-7f4a-4c81-8dfb-51335fc382c0_768x1240.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 4. NVIDIA A100 Cheatsheet (<a href="https://www.nvidia.com/content/dam/en-zz/Solutions/Data-Center/a100/pdf/nvidia-a100-datasheet-us-nvidia-1758950-r4-web.pdf">source</a>)</figcaption></figure></div><div><hr></div><h4><strong>Optional Study on other GPU Variants</strong></h4><p>These are called DSAs (Domain Specific Architectures) and not GPUs. </p><p>During the Deep Learning boom (2012-2013), a GPU was known as a Graphics Card, to render complex graphics and shaders for video games. </p><p>Around the same time, ASICs emerged as DSAs, built specifically for crypto mining (BTC, ETH).</p><p>One of the reasons manufacturers build DSAs today is due to this:</p><ul><li><p>A <strong>GPU</strong> has a memory hierarchy, which is general-purpose but not always optimal for AI workloads, especially large matrix multiplications in Transformers.</p></li><li><p>A <strong>GPU</strong> is a <em>programmable, flexible accelerator</em>, but not as powerful or power-efficient as a DSA.</p></li><li><p>A <strong>DSA</strong>, on the other hand, is <strong>highly specialized hardware</strong> designed for a narrow workload, in our case, AI Training and Inference.</p></li></ul><p>Popular examples of DSAs for AI are Google&#8217;s <strong>TPU</strong> (Tensor Processing Unit, 2016), Cerebras, SambaNova, and Tenstorrent. The <strong>Groq LPU</strong> (Language Processing Unit), also released in 2016, is another DSA for Inference, which is very efficient.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oOmt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9b9a37a-8ec8-4922-8f86-506d1643a625_1200x900.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oOmt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9b9a37a-8ec8-4922-8f86-506d1643a625_1200x900.jpeg 424w, https://substackcdn.com/image/fetch/$s_!oOmt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9b9a37a-8ec8-4922-8f86-506d1643a625_1200x900.jpeg 848w, https://substackcdn.com/image/fetch/$s_!oOmt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9b9a37a-8ec8-4922-8f86-506d1643a625_1200x900.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!oOmt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9b9a37a-8ec8-4922-8f86-506d1643a625_1200x900.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oOmt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9b9a37a-8ec8-4922-8f86-506d1643a625_1200x900.jpeg" width="562" height="421.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e9b9a37a-8ec8-4922-8f86-506d1643a625_1200x900.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:900,&quot;width&quot;:1200,&quot;resizeWidth&quot;:562,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Google's AI chips now can work together for faster learning - CNET&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Google's AI chips now can work together for faster learning - CNET" title="Google's AI chips now can work together for faster learning - CNET" srcset="https://substackcdn.com/image/fetch/$s_!oOmt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9b9a37a-8ec8-4922-8f86-506d1643a625_1200x900.jpeg 424w, https://substackcdn.com/image/fetch/$s_!oOmt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9b9a37a-8ec8-4922-8f86-506d1643a625_1200x900.jpeg 848w, https://substackcdn.com/image/fetch/$s_!oOmt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9b9a37a-8ec8-4922-8f86-506d1643a625_1200x900.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!oOmt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9b9a37a-8ec8-4922-8f86-506d1643a625_1200x900.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 5. Google TPU (May 2016)</figcaption></figure></div><blockquote><p>Takeaway from here is to know that even if NVIDIA powers the largest chunk of AI Infrastructure, DSAs also emerge <a href="https://en.wikipedia.org/wiki/Domain-specific_architecture#:~:text=A%20domain%2Dspecific%20architecture%20(DSA,operate%20on%20any%20computer%20program.">targeting narrow niches within AI Compute.</a></p></blockquote><div><hr></div><h2>Must-knows about NVIDIA&#8217;s AI Stack</h2><p>When it comes to deep learning and AI, NVIDIA is a big player. Besides the hardware, every AI Engineer would directly or indirectly have to use a software component from NVIDIA&#8217;s library.</p><p>That&#8217;s mainly because NVIDIA has built an ecosystem that supports every stage of AI development, across many industries and applications.</p><p>From core utilities to train AI models, to RL simulators, robotics, to enterprise-scale AI deployments. In this section, we&#8217;ll go over three components: Model Training, Optimization, and Deployment.</p><div><hr></div><h4><strong>Learning about Model Training Utilities</strong></h4><ul><li><p><strong><a href="https://www.digitalocean.com/community/tutorials/install-cuda-cudnn-for-gpu">CUDA &amp; cuDNN</a></strong></p><p>CUDA is a parallel computing platform<strong> </strong>and API that powers the execution of all GPU kernels on the GPU. The cuDNN library contains a large set of primitives prebuilt for every compute operator or set of operators within your Neural Network layers. These two go hand-in-hand and are at the foundation of each AI model training/inferencing workflow.</p></li><li><p><strong><a href="https://developer.nvidia.com/nsight-systems">NSight</a></strong></p><p>A system-wide performance analysis tool to visualize an application&#8217;s algorithm execution flow. This will help identify the largest opportunities to optimize.</p></li><li><p><strong><a href="https://docs.nvidia.com/nemo/rl/0.2.1/index.html">NeMo-RL</a></strong><br>The NeMo library is a scalable and efficient post-training library designed for models ranging from 1 GPU to thousands, and from tiny to over 100 billion parameters. It seamlessly integrates with HuggingFace, so no overhead on that front.</p></li></ul><div><hr></div><h4><strong>Learning about Model Inference Utilities</strong></h4><ul><li><p><strong>TensorRT &amp; TensorRT-LLM<br></strong>This is a powerful compiler for AI models that will take the model graph, scan it, and optimize it for optimal settings on specific NVIDIA GPU hardware. TensorRT-LLM is a specific adaptation of the compiler for Transformer-based models.<br></p><p><em>&#8505;&#65039; I&#8217;ve covered TensorRT in depth in the second section of this article.</em></p><p></p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;6ccfc5b0-9746-4c31-affe-546b49bd2dec&quot;,&quot;caption&quot;:&quot;&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;3 Inference Engines for optimal throughput&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:102147316,&quot;name&quot;:&quot;Alex Razvant&quot;,&quot;bio&quot;:&quot;Senior AI Engineer | I work on large-scale Vision AI &amp; MLOps | I share practical industry insights for AI/ML Engineers, on building production-ready AI Systems.&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0862f5c4-de09-482a-a322-7cf43751d511_1624x1624.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2024-08-06T13:02:50.823Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81ab0846-9a02-433f-9c7d-1bc23dbcd904_1940x1946.gif&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://multimodalai.substack.com/p/3-inference-engines-for-optimal-throughput&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:146886554,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:10,&quot;comment_count&quot;:0,&quot;publication_id&quot;:2799726,&quot;publication_name&quot;:&quot;Neural Bits&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!onU4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5740986b-9860-4ac5-b479-dd8853ab4f2e_1280x1280.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div></li><li><p><strong>Triton Inference Server<br></strong>One of the most mature solutions for deploying general-purpose AI models in production.<br><em><br>&#8505;&#65039; I&#8217;ve covered Triton Server in depth in this article.</em><br></p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;6d1aed2b-1fb2-497c-b1b6-acbc044e8c82&quot;,&quot;caption&quot;:&quot;&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;NVIDIA Triton Inference Server made simple.&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:102147316,&quot;name&quot;:&quot;Alex Razvant&quot;,&quot;bio&quot;:&quot;Senior AI Engineer | I work on large-scale Vision AI &amp; MLOps | I share practical industry insights for AI/ML Engineers, on building production-ready AI Systems.&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0862f5c4-de09-482a-a322-7cf43751d511_1624x1624.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2024-08-20T13:01:16.885Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d4460ad-0e7e-4545-aee6-274b93dd5959_2300x2304.gif&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://multimodalai.substack.com/p/how-to-use-nvidia-triton-server-the&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:147783782,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:12,&quot;comment_count&quot;:0,&quot;publication_id&quot;:2799726,&quot;publication_name&quot;:&quot;Neural Bits&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!onU4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5740986b-9860-4ac5-b479-dd8853ab4f2e_1280x1280.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div></li><li><p><strong>Dynamo Inference<br></strong>Dynamo is the newest framework in NVIDIA&#8217;s Stack, specifically designed for large-scale Generative AI workloads.<br><br><em>&#8505;&#65039; I&#8217;ve unpacked the Dynamo architecture in this article.<br></em></p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;a94f75f8-a9e8-48e9-8860-53b6e4d0ab33&quot;,&quot;caption&quot;:&quot;&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Unpacking NVIDIA Dynamo LLM Inference Framework&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:102147316,&quot;name&quot;:&quot;Alex Razvant&quot;,&quot;bio&quot;:&quot;Senior AI Engineer | I work on large-scale Vision AI &amp; MLOps | I share practical industry insights for AI/ML Engineers, on building production-ready AI Systems.&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0862f5c4-de09-482a-a322-7cf43751d511_1624x1624.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-03-20T08:02:26.677Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!r0gr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17e9eeaa-9673-48c6-bb02-b68a94b1ba56_5843x3130.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://multimodalai.substack.com/p/the-one-stop-to-understand-the-new&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:159462671,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:30,&quot;comment_count&quot;:5,&quot;publication_id&quot;:2799726,&quot;publication_name&quot;:&quot;Neural Bits&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!onU4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5740986b-9860-4ac5-b479-dd8853ab4f2e_1280x1280.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div></li></ul><div><hr></div><h4><strong>Learning about Model Deployment Utilities</strong></h4><ul><li><p><strong><a href="https://github.com/NVIDIA/gpu-operator">NVIDIA GPU Operator</a></strong><br>By adding this operator on top of your K8S cluster, you&#8217;ll enable lifecycle management of GPU resources, handling driver installation, runtime libraries, and configuration for GPU-accelerated workloads.</p></li><li><p><strong><a href="https://developer.nvidia.com/nim">NVIDIA NIM</a><br></strong>A NIM comes from NVIDIA Inference Microservice. It is a component that prepackages the optimal setup for a GenAI model, making it deployable at scale in a robust manner. Although customizable, NIMs are enterprise-first.<br><br><em>&#8505;&#65039;  I&#8217;ve covered NIM in this article.<br></em></p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;420c5b5e-9b32-4dc9-819d-d2a5a8d94705&quot;,&quot;caption&quot;:&quot;&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Deep Dive into NVIDIA NIMs for Generative AI&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:102147316,&quot;name&quot;:&quot;Alex Razvant&quot;,&quot;bio&quot;:&quot;Senior AI Engineer | I work on large-scale Vision AI &amp; MLOps | I share practical industry insights for AI/ML Engineers, on building production-ready AI Systems.&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0862f5c4-de09-482a-a322-7cf43751d511_1624x1624.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2024-07-30T14:31:09.553Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F612f9853-6f19-4d09-875e-726381ad3fcf_1818x1822.gif&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://multimodalai.substack.com/p/deep-dive-into-nvidia-nims-for-generative&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:147092859,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:11,&quot;comment_count&quot;:0,&quot;publication_id&quot;:2799726,&quot;publication_name&quot;:&quot;Neural Bits&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!onU4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5740986b-9860-4ac5-b479-dd8853ab4f2e_1280x1280.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div></li><li><p><strong><a href="https://github.com/NVIDIA/KAI-Scheduler">KAI Scheduler</a></strong><br>The KAI Scheduler was initially developed by Run:ai and is a Kubernetes-native GPU scheduling solution designed to optimize resource allocation for AI workloads. NVIDIA acquired Run:ai for $700 million, integrated it, and then open-sourced KAI Scheduler.</p></li></ul><div><hr></div><h2>Conclusion</h2><p>In this article, we started by comparing an <strong>AI Engineer</strong> to an <strong>AI User</strong>, outlining that an AI Engineer does more than just build applications.</p><p>They need to understand every component of an AI system.</p><p>From there, we gave examples showing why it&#8217;s important to grasp end-to-end systems thinking, past the POCs, and not focus on hype and trends. Understanding these areas helps engineers design systems that scale efficiently and perform reliably.</p><p>One important topic was why AI Engineer often works directly or indirectly with <strong>NVIDIA&#8217;s tools</strong>, since NVIDIA powers a huge portion of AI compute.</p><p>The article covered GPUs, the difference between GPUs and Domain-Specific Architectures (DSAs) as a starter, and then explored libraries and tools for <strong>training, inference, and deployment</strong>, part of NVIDIA&#8217;s AI stack.</p><p>This guide is a starting point for any AI Engineer who wants to understand the ecosystem of NVIDIA hardware and software, which is something one most certainly will encounter in their work. </p><p>Even though most AI Engineers focus on building data pipelines, training models, and creating applications on top of foundational models, the concepts discussed here are essential for understanding the engineering behind the systems, including infrastructure, optimization, and efficient deployment.</p><blockquote><p>Thank you for reading, see you next week! &#128075;</p></blockquote><div><hr></div><h3>References</h3><ul><li><p><em>NVIDIA-NeMo/RL: Scalable toolkit for efficient model reinforcement</em>. (2025, August). GitHub. <a href="https://github.com/NVIDIA-NeMo/RL">https://github.com/NVIDIA-NeMo/RL</a></p></li><li><p><em>NVIDIA/KAI-Scheduler: KAI Scheduler is an open source Kubernetes Native scheduler for AI workloads at large scale</em>. (2025, September 17). GitHub. <a href="https://github.com/NVIDIA/KAI-Scheduler">https://github.com/NVIDIA/KAI-Scheduler</a></p></li><li><p><em>NVIDIA Dynamo</em>. (2025). NVIDIA Developer. <a href="https://developer.nvidia.com/dynamo%E2%80%8C">https://developer.nvidia.com/dynamo&#8204;</a></p></li><li><p>Orosz, G., &amp; Huyen, C. (2025, May 20). <em>The AI Engineering Stack</em>. Pragmaticengineer.com; The Pragmatic Engineer. <a href="https://newsletter.pragmaticengineer.com/p/the-ai-engineering-stack">https://newsletter.pragmaticengineer.com/p/the-ai-engineering-stack</a></p></li><li><p>Browne, R. (2025, September 25). <em>British AI firm Nscale raises $1.1 billion in Nvidia-backed funding round</em>. CNBC. <a href="https://www.cnbc.com/2025/09/25/nvidia-backed-uk-ai-firm-nscale-raises-1point1-billion-funding-round.html">https://www.cnbc.com/2025/09/25/nvidia-backed-uk-ai-firm-nscale-raises-1point1-billion-funding-round.html</a></p></li><li><p>Lee, K. (2024, March 12). <em>Building Meta&#8217;s GenAI Infrastructure</em>. Engineering at Meta. <a href="https://engineering.fb.com/2024/03/12/data-center-engineering/building-metas-genai-infrastructure/">https://engineering.fb.com/2024/03/12/data-center-engineering/building-metas-genai-infrastructure/</a></p></li><li><p>Kerstin. (2023, September 21). <em>FPGAs vs. GPGPUs</em>. IBE Electronics. <a href="https://www.pcbaaa.com/gpu-vs-gpgpu-vs-dsa-vs-fpga-vs-asic/">https://www.pcbaaa.com/gpu-vs-gpgpu-vs-dsa-vs-fpga-vs-asic/</a></p></li><li><p><em>Invited: The Magnificent Seven Challenges and Opportunities in Domain-Specific Accelerator Design for Autonomous Systems</em>. (2024). Arxiv.org. <a href="https://arxiv.org/html/2407.17311v1">https://arxiv.org/html/2407.17311v1</a></p></li></ul><div><hr></div><h4>&#8204;Images and Media</h4><p>If not stated otherwise, all images were created by the author.</p>]]></content:encoded></item><item><title><![CDATA[A New Chapter in My AI Journey]]></title><description><![CDATA[Career transition, first impressions of video content, and a sneak peek at my new course.]]></description><link>https://read.theaimerge.com/p/a-new-chapter-in-my-ai-journey</link><guid isPermaLink="false">https://read.theaimerge.com/p/a-new-chapter-in-my-ai-journey</guid><dc:creator><![CDATA[Alex Razvant]]></dc:creator><pubDate>Sat, 20 Sep 2025 07:02:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!u_9N!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c32e0ae-464d-417a-99a8-0f484c2b06dc_3750x2947.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Welcome to Neural Bits. Each week, I send one article on practical, production-ready AI/ML Engineering to help you learn and upskill in your AI/ML Journey. Subscribe and join over <strong><a href="https://multimodalai.substack.com/subscribe">6000 engineers</a></strong> who learn how to build real-world AI Systems. </em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p>During the past two weeks, a lot has happened. </p><p>I&#8217;ve completed the code development and video recordings for the <strong><a href="https://www.youtube.com/watch?v=_iYB1z1_Xgs&amp;t=24s">Kubrick Open Source Course</a></strong> (YouTube), which I developed alongside <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Miguel Otero Pedrido&quot;,&quot;id&quot;:89972117,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!LZBx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b58b1f5-4d25-4dcf-9f48-b67a6e6e1316_1200x1200.jpeg&quot;,&quot;uuid&quot;:&quot;9a06df2e-a8e0-4fd9-a3a8-8c039dd0ce93&quot;}" data-component-name="MentionToDOM"></span> (from The Neural Maze). </p><p>This Monday marked my last day at <strong><a href="https://everseen.com/">Everseen</a></strong>, where I spent the past four years training models, building Vision AI systems, and running MLOps workflows.</p><p>I&#8217;ve stepped into a new role as a Senior AI/ML Engineer, where I&#8217;ll be working on large-scale AI (GenAI) systems, something I&#8217;m genuinely excited about. I&#8217;m already diving into the codebase, workflows, and getting up to speed with projects and documentation. </p><p><em>That means, even more production-ready AI Systems insights to share with you here.</em></p><p>My schedule has taken a hit with the transition, but this post isn&#8217;t about taking a break; it&#8217;s about the next steps I&#8217;ve been planning for a while.</p><p>If you&#8217;ve been following my newsletter, you know I&#8217;m focused on <strong>production-ready AI</strong> and the components of real AI systems. These are the areas I think not too many talk about, and I want to continue filling that gap.</p><p>So in this article, I want to touch on 3 things:</p><ol><li><p>What I&#8217;ve learned, transitioning between AI roles</p></li><li><p>My Video Content First Impressions</p></li><li><p>[NEW] Course on Production-Ready AI Systems</p></li></ol><p>Let&#8217;s get started!</p><div><hr></div><h2>Two thoughts when transitioning between roles</h2><p>Leaving a role after years in it is never easy. It&#8217;s not just the projects or features you&#8217;ve worked on and shipped, but more about the failed demos, inside jokes on calls, `git blame` pranks on your teammate&#8217;s PR, and real friendships you&#8217;ve built along the way.</p><p>Moving forward, I wanted to outline three things that I think are key for everyone:</p><ol><li><p><strong>Keep your inbox open</strong><br>Even if you leave, make it easy for colleagues to reach you, and offer yourself to help when your help is needed, <em><strong>considering your time</strong></em>. Be open to short chats or advice on things you&#8217;ve worked on. </p></li><li><p><strong>Leave it better than you&#8217;ve found it</strong><br>And by this I mean, clearing up the backlog, documenting everything, and doing your best to ensure that whoever takes on from where you&#8217;ve left, will ramp up quickly and thank you for that. This is a treat that every Engineer should aim for.</p><p>Don&#8217;t be like Joe  </p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_uCP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd3aece-52a2-461f-90ef-887f4f232eda_576x576.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_uCP!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd3aece-52a2-461f-90ef-887f4f232eda_576x576.gif 424w, https://substackcdn.com/image/fetch/$s_!_uCP!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd3aece-52a2-461f-90ef-887f4f232eda_576x576.gif 848w, https://substackcdn.com/image/fetch/$s_!_uCP!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd3aece-52a2-461f-90ef-887f4f232eda_576x576.gif 1272w, https://substackcdn.com/image/fetch/$s_!_uCP!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd3aece-52a2-461f-90ef-887f4f232eda_576x576.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_uCP!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd3aece-52a2-461f-90ef-887f4f232eda_576x576.gif" width="360" height="360" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2fd3aece-52a2-461f-90ef-887f4f232eda_576x576.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:576,&quot;width&quot;:576,&quot;resizeWidth&quot;:360,&quot;bytes&quot;:8436138,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/174034554?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd3aece-52a2-461f-90ef-887f4f232eda_576x576.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_uCP!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd3aece-52a2-461f-90ef-887f4f232eda_576x576.gif 424w, https://substackcdn.com/image/fetch/$s_!_uCP!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd3aece-52a2-461f-90ef-887f4f232eda_576x576.gif 848w, https://substackcdn.com/image/fetch/$s_!_uCP!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd3aece-52a2-461f-90ef-887f4f232eda_576x576.gif 1272w, https://substackcdn.com/image/fetch/$s_!_uCP!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2fd3aece-52a2-461f-90ef-887f4f232eda_576x576.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ol start="3"><li><p><strong>Comfort Zone<br></strong>After years in a role, it&#8217;s easy to fall into comfort zones: how you organize your work, how you communicate with teammates, or how you approach problem-solving can all become routines. A new environment shakes that up. I think this is beneficial.</p></li></ol><div><hr></div><h2>Video Content - First Impressions</h2><p>You might&#8217;ve seen that I&#8217;ve uploaded a few videos in my previous posts. </p><p>That&#8217;s something I was planning to do for a while, but didn&#8217;t quite manage to get the time for. The course I built with Miguel was the kickstart for that, as I recorded over <strong>1.5 hours of video code walkthrough</strong>, going over key technical components. </p><p><a href="https://youtu.be/_iYB1z1_Xgs?si=-NgCI37MAQbdHNTN&amp;t=7878">Here is me</a> explaining how React works, for Data Scientists and AI folks.</p><blockquote><p><strong>Why React?</strong><br>Some AI tooling is increasingly moving to JavaScript, with tools like Transformers JS, n8n, MCP, and Mastra. Learning a frontend framework is becoming a valuable skill for AI engineers.</p></blockquote><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-eG4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7253aaad-8517-423e-9ebe-32d5f14c7ba3_2948x1898.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-eG4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7253aaad-8517-423e-9ebe-32d5f14c7ba3_2948x1898.png 424w, https://substackcdn.com/image/fetch/$s_!-eG4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7253aaad-8517-423e-9ebe-32d5f14c7ba3_2948x1898.png 848w, https://substackcdn.com/image/fetch/$s_!-eG4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7253aaad-8517-423e-9ebe-32d5f14c7ba3_2948x1898.png 1272w, https://substackcdn.com/image/fetch/$s_!-eG4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7253aaad-8517-423e-9ebe-32d5f14c7ba3_2948x1898.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-eG4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7253aaad-8517-423e-9ebe-32d5f14c7ba3_2948x1898.png" width="1456" height="937" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7253aaad-8517-423e-9ebe-32d5f14c7ba3_2948x1898.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:937,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:675260,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/174034554?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7253aaad-8517-423e-9ebe-32d5f14c7ba3_2948x1898.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-eG4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7253aaad-8517-423e-9ebe-32d5f14c7ba3_2948x1898.png 424w, https://substackcdn.com/image/fetch/$s_!-eG4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7253aaad-8517-423e-9ebe-32d5f14c7ba3_2948x1898.png 848w, https://substackcdn.com/image/fetch/$s_!-eG4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7253aaad-8517-423e-9ebe-32d5f14c7ba3_2948x1898.png 1272w, https://substackcdn.com/image/fetch/$s_!-eG4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7253aaad-8517-423e-9ebe-32d5f14c7ba3_2948x1898.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I like the video format, as it allows me to show and explain, in real-time, what I&#8217;m talking about. You could expect to see me more often, posting Videos, going through complex AI concepts, and live-coding from now on.</p><p>Help me shape and structure video topics better:</p><div class="poll-embed" data-attrs="{&quot;id&quot;:378332}" data-component-name="PollToDOM"></div><div class="poll-embed" data-attrs="{&quot;id&quot;:378328}" data-component-name="PollToDOM"></div><div class="poll-embed" data-attrs="{&quot;id&quot;:378330}" data-component-name="PollToDOM"></div><blockquote><p>Also, please leave your thoughts in the comments on what else I could do to make these videos better &#128071; Thank you!</p></blockquote><div><hr></div><h2>A New Course: Production-Ready AI Systems</h2><p>I&#8217;ll keep this short, as I&#8217;ll be rolling out <em><strong>big updates in the upcoming weeks</strong></em>.</p><p>I&#8217;ve been working on a new project that combines <strong>Vision AI, Generative AI, and Agents</strong> to build a fully-fledged AI system from the ground up. This will be my most advanced project yet, and I believe the only one that covers advanced AI concepts and key AI libraries and frameworks at a low level.</p><p>&#129345;&#129345; Here&#8217;s a sneak peek!</p><blockquote><p>We&#8217;ll build an <strong>Edge Multi-Agent Vision System for Wildlife Conservation</strong></p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!u_9N!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c32e0ae-464d-417a-99a8-0f484c2b06dc_3750x2947.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!u_9N!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c32e0ae-464d-417a-99a8-0f484c2b06dc_3750x2947.png 424w, https://substackcdn.com/image/fetch/$s_!u_9N!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c32e0ae-464d-417a-99a8-0f484c2b06dc_3750x2947.png 848w, https://substackcdn.com/image/fetch/$s_!u_9N!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c32e0ae-464d-417a-99a8-0f484c2b06dc_3750x2947.png 1272w, https://substackcdn.com/image/fetch/$s_!u_9N!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c32e0ae-464d-417a-99a8-0f484c2b06dc_3750x2947.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!u_9N!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c32e0ae-464d-417a-99a8-0f484c2b06dc_3750x2947.png" width="1456" height="1144" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0c32e0ae-464d-417a-99a8-0f484c2b06dc_3750x2947.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1144,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1829932,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/174034554?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c32e0ae-464d-417a-99a8-0f484c2b06dc_3750x2947.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!u_9N!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c32e0ae-464d-417a-99a8-0f484c2b06dc_3750x2947.png 424w, https://substackcdn.com/image/fetch/$s_!u_9N!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c32e0ae-464d-417a-99a8-0f484c2b06dc_3750x2947.png 848w, https://substackcdn.com/image/fetch/$s_!u_9N!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c32e0ae-464d-417a-99a8-0f484c2b06dc_3750x2947.png 1272w, https://substackcdn.com/image/fetch/$s_!u_9N!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c32e0ae-464d-417a-99a8-0f484c2b06dc_3750x2947.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>What&#8217;s inside?</p><ol><li><p><strong>Building End-to-End MLOps Pipelines</strong></p></li><li><p><strong>Finetuning &amp; Evaluation</strong></p></li><li><p><strong>Model Optimization</strong> - advanced model optimization techniques.</p></li><li><p><strong>Perception &amp; Multimodal AI</strong> - we&#8217;ll classify actions from videos</p></li><li><p><strong>MCP Servers &amp; Agent-to-Agent</strong> - we&#8217;ll build a network of AI Agents</p></li><li><p><strong>AI System Design </strong>and <strong>a lot more</strong></p></li></ol><p>To properly organize this, I&#8217;d love your input! Please take 1 minute to answer these 3 polls. Your feedback will help me structure the course modules in the best way possible.</p><blockquote><p>Have extra details to add? Please leave them in the comments.</p></blockquote><div class="poll-embed" data-attrs="{&quot;id&quot;:378356}" data-component-name="PollToDOM"></div><div class="poll-embed" data-attrs="{&quot;id&quot;:378358}" data-component-name="PollToDOM"></div><div class="poll-embed" data-attrs="{&quot;id&quot;:378355}" data-component-name="PollToDOM"></div><div><hr></div><h2>What to do Next</h2><p>I&#8217;ll keep you updated with everything you need to know, but for now, stay tuned for the next articles and videos I&#8217;m working on.</p><p>This next project is quite complex; I&#8217;m not sugarcoating it, but I want to make sure I ease the way towards understanding every piece of the puzzle. </p><p>My goal is to make sure you understand how everything fits together.<br><br>Thanks for reading! Follow this newsletter on <strong><a href="https://www.youtube.com/@multimodalityai">YouTube</a></strong> as well, as I&#8217;ll be posting longer videos to prepare you for some of the hands-on concepts we&#8217;ll be covering in this new project.</p><p>&#128075; Cheers</p>]]></content:encoded></item><item><title><![CDATA[Video Lesson on Advanced Multimodal AI Concepts]]></title><description><![CDATA[Low-level details about the Video Format. Contrastive Learning, CLIP Model, How VLMs work, Transformers vs CNNs and Context Learning]]></description><link>https://read.theaimerge.com/p/learn-two-advanced-multimodal-ai</link><guid isPermaLink="false">https://read.theaimerge.com/p/learn-two-advanced-multimodal-ai</guid><dc:creator><![CDATA[Alex Razvant]]></dc:creator><pubDate>Sat, 13 Sep 2025 08:13:16 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/05b2980b-3aa2-4879-837f-44409337bbb6_4112x2314.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em><strong>Welcome to Neural Bits.</strong> Each week, get one deep-dive article covering advanced, production-ready AI/ML development.</em></p><p><em>Subscribe <a href="https://multimodalai.substack.com/subscribe">to join </a><strong><a href="https://multimodalai.substack.com/subscribe">5900+</a></strong><a href="https://multimodalai.substack.com/subscribe"> AI/ML Engineers</a> learning how to build production-ready AI Systems.</em></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Neural Bits is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><p>This article is an extra module to the <a href="https://github.com/multi-modal-ai/multimodal-agents-course">Open Source Kubrick course</a>, which I&#8217;ve built in collaboration with <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Miguel Otero Pedrido&quot;,&quot;id&quot;:89972117,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2b58b1f5-4d25-4dcf-9f48-b67a6e6e1316_1200x1200.jpeg&quot;,&quot;uuid&quot;:&quot;6f547551-9e78-486d-b3cd-bab372a60459&quot;}" data-component-name="MentionToDOM"></span> (from The Neural Maze).</p><p>In this article, I&#8217;ve recorded two videos on advanced topics in Multimodal AI, which will help you understand video formats as well as Multimodal Models, such as CLIP and Vision Language Models (VLMs), alongside other insights.</p><p>Find the full Video Course on Kubrick, below:</p><div id="youtube2-_iYB1z1_Xgs" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;_iYB1z1_Xgs&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/_iYB1z1_Xgs?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>My recommendation, if you&#8217;re not familiar with the course, is to watch the full video walkthrough, and then learn from these two extra deep dives, which focus on more advanced Deep Learning and Multimodal Data concepts.</p><p>Happy learning!</p><div><hr></div><h2>Introduction</h2><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;98714c3c-f904-4b00-a7f5-1398e59babe2&quot;,&quot;duration&quot;:null}"></div><div><hr></div><h3>How Video Format Works (7m)</h3><p>Here you&#8217;ll learn low-level details about the Video Format, and how any video player (QuickTime Player, VLC, OpenCV, etc) is reading a video file, decodes it, and displays images, plays audio at the right time.</p><p><strong>Summary of the topics:</strong></p><ul><li><p>Opening an MP4 video in Hex Format</p></li><li><p>Reading and explaining the Video Header and Encoded Packets</p></li><li><p>Learning how Video Re-Encoding works</p></li><li><p>Learning about different codecs H264 (AVC) vs H265 (HEVC)</p></li><li><p>Learning about ISO Multimedia Standards</p></li></ul><p>Redactions:</p><p><em><strong>1/ In the video, I said H. 265 keeps better Lightning and Softer Shadows.<br></strong></em>- That&#8217;s true in the context of H.265 codec being compatible with HDR (High Dynamic Range, e.g, DolbyVision). The codec itself is only a better compression method than H264.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;960b7321-8a22-4e7f-b9ec-c19888c5223f&quot;,&quot;duration&quot;:null}"></div><div><hr></div><h3>How the CLIP Model and VLM Work in General</h3><p>Here you&#8217;ll learn about Contrastive Learning, the Loss Objective CLIP is trying to optimize for, how it was trained, and other low-level architecture and workflow details. You&#8217;ll also learn about Image Encoders, Patching, CNN Receptive Fields, Vision Transformer, and how CLIP can be used as part of VLMs for the VQA (Visual Question Answering) task, going through a VLM architecture, step-by-step.</p><p><strong>Summary of the topics:</strong></p><ul><li><p>CLIP Model Card and the Model Scope</p></li><li><p>How was it trained, Contrastive Learning, Loss Function</p></li><li><p>Vision Transformer, Image Patching, Positional Embeddings</p></li><li><p>How is ViT compared to CNNs&#8217; Receptive Fields when learning Image Features</p></li><li><p>Using interactive 3D Vectors in Desmos UI to showcase Contrastive Loss</p></li><li><p>Explaining CLIP as part of the Image Encoder in a VLM Architecture</p></li></ul><p>Redactions:</p><p><em><strong>1/ In the video, I mention that ViT is better at learning Global Image Context compared to CNNs</strong></em><br>- That&#8217;s true, if we compare network sizes. Vision Transformers are capable of learning global features, due to how Attention Works. CNNs, on the other hand, are still capable of that, but we need to increase the Network depth, such that Receptive Fields capture more context throughout the stacked layers chain.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;de763cdc-6e5d-4631-b5a4-679b655e77d0&quot;,&quot;duration&quot;:null}"></div><h3>Ending Notes</h3><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/subscribe?"><span>Subscribe now</span></a></p><p>If you&#8217;ve enjoyed these and want to stay updated when I post more similar content, but focused on End-to-End projects, make sure to also follow me on:</p><p>1/ Daily Content on AI Engineering</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://www.linkedin.com/in/arazvant/" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Y_kD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac6d2d5-2fc4-4b10-b059-c612a8826d8c_524x158.png 424w, https://substackcdn.com/image/fetch/$s_!Y_kD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac6d2d5-2fc4-4b10-b059-c612a8826d8c_524x158.png 848w, https://substackcdn.com/image/fetch/$s_!Y_kD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac6d2d5-2fc4-4b10-b059-c612a8826d8c_524x158.png 1272w, https://substackcdn.com/image/fetch/$s_!Y_kD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac6d2d5-2fc4-4b10-b059-c612a8826d8c_524x158.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Y_kD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac6d2d5-2fc4-4b10-b059-c612a8826d8c_524x158.png" width="132" height="39.80152671755725" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7ac6d2d5-2fc4-4b10-b059-c612a8826d8c_524x158.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:158,&quot;width&quot;:524,&quot;resizeWidth&quot;:132,&quot;bytes&quot;:6831,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://www.linkedin.com/in/arazvant/&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/173074450?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac6d2d5-2fc4-4b10-b059-c612a8826d8c_524x158.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Y_kD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac6d2d5-2fc4-4b10-b059-c612a8826d8c_524x158.png 424w, https://substackcdn.com/image/fetch/$s_!Y_kD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac6d2d5-2fc4-4b10-b059-c612a8826d8c_524x158.png 848w, https://substackcdn.com/image/fetch/$s_!Y_kD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac6d2d5-2fc4-4b10-b059-c612a8826d8c_524x158.png 1272w, https://substackcdn.com/image/fetch/$s_!Y_kD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac6d2d5-2fc4-4b10-b059-c612a8826d8c_524x158.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>2/ Code Resources &amp; OSS Courses</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://github.com/multi-modal-ai/multimodal-agents-course" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jzqv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf3243b-f45a-4957-b6d9-d46139377db8_524x158.png 424w, https://substackcdn.com/image/fetch/$s_!jzqv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf3243b-f45a-4957-b6d9-d46139377db8_524x158.png 848w, https://substackcdn.com/image/fetch/$s_!jzqv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf3243b-f45a-4957-b6d9-d46139377db8_524x158.png 1272w, https://substackcdn.com/image/fetch/$s_!jzqv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf3243b-f45a-4957-b6d9-d46139377db8_524x158.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jzqv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf3243b-f45a-4957-b6d9-d46139377db8_524x158.png" width="140" height="42.213740458015266" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3cf3243b-f45a-4957-b6d9-d46139377db8_524x158.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:158,&quot;width&quot;:524,&quot;resizeWidth&quot;:140,&quot;bytes&quot;:8798,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://github.com/multi-modal-ai/multimodal-agents-course&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/173074450?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf3243b-f45a-4957-b6d9-d46139377db8_524x158.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jzqv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf3243b-f45a-4957-b6d9-d46139377db8_524x158.png 424w, https://substackcdn.com/image/fetch/$s_!jzqv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf3243b-f45a-4957-b6d9-d46139377db8_524x158.png 848w, https://substackcdn.com/image/fetch/$s_!jzqv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf3243b-f45a-4957-b6d9-d46139377db8_524x158.png 1272w, https://substackcdn.com/image/fetch/$s_!jzqv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf3243b-f45a-4957-b6d9-d46139377db8_524x158.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>3/ Advanced AI Deep Dives (&gt;1h, coming soon)</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://www.youtube.com/@multimodalityai" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Gu-H!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff398d0cc-16ff-4d1a-94a7-32eab838223c_524x159.png 424w, https://substackcdn.com/image/fetch/$s_!Gu-H!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff398d0cc-16ff-4d1a-94a7-32eab838223c_524x159.png 848w, https://substackcdn.com/image/fetch/$s_!Gu-H!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff398d0cc-16ff-4d1a-94a7-32eab838223c_524x159.png 1272w, https://substackcdn.com/image/fetch/$s_!Gu-H!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff398d0cc-16ff-4d1a-94a7-32eab838223c_524x159.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Gu-H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff398d0cc-16ff-4d1a-94a7-32eab838223c_524x159.png" width="156" height="47.33587786259542" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f398d0cc-16ff-4d1a-94a7-32eab838223c_524x159.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:159,&quot;width&quot;:524,&quot;resizeWidth&quot;:156,&quot;bytes&quot;:7393,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://www.youtube.com/@multimodalityai&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/173074450?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff398d0cc-16ff-4d1a-94a7-32eab838223c_524x159.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Gu-H!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff398d0cc-16ff-4d1a-94a7-32eab838223c_524x159.png 424w, https://substackcdn.com/image/fetch/$s_!Gu-H!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff398d0cc-16ff-4d1a-94a7-32eab838223c_524x159.png 848w, https://substackcdn.com/image/fetch/$s_!Gu-H!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff398d0cc-16ff-4d1a-94a7-32eab838223c_524x159.png 1272w, https://substackcdn.com/image/fetch/$s_!Gu-H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff398d0cc-16ff-4d1a-94a7-32eab838223c_524x159.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div>]]></content:encoded></item><item><title><![CDATA[The face behind this Newsletter (First Video)]]></title><description><![CDATA[Introducing myself, who Am I, what's my AI/ML Expertise and future plans on content creation.]]></description><link>https://read.theaimerge.com/p/introducing-myself-my-first-video</link><guid isPermaLink="false">https://read.theaimerge.com/p/introducing-myself-my-first-video</guid><dc:creator><![CDATA[Alex Razvant]]></dc:creator><pubDate>Sun, 07 Sep 2025 07:02:30 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/81365cc7-9279-4833-9e0e-2be046a6ae35_3174x1784.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hey all,</p><p>I know this is an unusual hour to send an article, but I thought it was worth taking this chance to let you all know <strong>who is behind</strong> the Neural Bits Newsletter, a bit about me, and what <strong>you can expect to find next.</strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/subscribe?"><span>Subscribe now</span></a></p><p>For the past few weeks, I&#8217;ve been considering raising the bar on the content I create, and many of you have been messaging me on LinkedIn regarding live walkthroughs and workshop-like video content.</p><p>I&#8217;ve been planning this for a while now, and this article is the first in that series.</p><h2>Who Am I</h2><div><hr></div><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;39e2b36a-e411-426a-aa84-ae2abbe35e81&quot;,&quot;duration&quot;:null}"></div><p>Key points, for those who don&#8217;t want to <strong>hear me rumble for 10 minutes</strong>:</p><ul><li><p>I&#8217;ve worked for ~1.5 years as a Software Engineer and 8 years as an AI/ML/MLOps Engineer.</p></li><li><p>Worked in AI Research and published a<a href="https://arxiv.org/abs/2006.02098"> Research Paper in 2020</a></p></li><li><p>Worked across the full AI landscape, MLOps, Deep Learning, CNNs, LLMs, VLMs, Diffusion Models, and have built real AI Systems.</p></li><li><p><strong>I&#8217;m not an AI Influencer,  I actually work full-time as an AI Engineer.</strong></p></li><li><p>I don&#8217;t create content for followers or vanity metrics; I try to help others upskill.</p></li><li><p>I&#8217;ll be mixing Text Articles with Video Content soon enough.</p></li><li><p>I&#8217;ll be adding Video Walkthroughs (Andrej Karpathy Style)</p></li><li><p>Expect more complex AI Projects, end-to-end.</p></li><li><p>Expect more hands-on content, building AI Systems.</p></li><li><p>I&#8217;ll also think of how I can repay my Paid Subscribers, through exclusive content, courses, 1-1 sessions, etc.</p></li></ul><h3>Socials</h3><p><strong>Github Code Repository</strong> &#8594; <a href="https://github.com/multi-modal-ai">https://github.com/multi-modal-ai</a><br><strong>Youtube Channel</strong> &#8594; <a href="https://www.youtube.com/@multimodalityai">https://www.youtube.com/@multimodalityai</a><br><strong>LinkedIn </strong>&#8594; <a href="https://www.linkedin.com/in/arazvant/">https://www.linkedin.com/in/arazvant/</a></p><div><hr></div><h3>Adding a Patch :)</h3><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;3b9ef123-6bea-4cda-bae0-de931a85c975&quot;,&quot;duration&quot;:null}"></div><p>I recorded this bit, mainly to let you know that <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Miguel Otero Pedrido&quot;,&quot;id&quot;:89972117,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2b58b1f5-4d25-4dcf-9f48-b67a6e6e1316_1200x1200.jpeg&quot;,&quot;uuid&quot;:&quot;2d3d2589-3cea-4d7d-9fb0-77db90d38cfc&quot;}" data-component-name="MentionToDOM"></span> and I are currently working on recording the Video Course for the <strong><a href="https://github.com/multi-modal-ai/multimodal-agents-course">Kubrick Project</a></strong>, we should publish it soon!</p><p>To stay updated, you can follow <a href="https://www.linkedin.com/in/arazvant/">me</a> or <a href="https://www.linkedin.com/in/migueloteropedrido/">Miguel</a> on LinkedIn, as we&#8217;ll be announcing it there first!</p><p>Thank you all, <br>Hope you&#8217;re excited and will learn a lot more with the new changes I&#8217;ll bring on here!</p><p>All the best &#128591;</p><blockquote><p>See you next week!</p></blockquote>]]></content:encoded></item><item><title><![CDATA[The AI Engineer's Guide to Inference Engines and Frameworks]]></title><description><![CDATA[What solutions are out there? Which one to select based on your use case and AI workload.]]></description><link>https://read.theaimerge.com/p/the-ai-engineers-guide-to-inference</link><guid isPermaLink="false">https://read.theaimerge.com/p/the-ai-engineers-guide-to-inference</guid><dc:creator><![CDATA[Alex Razvant]]></dc:creator><pubDate>Thu, 21 Aug 2025 08:01:13 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!1oH-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81ab0846-9a02-433f-9c7d-1bc23dbcd904_1940x1946.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Hey, welcome!</strong><br>Each week, I share insights on advanced, production-ready AI/ML development, <em>the kind of practical knowledge that rarely</em> gets covered elsewhere.</p><p><em>Join <strong><a href="https://multimodalai.substack.com/subscribe">5,400+ AI/ML engineers</a></strong> who subscribe to level up their skills with hands-on advice, insights, and lessons I&#8217;ve learned from nearly a decade working in the AI industry.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://read.theaimerge.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h3>Introduction</h3><p><strong>When</strong> deploying machine learning models into production, inference speed becomes just as important as accuracy. </p><p>To promote an AI model (LLMs included) from research into production, the deployment lifecycle can be viewed in two distinct stages.</p><p>The research and development stage focuses on model quality, involving&nbsp;pre-training and post-training&nbsp;phases. The deployment and monitoring stage focuses on the model&#8217;s performance as part of a larger AI System.</p><p><em><strong>This article covers everything AI Engineers need to know about Inference Engines and Serving Frameworks</strong>, going through every available open-source solution for optimizing, compiling, and serving AI Models.</em></p><div><hr></div><h2>Table of Contents</h2><ol><li><p>The Phases of Model Development</p></li><li><p>Inference Engines and Inference Frameworks</p><ul><li><p>ONNX and ONNX Runtime</p></li><li><p>TensorRT, TensorRT-LLM</p></li><li><p>vLLM, vLLM + LMCache</p></li><li><p>vLLM + Ray</p></li><li><p>llama.cpp</p></li><li><p>Ollama</p></li><li><p>NVIDIA Triton Inference Server</p></li><li><p>HuggingFace TGI (Text-Generation Inference)</p></li><li><p>CoreML</p></li><li><p>OpenVINO, OpenVINO GenAI for Intel Hardware</p></li></ul></li><li><p>Distributed GenAI Inference Frameworks</p><ol><li><p>NVIDIA Dynamo</p></li><li><p>vLLM + llm-D (Kubernetes)</p></li><li><p>AirBrix</p></li><li><p>Mojo and Mojo MAX Engine</p></li></ol></li><li><p>Conclusion</p></li></ol><div><hr></div><h1>Model Development (Pre/Post-Training)</h1><p>During the first stage, most AI researchers and ML Engineers could train a smaller model from scratch, something which rarely happens, and more often we use a pre-trained model, then further adapt it to downstream tasks. This bit of adapting a model to a new task is a form of <strong>Transfer Learning</strong>, an older term, given the rate at which the AI field progresses. (i.e <a href="https://www.cse.ust.hk/~qyang/Docs/2009/tkde_transfer_learning.pdf">2010, A Survey on Transfer Learning</a>).</p><blockquote><p>Transfer learning is a technique in ML in which knowledge learned from a task is re-used in order to boost performance on a related task.</p></blockquote><p>Nowadays, we hear about `fine-tuning`, `downstream task adaptation`, `post-training`, and other terms, which all refer to the core concept of Transfer Learning.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TBSB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21b6cc1-e708-46e6-87c1-6fa0d65a5521_3653x1250.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TBSB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21b6cc1-e708-46e6-87c1-6fa0d65a5521_3653x1250.png 424w, https://substackcdn.com/image/fetch/$s_!TBSB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21b6cc1-e708-46e6-87c1-6fa0d65a5521_3653x1250.png 848w, https://substackcdn.com/image/fetch/$s_!TBSB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21b6cc1-e708-46e6-87c1-6fa0d65a5521_3653x1250.png 1272w, https://substackcdn.com/image/fetch/$s_!TBSB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21b6cc1-e708-46e6-87c1-6fa0d65a5521_3653x1250.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TBSB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21b6cc1-e708-46e6-87c1-6fa0d65a5521_3653x1250.png" width="1456" height="498" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b21b6cc1-e708-46e6-87c1-6fa0d65a5521_3653x1250.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:498,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:322246,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/171119788?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21b6cc1-e708-46e6-87c1-6fa0d65a5521_3653x1250.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TBSB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21b6cc1-e708-46e6-87c1-6fa0d65a5521_3653x1250.png 424w, https://substackcdn.com/image/fetch/$s_!TBSB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21b6cc1-e708-46e6-87c1-6fa0d65a5521_3653x1250.png 848w, https://substackcdn.com/image/fetch/$s_!TBSB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21b6cc1-e708-46e6-87c1-6fa0d65a5521_3653x1250.png 1272w, https://substackcdn.com/image/fetch/$s_!TBSB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb21b6cc1-e708-46e6-87c1-6fa0d65a5521_3653x1250.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 1. In pre-training, we start with raw, unstructured data and a base model whose parameters are selected randomly. Pre-training requires more compute, more time, and is pricier.</figcaption></figure></div><h4>Examples</h4><p>Let&#8217;s say we want to build a model that detects objects. For that, we&#8217;d select a Computer Vision model (e.g, YOLOs, RCNN) which was pretrained on the MS COCO dataset or other detection datasets, and we&#8217;ll further `finetune` it on our custom subset of objects. </p><p>The same goes for an LLM. We&#8217;d select a pretrained model on Web text, which learned to complete the next word/token in a sentence, and further `finetune` it for summarization, chat, text entity recognition, writing poetry, or other adaptations.</p><blockquote><p>The difference being that for LLMs, the number of techniques one could use is far richer.</p></blockquote><p>For LLMs, we have SFT (Structured Finetuning), RLHF (Reinforcement Learning from Human Feedback), RLAIF (R.L from AI Feedback), DPO (Direct Preference Optimization), GRPO (Group Relative Policy Optimization), and many other methods.</p><p>To group all these, the term `<strong>post-training</strong>` is widely used within the field, and it makes the most sense.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Q6O8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda2f1e02-4403-438e-b491-fc88fc735476_2806x1578.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Q6O8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda2f1e02-4403-438e-b491-fc88fc735476_2806x1578.png 424w, https://substackcdn.com/image/fetch/$s_!Q6O8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda2f1e02-4403-438e-b491-fc88fc735476_2806x1578.png 848w, https://substackcdn.com/image/fetch/$s_!Q6O8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda2f1e02-4403-438e-b491-fc88fc735476_2806x1578.png 1272w, https://substackcdn.com/image/fetch/$s_!Q6O8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda2f1e02-4403-438e-b491-fc88fc735476_2806x1578.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Q6O8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda2f1e02-4403-438e-b491-fc88fc735476_2806x1578.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/da2f1e02-4403-438e-b491-fc88fc735476_2806x1578.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:251222,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/171119788?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda2f1e02-4403-438e-b491-fc88fc735476_2806x1578.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Q6O8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda2f1e02-4403-438e-b491-fc88fc735476_2806x1578.png 424w, https://substackcdn.com/image/fetch/$s_!Q6O8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda2f1e02-4403-438e-b491-fc88fc735476_2806x1578.png 848w, https://substackcdn.com/image/fetch/$s_!Q6O8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda2f1e02-4403-438e-b491-fc88fc735476_2806x1578.png 1272w, https://substackcdn.com/image/fetch/$s_!Q6O8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda2f1e02-4403-438e-b491-fc88fc735476_2806x1578.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 2. During post-training, we prepare a high-quality subset of samples aligned with our target task, and then we further adapt the base model to our specific downstream task.</figcaption></figure></div><h1>Model Deployment</h1><p>Model deployment and monitoring is the phase where most AI/ML Engineers would work in as it connects the research-engineering gap. This phase includes optimizing the model, packaging it into serving infrastructure, integrating with APIs and applications, and monitoring the end-to-end system. </p><blockquote><p>Even if a model performs well in pre-deployment tests or evals, what ultimately matters in production are its <strong>performance metrics</strong> with regards to the entire AI System it is in.</p></blockquote><p>These performance optimizations could be grouped into 2 categories: </p><ul><li><p><strong>System-wide</strong>, which focuses more on the infrastructure part with model parallelisation across multiple GPUs or multiple Nodes, distributed processing of model feed-forward stages, caching, or speculative decoding (LLMs).</p></li><li><p><strong>Model-wide</strong> optimizations are applied at the model level, and these include quantizations, pruning, Knowledge Distillation via Teacher/Student, or model compilation.</p></li></ul><blockquote><p>You could learn more about these two categories of optimizations, on LLMs specifically by reading one of my previous articles:</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;f26339ad-9adf-4273-9a57-b5dbc1f78025&quot;,&quot;caption&quot;:&quot;&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Understanding LLM Optimization Techniques&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:102147316,&quot;name&quot;:&quot;Alex Razvant&quot;,&quot;bio&quot;:&quot;Senior AI Engineer | I work on large-scale Vision AI &amp; MLOps | I share practical industry insights for AI/ML Engineers, on building production-ready AI Systems.&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0862f5c4-de09-482a-a322-7cf43751d511_1624x1624.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-03-01T08:01:22.218Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F892f824f-e4c3-4ca1-b6da-ca0e6a70dd14_2401x2531.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://multimodalai.substack.com/p/understanding-llm-optimization-techniques&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:158020353,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:34,&quot;comment_count&quot;:2,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Neural Bits&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!onU4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5740986b-9860-4ac5-b479-dd8853ab4f2e_1280x1280.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div></blockquote><h4>Examples</h4><p>With traditional Deep Learning models, such as the ones for vision-based tasks of tracking an object in a video or removing the background of an image, we would quantize or compile them on specific GPU hardware to reduce the latency and size of the model, making it run faster.</p><p><em>When running AI on video, each second, there are ~30 different frames we could send to the model for inference, and since a large majority of Vision AI has to run in real-time, we need lightweight, fast models.</em></p><p>In the case of LLMs, inference is a bit trickier as it&#8217;s composed of 2 stages: <strong>prefill and decode</strong>, the former being highly parallelizable, and the latter running sequentially.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ngLx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c7c7b3a-f8fe-4926-92ea-95da4adae442_2918x998.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ngLx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c7c7b3a-f8fe-4926-92ea-95da4adae442_2918x998.png 424w, https://substackcdn.com/image/fetch/$s_!ngLx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c7c7b3a-f8fe-4926-92ea-95da4adae442_2918x998.png 848w, https://substackcdn.com/image/fetch/$s_!ngLx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c7c7b3a-f8fe-4926-92ea-95da4adae442_2918x998.png 1272w, https://substackcdn.com/image/fetch/$s_!ngLx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c7c7b3a-f8fe-4926-92ea-95da4adae442_2918x998.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ngLx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c7c7b3a-f8fe-4926-92ea-95da4adae442_2918x998.png" width="1456" height="498" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6c7c7b3a-f8fe-4926-92ea-95da4adae442_2918x998.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:498,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:464785,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/171119788?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c7c7b3a-f8fe-4926-92ea-95da4adae442_2918x998.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ngLx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c7c7b3a-f8fe-4926-92ea-95da4adae442_2918x998.png 424w, https://substackcdn.com/image/fetch/$s_!ngLx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c7c7b3a-f8fe-4926-92ea-95da4adae442_2918x998.png 848w, https://substackcdn.com/image/fetch/$s_!ngLx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c7c7b3a-f8fe-4926-92ea-95da4adae442_2918x998.png 1272w, https://substackcdn.com/image/fetch/$s_!ngLx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c7c7b3a-f8fe-4926-92ea-95da4adae442_2918x998.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 3: In this image, we can see the Cost vs Latency for the two inference stages of LLMs, clearly showing that the decoding (sequential) stage could be a real bottleneck when increasing the model size. Image taken from the <a href="https://arxiv.org/pdf/2211.05102">Efficiently Scaling Transformer Inference</a> (2022) paper.</figcaption></figure></div><p>Apart from this, LLMs are large, thus one GPU might fit the model weights, but will crash due to OOM (Out of Memory) during inference, because layer activations also have to be stored in memory.</p><p>Optimizations for large models such as LLMs include sharding the model across different GPUs (TP = Tensor Parallel, PP = Pipeline Parallel), FlashAttention (fusing attention operations into a single GPU kernel), and efficiently storing the KV-Cache for further re-uses.</p><p>Having covered the optimizations we could apply, let&#8217;s get practical and study what Inference Engines are, how they work, and which one to choose.</p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://read.theaimerge.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">If you enjoy this article and have found it helpful, you can support my work by becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h1>Inference Engines and Inference Frameworks</h1><p>An <strong>inference engine</strong> is a specialized runtime designed to execute trained models efficiently on hardware. Between a trained model, which is usually in its default PyTorch (.pt), TensorFlow (.tf2) format, and a serving framework such as NVIDIA Triton Inference Server, FastAPI, TorchServe, BentoML, or Tensorflow Serving, there is an <strong>inference engine</strong>.</p><p>An inference engine optimizes a model to balance <em>latency, throughput, precision, and efficiency</em> for it in a production scenario.</p><p>Commonly, inference engines do one or more of the following:</p><ul><li><p><strong>Graph Optimization</strong><br>It analyzes the computational graph of the model and applies optimizations to reduce the graph size and depth, fusing model layers or removing redundant computations.</p></li><li><p><strong>Hardware-Specific Optimization</strong><br>Models could be compiled for target hardware accelerators such as CPU, GPU, TPU, or custom accelerators, by selecting highly tuned compute kernels for each architecture in part.</p></li><li><p><strong>Lowering Precision</strong><br>Reduces the memory footprint by quantizing layers&#8217; precision (e.g., FP32 &#8594; FP16 &#8594; INT8/INT4).</p></li><li><p><strong>Model Pruning &amp; Sparsity</strong><br>Pruning redundant weights or exploiting sparsity in matrices.</p></li></ul><p>Since there is a major difference between traditional deep learning models and generative models, an inference engine will apply different optimizations.</p><h3>General Purpose Inference Engines</h3><p>These include the traditional compilers such as ONNX Runtime, TensorRT (NVIDIA),  OpenVino (Intel), and CoreML (Apple).</p><blockquote><p>From the above-mentioned list, only ONNX Runtime is cross-compatible with multiple accelerators.</p></blockquote><p>Let&#8217;s see why.</p><div><hr></div><h2>ONNX and ONNX Runtime</h2><p>ONNX stands for (open-neural-network-exchange) and is an open-source standard for representing deep learning models. An ONNX model is a serialized file containing the computation graph, architecture, weights, and other parameters.</p><p>When we convert a model to ONNX, the graph of operations is represented in an internal format (ONNX IR), which can be interpreted by other Inference Engines that will further transform this IR into their internal representation.</p><blockquote><p>An important to be made is that ONNX is a model format, we could use to serialize a model into, whereas <a href="https://onnxruntime.ai/docs/">ONNX Runtime</a> is an Inference Engine that can run ONNX models.</p></blockquote><p>When we run inference via ONNX Runtime, an inference session object is created, which loads the model graph, decodes the operator, and partitions the graph of operations based on the Execution Provider.</p><p>Execution providers in ONNXRuntime are the target platforms the model should be optimized for (CPU, CUDA, ROCm).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CIKZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd835f553-6872-4f03-bb9c-a74895af435d_3600x3600.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CIKZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd835f553-6872-4f03-bb9c-a74895af435d_3600x3600.png 424w, https://substackcdn.com/image/fetch/$s_!CIKZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd835f553-6872-4f03-bb9c-a74895af435d_3600x3600.png 848w, https://substackcdn.com/image/fetch/$s_!CIKZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd835f553-6872-4f03-bb9c-a74895af435d_3600x3600.png 1272w, https://substackcdn.com/image/fetch/$s_!CIKZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd835f553-6872-4f03-bb9c-a74895af435d_3600x3600.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CIKZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd835f553-6872-4f03-bb9c-a74895af435d_3600x3600.png" width="1456" height="1456" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d835f553-6872-4f03-bb9c-a74895af435d_3600x3600.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1456,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:619467,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!CIKZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd835f553-6872-4f03-bb9c-a74895af435d_3600x3600.png 424w, https://substackcdn.com/image/fetch/$s_!CIKZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd835f553-6872-4f03-bb9c-a74895af435d_3600x3600.png 848w, https://substackcdn.com/image/fetch/$s_!CIKZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd835f553-6872-4f03-bb9c-a74895af435d_3600x3600.png 1272w, https://substackcdn.com/image/fetch/$s_!CIKZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd835f553-6872-4f03-bb9c-a74895af435d_3600x3600.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 4: Illustrating what the inference workflow looks like when using the ONNXRuntime inference engine.</figcaption></figure></div><p>After you&#8217;ve converted a model to the ONNX format, you can view its graph architecture using <strong><a href="https://netron.app/">Netron</a></strong>, which is a JavaScript application that parses model files. Research engineers often use Netron to analyze models.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hSyl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5468671f-551f-46c1-a7e5-3ad67d017955_1934x1444.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hSyl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5468671f-551f-46c1-a7e5-3ad67d017955_1934x1444.png 424w, https://substackcdn.com/image/fetch/$s_!hSyl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5468671f-551f-46c1-a7e5-3ad67d017955_1934x1444.png 848w, https://substackcdn.com/image/fetch/$s_!hSyl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5468671f-551f-46c1-a7e5-3ad67d017955_1934x1444.png 1272w, https://substackcdn.com/image/fetch/$s_!hSyl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5468671f-551f-46c1-a7e5-3ad67d017955_1934x1444.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hSyl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5468671f-551f-46c1-a7e5-3ad67d017955_1934x1444.png" width="696" height="519.6098901098901" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5468671f-551f-46c1-a7e5-3ad67d017955_1934x1444.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1087,&quot;width&quot;:1456,&quot;resizeWidth&quot;:696,&quot;bytes&quot;:253102,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!hSyl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5468671f-551f-46c1-a7e5-3ad67d017955_1934x1444.png 424w, https://substackcdn.com/image/fetch/$s_!hSyl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5468671f-551f-46c1-a7e5-3ad67d017955_1934x1444.png 848w, https://substackcdn.com/image/fetch/$s_!hSyl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5468671f-551f-46c1-a7e5-3ad67d017955_1934x1444.png 1272w, https://substackcdn.com/image/fetch/$s_!hSyl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5468671f-551f-46c1-a7e5-3ad67d017955_1934x1444.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 5. Visualizing an ONNX model using Netron Web Viewer. Taken from the netron.app viewer.</figcaption></figure></div><p>From ONNX, a model could be further converted into other Inference engine formats, such as OpenVino for Intel CPUs and GPUs, Core ML for Apple devices, or TensorRT for NVIDIA GPUs.</p><div><hr></div><h2>NVIDIA TensorRT</h2><p>The TensorRT compiler is specifically designed to maximize performance on NVIDIA GPUs, due to its low-level integration with the underlying CUDA kernels, cuDNN routines, and NVIDIA GPUs.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1oH-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81ab0846-9a02-433f-9c7d-1bc23dbcd904_1940x1946.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1oH-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81ab0846-9a02-433f-9c7d-1bc23dbcd904_1940x1946.gif 424w, https://substackcdn.com/image/fetch/$s_!1oH-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81ab0846-9a02-433f-9c7d-1bc23dbcd904_1940x1946.gif 848w, https://substackcdn.com/image/fetch/$s_!1oH-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81ab0846-9a02-433f-9c7d-1bc23dbcd904_1940x1946.gif 1272w, https://substackcdn.com/image/fetch/$s_!1oH-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81ab0846-9a02-433f-9c7d-1bc23dbcd904_1940x1946.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1oH-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81ab0846-9a02-433f-9c7d-1bc23dbcd904_1940x1946.gif" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/81ab0846-9a02-433f-9c7d-1bc23dbcd904_1940x1946.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2585869,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!1oH-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81ab0846-9a02-433f-9c7d-1bc23dbcd904_1940x1946.gif 424w, https://substackcdn.com/image/fetch/$s_!1oH-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81ab0846-9a02-433f-9c7d-1bc23dbcd904_1940x1946.gif 848w, https://substackcdn.com/image/fetch/$s_!1oH-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81ab0846-9a02-433f-9c7d-1bc23dbcd904_1940x1946.gif 1272w, https://substackcdn.com/image/fetch/$s_!1oH-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81ab0846-9a02-433f-9c7d-1bc23dbcd904_1940x1946.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Figure 6: How a model graph is decoded and optimized with TensorRT.</figcaption></figure></div><p>Before compiling a model to TensorRT, one would have to convert it to the standardised ONNX format first. Further, TensorRT applies a series of optimizations that are closely related to the NVIDIA GPU architecture this model is built for.</p><blockquote><p>When using TensorRT, if we compile a model for the A100 GPU, we&#8217;ll have to repeat the entire process for other GPUs.</p></blockquote><p>TensorRT is tightly related to how many CUDA and Tensor Cores, how many SM (Streaming Multiprocessors) a GPU has, what&#8217;s the overall Compute Capability (CC) of the GPU, and more.</p><blockquote><p>You could learn more about GPUs, GPU Programming and CUDA by reading my previous article on <strong><a href="https://multimodalai.substack.com/p/the-mlai-engineers-starter-guide">GPU Programming</a></strong>.</p></blockquote><p>Here are two key optimizations that TensorRT brings that have a large impact on performance:</p><ul><li><p><strong>Kernel Fusion</strong> - distinct kernels can be fused and calculated on a single data flow. For example, we can fuse a convolution kernel followed by ReLU, and compute the results on a single pass through the data.</p></li><li><p><strong>Kernel Auto-Tuning</strong> - CUDA programming is based on Threads and Blocks, and kernel auto-tuning detects the optimal n_of_threads and n_of_blocks for the specific GPU Architecture, based on its CUDA Cores and Tensor Cores counts.</p></li></ul><p>Because TensorRT is general-purpose, let&#8217;s walk through how an LLM model is converted into a TensorRT engine.</p><div><hr></div><h2>NVIDIA TensorRT-LLM</h2><p>TensorRT-LLM is a high-level Python API to build TensorRT engines that contain transformer-specific optimizations. It provides state-of-the-art optimizations, including custom attention kernels, in-flight batching, paged KV caching, transformer quantizations (FP8, INT4, SmoothQuant), speculative decoding, and much more, to perform inference efficiently on NVIDIA GPUs.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!h9gt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7d56f2d-bdad-491e-bf22-b5d77986dcc7_3000x2015.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!h9gt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7d56f2d-bdad-491e-bf22-b5d77986dcc7_3000x2015.png 424w, https://substackcdn.com/image/fetch/$s_!h9gt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7d56f2d-bdad-491e-bf22-b5d77986dcc7_3000x2015.png 848w, https://substackcdn.com/image/fetch/$s_!h9gt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7d56f2d-bdad-491e-bf22-b5d77986dcc7_3000x2015.png 1272w, https://substackcdn.com/image/fetch/$s_!h9gt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7d56f2d-bdad-491e-bf22-b5d77986dcc7_3000x2015.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!h9gt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7d56f2d-bdad-491e-bf22-b5d77986dcc7_3000x2015.png" width="1456" height="978" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a7d56f2d-bdad-491e-bf22-b5d77986dcc7_3000x2015.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:978,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:484653,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/171119788?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7d56f2d-bdad-491e-bf22-b5d77986dcc7_3000x2015.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!h9gt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7d56f2d-bdad-491e-bf22-b5d77986dcc7_3000x2015.png 424w, https://substackcdn.com/image/fetch/$s_!h9gt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7d56f2d-bdad-491e-bf22-b5d77986dcc7_3000x2015.png 848w, https://substackcdn.com/image/fetch/$s_!h9gt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7d56f2d-bdad-491e-bf22-b5d77986dcc7_3000x2015.png 1272w, https://substackcdn.com/image/fetch/$s_!h9gt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7d56f2d-bdad-491e-bf22-b5d77986dcc7_3000x2015.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 7: Comparison between TensorRT and TensorRT-LLM across the purpose, optimizations used, and learning curve.</figcaption></figure></div><p>To optimize an LLM using TensorRT-LLM, the team at NVIDIA published the code workflow for each LLM variant. For example, Llama models follow a different optimization configuration than Gemma or Mistral models.</p><p>To find the model compatibility and steps to optimize and serve TensorRT-LLM engines, see the library <a href="https://github.com/NVIDIA/TensorRT-LLM/tree/main/tensorrt_llm/models">models section on GitHub.</a></p><blockquote><p>With TensorRT-LLM, after optimizing a model, we don&#8217;t get a monolithic engine file, but multiple sub-engines connected as a pipeline.</p></blockquote><p>Each sub-engine is responsible for a part of the model in the inference workflow:</p><ul><li><p><strong>Tokenizer Engine</strong> - this is the optimized model that does token-preprocessing before passing the sequence to the LLM.</p></li><li><p><strong>The Transformer Model</strong> - this is the TensorRT engine of the transformer model.</p></li><li><p><strong>Detokenizer Engine</strong> - this block decodes token IDs back to text tokens, also integrating in-flight-batching and optimized kernels.</p></li><li><p><strong>The BLS Model Pipeline</strong> - this is the pipeline composer, a Business Logic Scripting module chaining the blocks.</p></li></ul><p>TensorRT-LLM is designed for large-scale deployments, squeezing the best out of the GPUs. Simpler engines that have comparable results on latency for small-mid scale deployments are vLLM and SGLang.</p><div><hr></div><h2>vLLM and vLLM + Ray</h2><p>vLLM is a high-throughput and memory-efficient inference engine for serving Large Language Models. It was originally developed in the <a href="https://sky.cs.berkeley.edu/">Sky Computing Lab at UC Berkeley</a>, and it quickly evolved into a community-driven project. Being built mostly in Python (80+%) with a bit of CUDA and C++ (~13%) for Attention kernels and other optimizations, vLLM became popular amongst AI Engineers who need to deploy LLMs at scale.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BIl2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae1d900-bffd-4477-abac-ae99755f4c50_1170x358.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BIl2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae1d900-bffd-4477-abac-ae99755f4c50_1170x358.png 424w, https://substackcdn.com/image/fetch/$s_!BIl2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae1d900-bffd-4477-abac-ae99755f4c50_1170x358.png 848w, https://substackcdn.com/image/fetch/$s_!BIl2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae1d900-bffd-4477-abac-ae99755f4c50_1170x358.png 1272w, https://substackcdn.com/image/fetch/$s_!BIl2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae1d900-bffd-4477-abac-ae99755f4c50_1170x358.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BIl2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae1d900-bffd-4477-abac-ae99755f4c50_1170x358.png" width="1170" height="358" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8ae1d900-bffd-4477-abac-ae99755f4c50_1170x358.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:358,&quot;width&quot;:1170,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Single sequence generation with Llama models on the ShareGPT dataset with various NVIDIA hardware&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Single sequence generation with Llama models on the ShareGPT dataset with various NVIDIA hardware" title="Single sequence generation with Llama models on the ShareGPT dataset with various NVIDIA hardware" srcset="https://substackcdn.com/image/fetch/$s_!BIl2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae1d900-bffd-4477-abac-ae99755f4c50_1170x358.png 424w, https://substackcdn.com/image/fetch/$s_!BIl2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae1d900-bffd-4477-abac-ae99755f4c50_1170x358.png 848w, https://substackcdn.com/image/fetch/$s_!BIl2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae1d900-bffd-4477-abac-ae99755f4c50_1170x358.png 1272w, https://substackcdn.com/image/fetch/$s_!BIl2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ae1d900-bffd-4477-abac-ae99755f4c50_1170x358.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 8: How inference throughput compares between vLLM, HF Transformers, and HF TGI (Text Generation Inference) engines to run LLMs. Taken from vLLM GitHub page.</figcaption></figure></div><p>Amongst the optimizations vLLM brings to the table, two key techniques that improve performance are Paged Attention and Continuous Batching.</p><h4>1/ Smarter Memory Management with Paged Attention</h4><p>Paged Attention is a mechanism for efficient management of attention key and value memory, which could improve LLM serving ~24x using 50% less GPU memory compared with traditional methods. </p><p>In LLM inference, having a starting prompt, the prefill phase computes the initial attention states Keys (K) and Values (V). Next, with each decoding step, we get a new token into the sequence (i.e, completion tokens) and the K, V states have to be updated.</p><p>To avoid computing these states on each iteration, vLLM uses Paged Attention to store previous states, and re-computing only the current token state.</p><h4>2/ Continuous Request Batching</h4><p>Static batching waits for all sequences in a batch to finish. For LLMs, since inference requests will have different lengths, continuous batching dynamically replaces completed sequences with new ones at each iteration. </p><p>This allows new requests to fill GPU slots immediately, resulting in higher throughput, reduced latency, and more efficient GPU utilization.</p><blockquote><p>You could dive into more detail about vLLM, and learn how to get started with vLLM by reading my previous article.</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;c4e0354c-9564-49fa-9714-6467d250894d&quot;,&quot;caption&quot;:&quot;&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;How does vLLM serve LLMs at scale?&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:102147316,&quot;name&quot;:&quot;Alex Razvant&quot;,&quot;bio&quot;:&quot;Senior AI Engineer | I work on large-scale Vision AI &amp; MLOps | I share practical industry insights for AI/ML Engineers, on building production-ready AI Systems.&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0862f5c4-de09-482a-a322-7cf43751d511_1624x1624.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-03-27T08:02:47.529Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!8Y1V!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfba543a-5764-48e8-9f14-af32e4990ea1_1200x591.gif&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://multimodalai.substack.com/p/unpacking-vllm-distributed-inference&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:159610212,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:28,&quot;comment_count&quot;:2,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Neural Bits&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!onU4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5740986b-9860-4ac5-b479-dd8853ab4f2e_1280x1280.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div></blockquote><p>One important add-on to vLLM is LMCache, which adds a different layer on how vLLM processes and reuses the KV Cache in its built-in Paged Attention mechanism.</p><p><strong><a href="https://github.com/LMCache/LMCache">LMCache</a></strong> aims to reduce TTFT (Time To First Token) and increase throughput, especially under long-context scenarios. Compared to other serving frameworks, it caches reusable texts across various locations, including (GPU, CPU DRAM, Local Disk), caching entire reused text KV Cache, not only prefixes.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!N-lL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97405c79-ccbd-457d-b09c-f1f936c492b9_3630x1480.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!N-lL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97405c79-ccbd-457d-b09c-f1f936c492b9_3630x1480.png 424w, https://substackcdn.com/image/fetch/$s_!N-lL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97405c79-ccbd-457d-b09c-f1f936c492b9_3630x1480.png 848w, https://substackcdn.com/image/fetch/$s_!N-lL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97405c79-ccbd-457d-b09c-f1f936c492b9_3630x1480.png 1272w, https://substackcdn.com/image/fetch/$s_!N-lL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97405c79-ccbd-457d-b09c-f1f936c492b9_3630x1480.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!N-lL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97405c79-ccbd-457d-b09c-f1f936c492b9_3630x1480.png" width="1456" height="594" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/97405c79-ccbd-457d-b09c-f1f936c492b9_3630x1480.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:594,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;performance&quot;,&quot;title&quot;:&quot;performance&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="performance" title="performance" srcset="https://substackcdn.com/image/fetch/$s_!N-lL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97405c79-ccbd-457d-b09c-f1f936c492b9_3630x1480.png 424w, https://substackcdn.com/image/fetch/$s_!N-lL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97405c79-ccbd-457d-b09c-f1f936c492b9_3630x1480.png 848w, https://substackcdn.com/image/fetch/$s_!N-lL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97405c79-ccbd-457d-b09c-f1f936c492b9_3630x1480.png 1272w, https://substackcdn.com/image/fetch/$s_!N-lL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97405c79-ccbd-457d-b09c-f1f936c492b9_3630x1480.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 8.1. LMCache will cache and reuse longer token KV Cache, not only prefixes. This reduces the GPU cycles, speeding up the prefill phase. Taken from the GitHub Page.</figcaption></figure></div><p>This next set of Inference Engines is more specialized, either architecture-bound bound such as CoreML for Apple Devices, or use-case bound, such as llama.cpp for LLMs.</p><h4>1/ CoreML</h4><p>CoreML is Apple&#8217;s framework for on-device inference. Models in this format leverage the unified CPU &amp; GPU memory and the Neural Engine components in Apple chips.  </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-8lV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd886eb47-01a2-409c-bf59-76a074438160_1314x875.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-8lV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd886eb47-01a2-409c-bf59-76a074438160_1314x875.png 424w, https://substackcdn.com/image/fetch/$s_!-8lV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd886eb47-01a2-409c-bf59-76a074438160_1314x875.png 848w, https://substackcdn.com/image/fetch/$s_!-8lV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd886eb47-01a2-409c-bf59-76a074438160_1314x875.png 1272w, https://substackcdn.com/image/fetch/$s_!-8lV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd886eb47-01a2-409c-bf59-76a074438160_1314x875.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-8lV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd886eb47-01a2-409c-bf59-76a074438160_1314x875.png" width="1314" height="875" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d886eb47-01a2-409c-bf59-76a074438160_1314x875.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:875,&quot;width&quot;:1314,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:1314,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="1314" title="1314" srcset="https://substackcdn.com/image/fetch/$s_!-8lV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd886eb47-01a2-409c-bf59-76a074438160_1314x875.png 424w, https://substackcdn.com/image/fetch/$s_!-8lV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd886eb47-01a2-409c-bf59-76a074438160_1314x875.png 848w, https://substackcdn.com/image/fetch/$s_!-8lV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd886eb47-01a2-409c-bf59-76a074438160_1314x875.png 1272w, https://substackcdn.com/image/fetch/$s_!-8lV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd886eb47-01a2-409c-bf59-76a074438160_1314x875.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 9. The savefile format of a CoreML Model Package, to be deployed on Apple Devices (iPhone, iPad, MacBook). Taken from CoreML Docs.</figcaption></figure></div><p>On Apple devices, all memory is unified. You no longer need a separate GPU with dedicated VRAM because the entire model is loaded into the shared memory pool (RAM + GPU + CPU). </p><blockquote><p>See <strong><a href="https://machinelearning.apple.com/research/core-ml-on-device-llama">this tutorial</a></strong> on how to port Llama-3.1 with CoreML.</p></blockquote><p>The CPU, GPU, and Neural Engine can access model parameters directly from this unified memory, without transferring data back and forth, which allows developers to load larger models.</p><blockquote><p> See <strong><a href="https://dev.to/ocodista/deepseek-r1-7bs-performance-on-a-developers-macbook-3mg2">this benchmark</a></strong> on running DeepSeek R1 on a MacBook Pro M2.</p></blockquote><div><hr></div><h4>2/ Intel OpenVINO</h4><p>OpenVINO is an open-source toolkit developed by <strong>Intel</strong> for optimizing and deploying deep learning models. It enables AI inference on a variety of Intel hardware, including CPUs, GPUs, and VPUs, with a "write-once, deploy-anywhere" approach. </p><p>Initially, OpenVINO was popular for computer vision models, since most AI deployments that needed to run efficiently on smaller devices or at the edge were based on vision tasks. As a result, OpenVINO was heavily optimized for CV and CNN-based models.</p><p>Today, OpenVINO also provides a GenAI blueprint to optimize and serve LLMs using the OpenVINO runtime. To do that, you could either use the `<em>optimum-cli</em>` from HuggingFace to convert your LLM to OpenVino format, or download a pre-compiled OpenVino profile.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nZoA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80d5fd2-22dc-4635-9ca9-a70e2dda6f72.svg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nZoA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80d5fd2-22dc-4635-9ca9-a70e2dda6f72.svg 424w, https://substackcdn.com/image/fetch/$s_!nZoA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80d5fd2-22dc-4635-9ca9-a70e2dda6f72.svg 848w, https://substackcdn.com/image/fetch/$s_!nZoA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80d5fd2-22dc-4635-9ca9-a70e2dda6f72.svg 1272w, https://substackcdn.com/image/fetch/$s_!nZoA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80d5fd2-22dc-4635-9ca9-a70e2dda6f72.svg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nZoA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80d5fd2-22dc-4635-9ca9-a70e2dda6f72.svg" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f80d5fd2-22dc-4635-9ca9-a70e2dda6f72.svg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nZoA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80d5fd2-22dc-4635-9ca9-a70e2dda6f72.svg 424w, https://substackcdn.com/image/fetch/$s_!nZoA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80d5fd2-22dc-4635-9ca9-a70e2dda6f72.svg 848w, https://substackcdn.com/image/fetch/$s_!nZoA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80d5fd2-22dc-4635-9ca9-a70e2dda6f72.svg 1272w, https://substackcdn.com/image/fetch/$s_!nZoA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff80d5fd2-22dc-4635-9ca9-a70e2dda6f72.svg 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Figure 10. Serving an LLM from HuggingFace using the OpenVino GenAI library. This presents 2 methods to compile an OpenVino profile: using the HF optimum-cli optimizer tool or downloading a pre-compiled profile. Taken from the GitHub Page.</figcaption></figure></div><blockquote><p>Find more about <strong><a href="https://github.com/openvinotoolkit/openvino">OpenVINO</a></strong> and <strong><a href="https://github.com/openvinotoolkit/openvino.genai">OpenVINO GenAI</a></strong> in the official docs.</p></blockquote><div><hr></div><h4>3/ LLama C++</h4><p><strong>llama.cpp</strong> is a high-performance C/C++ inference engine to run LLMs locally with minimal dependencies. Being built in a low-level language, and with every system being able to run C and C++, it&#8217;s compatible with a wide range of target architectures, making it portable.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IKqK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96d40b3f-6d02-4cdf-93f2-6aa2ed7d2de0_389x129.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IKqK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96d40b3f-6d02-4cdf-93f2-6aa2ed7d2de0_389x129.png 424w, https://substackcdn.com/image/fetch/$s_!IKqK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96d40b3f-6d02-4cdf-93f2-6aa2ed7d2de0_389x129.png 848w, https://substackcdn.com/image/fetch/$s_!IKqK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96d40b3f-6d02-4cdf-93f2-6aa2ed7d2de0_389x129.png 1272w, https://substackcdn.com/image/fetch/$s_!IKqK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96d40b3f-6d02-4cdf-93f2-6aa2ed7d2de0_389x129.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IKqK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96d40b3f-6d02-4cdf-93f2-6aa2ed7d2de0_389x129.png" width="728" height="241.41902313624678" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/96d40b3f-6d02-4cdf-93f2-6aa2ed7d2de0_389x129.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:129,&quot;width&quot;:389,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Llama.cpp - Wikipedia&quot;,&quot;title&quot;:&quot;Llama.cpp - Wikipedia&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Llama.cpp - Wikipedia" title="Llama.cpp - Wikipedia" srcset="https://substackcdn.com/image/fetch/$s_!IKqK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96d40b3f-6d02-4cdf-93f2-6aa2ed7d2de0_389x129.png 424w, https://substackcdn.com/image/fetch/$s_!IKqK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96d40b3f-6d02-4cdf-93f2-6aa2ed7d2de0_389x129.png 848w, https://substackcdn.com/image/fetch/$s_!IKqK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96d40b3f-6d02-4cdf-93f2-6aa2ed7d2de0_389x129.png 1272w, https://substackcdn.com/image/fetch/$s_!IKqK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96d40b3f-6d02-4cdf-93f2-6aa2ed7d2de0_389x129.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Figure 11.1 The LLaMA C++ Logo. Taken from Google Images.</figcaption></figure></div><p>Based on your system architecture, llama.cpp binaries are built with the appropriate backends, such as:</p><ul><li><p><strong>BLAS </strong>(Basic Linear Algebra Subprograms) for all architectures</p></li><li><p><strong>CUDA</strong>  for NVIDIA GPUs.</p></li><li><p><strong>HIP </strong>for AMD GPUs.</p></li><li><p><strong>MPS</strong> (Metal Performance Shaders) for Apple M-series.</p></li></ul><blockquote><p>In this context, a backend is nothing more than an execution engine that translates model operations into hardware-specific instructions.</p><p>See the full list of supported llama.cpp <strong><a href="https://github.com/ggml-org/llama.cpp?tab=readme-ov-file#supported-backends">Backends</a></strong>.</p></blockquote><p>One key component of the llama.cpp ecosystem is the GGUF binary model format. On HuggingFace, the recommended model storage format is <strong><a href="https://huggingface.co/docs/safetensors/en/index">safetensors</a></strong>, which stores tensor-only data. GGUF is llama.cpp compatible, and it stores tensors and rich metadata.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!i9_A!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d7e150e-5fb0-4bbc-b1e1-1ccb71a8ef9a_3072x2236.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i9_A!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d7e150e-5fb0-4bbc-b1e1-1ccb71a8ef9a_3072x2236.png 424w, https://substackcdn.com/image/fetch/$s_!i9_A!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d7e150e-5fb0-4bbc-b1e1-1ccb71a8ef9a_3072x2236.png 848w, https://substackcdn.com/image/fetch/$s_!i9_A!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d7e150e-5fb0-4bbc-b1e1-1ccb71a8ef9a_3072x2236.png 1272w, https://substackcdn.com/image/fetch/$s_!i9_A!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d7e150e-5fb0-4bbc-b1e1-1ccb71a8ef9a_3072x2236.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i9_A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d7e150e-5fb0-4bbc-b1e1-1ccb71a8ef9a_3072x2236.png" width="1456" height="1060" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2d7e150e-5fb0-4bbc-b1e1-1ccb71a8ef9a_3072x2236.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1060,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!i9_A!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d7e150e-5fb0-4bbc-b1e1-1ccb71a8ef9a_3072x2236.png 424w, https://substackcdn.com/image/fetch/$s_!i9_A!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d7e150e-5fb0-4bbc-b1e1-1ccb71a8ef9a_3072x2236.png 848w, https://substackcdn.com/image/fetch/$s_!i9_A!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d7e150e-5fb0-4bbc-b1e1-1ccb71a8ef9a_3072x2236.png 1272w, https://substackcdn.com/image/fetch/$s_!i9_A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d7e150e-5fb0-4bbc-b1e1-1ccb71a8ef9a_3072x2236.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 11.2 The GGUF compressed format to store LLM weights, parameters, and rich metadata. Taken from HuggingFace.</figcaption></figure></div><p>GGUF standardizes how weights, tokenizers, and metadata are stored, making models portable across different backends (CPU, CUDA, Metal, Vulkan, etc.), enabling faster model loading times. </p><blockquote><p>See this <strong><a href="https://blog.steelph0enix.dev/posts/llama-cpp-guide/">extensive tutorial</a></strong>, on getting started with llama.cpp.</p></blockquote><div><hr></div><h2>Serving Frameworks</h2><p>Having covered a majority of Inference Engines, the next component of an AI Inference stack is the Serving Framework. Besides parsing the inference engine and executing it, a Serving Framework takes care of managing the inference server.</p><p>This includes system-wide optimizations, batching, request-response mapping, and more.</p><p>In this section, we&#8217;ll describe 4 Serving Frameworks while using the LLM serving use-case. We won&#8217;t cover TorchServe or TensorFlow Serving, as these are more general-oriented.</p><h4>1/ Hugging Face TGI - Text Generation Inference</h4><p>TGI is a toolkit for deploying and serving LLMs, enabling high-performance text generation for the most popular open-source LLMs. </p><p>As with any other Serving Framework, TGI is built on two components: a Web Server in Rust to handle batching and request routing, and the LLM Executor from the HuggingFace Transformers library to run the token sequence through the LLM.</p><p>Notable system-wide optimizations that TGI offers are:</p><ul><li><p>Tensor Parallel - to distribute larger models as shards on multiple GPUs.</p></li><li><p>FlashAttention plugin that fuses the Attention operations as a single kernel, to reduce the memory footprint and increase token throughput.</p></li><li><p>Continuous Batching and Paged Attention</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!u7wk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f0b49e-9b19-46a2-a252-a15e7ce771fd_7178x4390.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!u7wk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f0b49e-9b19-46a2-a252-a15e7ce771fd_7178x4390.png 424w, https://substackcdn.com/image/fetch/$s_!u7wk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f0b49e-9b19-46a2-a252-a15e7ce771fd_7178x4390.png 848w, https://substackcdn.com/image/fetch/$s_!u7wk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f0b49e-9b19-46a2-a252-a15e7ce771fd_7178x4390.png 1272w, https://substackcdn.com/image/fetch/$s_!u7wk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f0b49e-9b19-46a2-a252-a15e7ce771fd_7178x4390.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!u7wk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f0b49e-9b19-46a2-a252-a15e7ce771fd_7178x4390.png" width="1456" height="890" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/56f0b49e-9b19-46a2-a252-a15e7ce771fd_7178x4390.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:890,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Text Generation Inference&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Text Generation Inference" title="Text Generation Inference" srcset="https://substackcdn.com/image/fetch/$s_!u7wk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f0b49e-9b19-46a2-a252-a15e7ce771fd_7178x4390.png 424w, https://substackcdn.com/image/fetch/$s_!u7wk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f0b49e-9b19-46a2-a252-a15e7ce771fd_7178x4390.png 848w, https://substackcdn.com/image/fetch/$s_!u7wk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f0b49e-9b19-46a2-a252-a15e7ce771fd_7178x4390.png 1272w, https://substackcdn.com/image/fetch/$s_!u7wk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56f0b49e-9b19-46a2-a252-a15e7ce771fd_7178x4390.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 12. HuggingFace TGI architecture, composed of the Rust web server and the high-level Python API from the HuggingFace Transformers library to execute the LLM feedforward. Taken from TGI HuggingFace Page.</figcaption></figure></div><blockquote><p>Find more about <strong><a href="https://huggingface.co/docs/text-generation-inference/en/index">TGI</a></strong> and how to get started.</p></blockquote><div><hr></div><h4>2/ Ollama</h4><p>Ollama can be considered as a wrapper over llama.cpp, to serve LLMs locally. </p><p>Similarly to TGI on the architecture side, Ollama runs GGUF models through llama.cpp as the Inference Engine, but builds an optimized Web Server in GO to handle batching, system-wide optimizations, or request-response routing.</p><blockquote><p>Getting up-and-running with llama.cpp is no easy-feat, and Ollama aims to simplify that by providing an easy-to-use workflow to run LLMs.</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZQM7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F653b97d5-57c5-4efc-8085-bad885718fb5_1044x1374.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZQM7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F653b97d5-57c5-4efc-8085-bad885718fb5_1044x1374.png 424w, https://substackcdn.com/image/fetch/$s_!ZQM7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F653b97d5-57c5-4efc-8085-bad885718fb5_1044x1374.png 848w, https://substackcdn.com/image/fetch/$s_!ZQM7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F653b97d5-57c5-4efc-8085-bad885718fb5_1044x1374.png 1272w, https://substackcdn.com/image/fetch/$s_!ZQM7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F653b97d5-57c5-4efc-8085-bad885718fb5_1044x1374.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZQM7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F653b97d5-57c5-4efc-8085-bad885718fb5_1044x1374.png" width="488" height="642.2528735632184" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/653b97d5-57c5-4efc-8085-bad885718fb5_1044x1374.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1374,&quot;width&quot;:1044,&quot;resizeWidth&quot;:488,&quot;bytes&quot;:178287,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/171119788?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F653b97d5-57c5-4efc-8085-bad885718fb5_1044x1374.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZQM7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F653b97d5-57c5-4efc-8085-bad885718fb5_1044x1374.png 424w, https://substackcdn.com/image/fetch/$s_!ZQM7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F653b97d5-57c5-4efc-8085-bad885718fb5_1044x1374.png 848w, https://substackcdn.com/image/fetch/$s_!ZQM7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F653b97d5-57c5-4efc-8085-bad885718fb5_1044x1374.png 1272w, https://substackcdn.com/image/fetch/$s_!ZQM7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F653b97d5-57c5-4efc-8085-bad885718fb5_1044x1374.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 13. Downloading the Ollama installer. Taken from the ollama landing page.</figcaption></figure></div><p>With Ollama, you can download the installer and launch it, which will automatically start an Ollama Server and keep it alive. Further, using the Ollama UI or the CLI, you could pull models and serve them.</p><blockquote><p>In reality, Ollama models are GGUF profiles stored under the Ollama&#8217;s own model format called Modelfile. These GGUFs are executed by llama.cpp underneath.</p><p>Ollama provides the ecosystem around it.</p></blockquote><p>Ollama Server exposes OpenAI-compatible API endpoints you could integrate further into your applications.</p><blockquote><p>Find more about <strong><a href="https://github.com/ollama/ollama/tree/main/docs">Ollama</a></strong>, how it works and how to get started.</p></blockquote><div><hr></div><h4>3/ Triton Inferece Server</h4><p>NVIDIA&#8217;s Triton Inference Server is one of the most mature and production-ready serving frameworks out there. Even if its learning curve is high and is quite complex to master, Triton Server is strictly optimized for AI workloads in production.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!y4j6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d0a449d-9b23-44af-8ad2-4a020fc07c87_2300x2304.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!y4j6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d0a449d-9b23-44af-8ad2-4a020fc07c87_2300x2304.gif 424w, https://substackcdn.com/image/fetch/$s_!y4j6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d0a449d-9b23-44af-8ad2-4a020fc07c87_2300x2304.gif 848w, https://substackcdn.com/image/fetch/$s_!y4j6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d0a449d-9b23-44af-8ad2-4a020fc07c87_2300x2304.gif 1272w, https://substackcdn.com/image/fetch/$s_!y4j6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d0a449d-9b23-44af-8ad2-4a020fc07c87_2300x2304.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!y4j6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d0a449d-9b23-44af-8ad2-4a020fc07c87_2300x2304.gif" width="1456" height="1459" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8d0a449d-9b23-44af-8ad2-4a020fc07c87_2300x2304.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1459,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2976595,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://multimodalai.substack.com/i/171119788?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d0a449d-9b23-44af-8ad2-4a020fc07c87_2300x2304.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!y4j6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d0a449d-9b23-44af-8ad2-4a020fc07c87_2300x2304.gif 424w, https://substackcdn.com/image/fetch/$s_!y4j6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d0a449d-9b23-44af-8ad2-4a020fc07c87_2300x2304.gif 848w, https://substackcdn.com/image/fetch/$s_!y4j6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d0a449d-9b23-44af-8ad2-4a020fc07c87_2300x2304.gif 1272w, https://substackcdn.com/image/fetch/$s_!y4j6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d0a449d-9b23-44af-8ad2-4a020fc07c87_2300x2304.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 14. How NVIDIA&#8217;s Triton Inference Server works underneath. Models are loaded from the model repository and deployed. Triton Server comes with built-in telemetry via Prometheus, exposing key metrics on both hardware and model performance.</figcaption></figure></div><p>NVIDIA Triton Server supports multiple Inference Engines, such as TorchScript, TensorFlow, ONNX, TensorRT, and, more recently, it can also serve TensorRT-LLM engines.</p><blockquote><p>Learn more about NVIDIA Triton Server in this hands-on article.</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;d2cd8edb-7743-4236-a505-ac8b68e15115&quot;,&quot;caption&quot;:&quot;&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;NVIDIA Triton Inference Server made simple.&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:102147316,&quot;name&quot;:&quot;Alex Razvant&quot;,&quot;bio&quot;:&quot;Senior AI Engineer | I work on large-scale Vision AI &amp; MLOps | I share practical industry insights for AI/ML Engineers, on building production-ready AI Systems.&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0862f5c4-de09-482a-a322-7cf43751d511_1624x1624.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2024-08-20T13:01:16.885Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d4460ad-0e7e-4545-aee6-274b93dd5959_2300x2304.gif&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://multimodalai.substack.com/p/how-to-use-nvidia-triton-server-the&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:147783782,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:11,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Neural Bits&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!onU4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5740986b-9860-4ac5-b479-dd8853ab4f2e_1280x1280.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div></blockquote><div><hr></div><h2>Distributed Inference Frameworks (LLMs)</h2><h4>1/ NVIDIA Dynamo</h4><p>Dynamo is the newest serving framework from NVIDIA that focuses strictly on LLM inference. Referred to as `Triton Server successor`, Dynamo focuses on distributed inference of large LLMs and particularly Reasoning LLMs.</p><p>One of the key optimizations of Dynamo is <strong><a href="https://arxiv.org/abs/2401.09670">Disaggregated Serving</a></strong>.</p><blockquote><p>If you remember, LLM inference has two stages, prefill and decode, with the decode part predicting one token at a time - Dynamo focuses on parallelizing the decode stage on multiple GPUs or Nodes.</p></blockquote><p>Dynamo supports and can serve both TensorRT-LLM and vLLM engines, with the former getting the SOTA results on NVIDIA GPUs.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!r0gr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17e9eeaa-9673-48c6-bb02-b68a94b1ba56_5843x3130.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!r0gr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17e9eeaa-9673-48c6-bb02-b68a94b1ba56_5843x3130.png 424w, https://substackcdn.com/image/fetch/$s_!r0gr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17e9eeaa-9673-48c6-bb02-b68a94b1ba56_5843x3130.png 848w, https://substackcdn.com/image/fetch/$s_!r0gr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17e9eeaa-9673-48c6-bb02-b68a94b1ba56_5843x3130.png 1272w, https://substackcdn.com/image/fetch/$s_!r0gr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17e9eeaa-9673-48c6-bb02-b68a94b1ba56_5843x3130.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!r0gr!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17e9eeaa-9673-48c6-bb02-b68a94b1ba56_5843x3130.png" width="1200" height="642.8571428571429" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/17e9eeaa-9673-48c6-bb02-b68a94b1ba56_5843x3130.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:780,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!r0gr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17e9eeaa-9673-48c6-bb02-b68a94b1ba56_5843x3130.png 424w, https://substackcdn.com/image/fetch/$s_!r0gr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17e9eeaa-9673-48c6-bb02-b68a94b1ba56_5843x3130.png 848w, https://substackcdn.com/image/fetch/$s_!r0gr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17e9eeaa-9673-48c6-bb02-b68a94b1ba56_5843x3130.png 1272w, https://substackcdn.com/image/fetch/$s_!r0gr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17e9eeaa-9673-48c6-bb02-b68a94b1ba56_5843x3130.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 15. How NVIDIA Dynamo works underneath. This diagram is an edited version of the original, where I overlaid key details on how each component works.</figcaption></figure></div><p>One key component of Dynamo is the NIXL (NVIDIA Inference Xfer Library), which enables high-performance point-to-point communication, allowing for the KV-Cache computed on a set of distributed nodes to be accessed and shared fast, reducing the time it takes for prefill &amp; decode inference steps.</p><blockquote><p>Check this previous article with a full, in-depth walkthrough of NVIDIA Dynamo.</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;5a86551f-c9bc-49a0-b91a-e75b3a975b6e&quot;,&quot;caption&quot;:&quot;&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Unpacking NVIDIA Dynamo LLM Inference Framework&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:102147316,&quot;name&quot;:&quot;Alex Razvant&quot;,&quot;bio&quot;:&quot;Senior AI Engineer | I work on large-scale Vision AI &amp; MLOps | I share practical industry insights for AI/ML Engineers, on building production-ready AI Systems.&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0862f5c4-de09-482a-a322-7cf43751d511_1624x1624.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-03-20T08:02:26.677Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!r0gr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17e9eeaa-9673-48c6-bb02-b68a94b1ba56_5843x3130.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://multimodalai.substack.com/p/the-one-stop-to-understand-the-new&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:159462671,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:27,&quot;comment_count&quot;:5,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Neural Bits&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!onU4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5740986b-9860-4ac5-b479-dd8853ab4f2e_1280x1280.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div></blockquote><div><hr></div><h4>2/ AirBrix (backed by vLLM Team)</h4><p>Similar to Dynamo, AirBrix is an <strong><a href="https://github.com/vllm-project/aibrix">open-source</a></strong> initiative designed to provide essential building blocks to construct scalable GenAI inference infrastructure, <strong>built by the same team behind vLLM. </strong></p><p>Airbrix distributes the inference infrastructure on top of a Kubernetes cluster, with the Control Plane handling the Model Metadata stores, which could include LoRA Adapters or fully-finetuned model checkpoints, Load Balancing, the Autoscaler of Inference Endpoints, and Controllers. </p><p>The actual inference workload is distributed across a set of Kubernetes Pods, with each Pod serving a vLLM Engine with a built-in Model Loader, WatchDog for metrics, and autoscaling triggers. To share the KV-Cache across multiple vLLM Instances, AirBrix uses KV-Cache-specific pods, mounted as side-cars to the runtimes serving the models. </p><blockquote><p>For cross-pod KV-Cache, AirBrix could also use the <strong>NVIDIA NIXL</strong> Library.</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!D6Pt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87547456-47b0-4469-b0a4-ad210fca6d50_1258x1026.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!D6Pt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87547456-47b0-4469-b0a4-ad210fca6d50_1258x1026.jpeg 424w, https://substackcdn.com/image/fetch/$s_!D6Pt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87547456-47b0-4469-b0a4-ad210fca6d50_1258x1026.jpeg 848w, https://substackcdn.com/image/fetch/$s_!D6Pt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87547456-47b0-4469-b0a4-ad210fca6d50_1258x1026.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!D6Pt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87547456-47b0-4469-b0a4-ad210fca6d50_1258x1026.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!D6Pt!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87547456-47b0-4469-b0a4-ad210fca6d50_1258x1026.jpeg" width="1200" height="978.6963434022258" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/87547456-47b0-4469-b0a4-ad210fca6d50_1258x1026.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1026,&quot;width&quot;:1258,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;aibrix-architecture-v1&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="aibrix-architecture-v1" title="aibrix-architecture-v1" srcset="https://substackcdn.com/image/fetch/$s_!D6Pt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87547456-47b0-4469-b0a4-ad210fca6d50_1258x1026.jpeg 424w, https://substackcdn.com/image/fetch/$s_!D6Pt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87547456-47b0-4469-b0a4-ad210fca6d50_1258x1026.jpeg 848w, https://substackcdn.com/image/fetch/$s_!D6Pt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87547456-47b0-4469-b0a4-ad210fca6d50_1258x1026.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!D6Pt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F87547456-47b0-4469-b0a4-ad210fca6d50_1258x1026.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 16. Airbrix architecture. Taken from the GitHub Page.</figcaption></figure></div><div><hr></div><h4>3/ vLLM + LLM-D (Kubernetes)</h4><p><strong><a href="https://github.com/llm-d/llm-d">llm-d</a></strong> follows the same principles of AirBrix and Dynamo. It uses vLLM as model server and engine, Inference Gateway as request scheduler and balancer, and Kubernetes as infrastructure orchestrator and workload control plane.</p><p>To share KV-Cache across Pods and Nodes, it can also use NVIDIA NIXL or DCN libraries, and for pod-persistent independent KV-Cache, it can use LMCache or Host Memory.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EO3o!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7a3463-1df9-463e-837c-57f3573aadd7_859x474.svg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EO3o!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7a3463-1df9-463e-837c-57f3573aadd7_859x474.svg 424w, https://substackcdn.com/image/fetch/$s_!EO3o!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7a3463-1df9-463e-837c-57f3573aadd7_859x474.svg 848w, https://substackcdn.com/image/fetch/$s_!EO3o!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7a3463-1df9-463e-837c-57f3573aadd7_859x474.svg 1272w, https://substackcdn.com/image/fetch/$s_!EO3o!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7a3463-1df9-463e-837c-57f3573aadd7_859x474.svg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!EO3o!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7a3463-1df9-463e-837c-57f3573aadd7_859x474.svg" width="1200" height="664.2066420664206" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fb7a3463-1df9-463e-837c-57f3573aadd7_859x474.svg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:150,&quot;width&quot;:271,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;llm-d Arch&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-large" alt="llm-d Arch" title="llm-d Arch" srcset="https://substackcdn.com/image/fetch/$s_!EO3o!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7a3463-1df9-463e-837c-57f3573aadd7_859x474.svg 424w, https://substackcdn.com/image/fetch/$s_!EO3o!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7a3463-1df9-463e-837c-57f3573aadd7_859x474.svg 848w, https://substackcdn.com/image/fetch/$s_!EO3o!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7a3463-1df9-463e-837c-57f3573aadd7_859x474.svg 1272w, https://substackcdn.com/image/fetch/$s_!EO3o!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb7a3463-1df9-463e-837c-57f3573aadd7_859x474.svg 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Figure 17. The LLM-d architecture showcases how it distributes LLM Inference workloads on top of a Kubernetes Cluster. It uses vLLM as the Engine and Serving mechanism, and routes requests via the Inference Gateway to the appropriate Pods in the Inference Pool. Taken from the GitHub Page.</figcaption></figure></div><h2><br>Other Interesting Frameworks</h2><h4>Mojo and Mojo MAX Engine</h4><p>Developed by Modular, Mojo aims to combine the flexibility and usability of Python with the raw performance of languages such as C++ or Rust.</p><p>Mojo is designed to become a superset of Python, focusing on familiar syntax while adding systems-level features for performance and control. </p><p>An AI Engineer wants the performance without having to write custom kernels for every accelerator, such as CUDA for NVIDIA GPUs or ROCm for AMD. Mojo&#8217;s ambition is to make this possible.</p><p>To understand how, let&#8217;s go through a few details at the compiler level. </p><p>Python is an interpreted language. The source code you write is compiled into bytecode, which the CPython interpreter executes through its virtual machine.</p><p>Mojo, like C++ or Rust, is a compiled language, but it works differently. In C++, for instance, if you build a library for x86 CPUs, you need to rebuild it again for ARM64 (e.g, Apple M-series chips).</p><p>Mojo avoids this limitation by building on LLVM. Instead of targeting one architecture directly, it translates source code into <strong><a href="https://mlir.llvm.org/">MLIR</a></strong> (Multi-Level Intermediate Representation). MLIR contains a set of different dialects with primitives for multiple hardware targets (NVIDIA, AMD, TPU, CPU, etc.).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8Xl9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd79f54a-e9a3-4e5a-9a80-7593a27e9a47_893x718.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8Xl9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd79f54a-e9a3-4e5a-9a80-7593a27e9a47_893x718.png 424w, https://substackcdn.com/image/fetch/$s_!8Xl9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd79f54a-e9a3-4e5a-9a80-7593a27e9a47_893x718.png 848w, https://substackcdn.com/image/fetch/$s_!8Xl9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd79f54a-e9a3-4e5a-9a80-7593a27e9a47_893x718.png 1272w, https://substackcdn.com/image/fetch/$s_!8Xl9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd79f54a-e9a3-4e5a-9a80-7593a27e9a47_893x718.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8Xl9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd79f54a-e9a3-4e5a-9a80-7593a27e9a47_893x718.png" width="893" height="718" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fd79f54a-e9a3-4e5a-9a80-7593a27e9a47_893x718.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:718,&quot;width&quot;:893,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!8Xl9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd79f54a-e9a3-4e5a-9a80-7593a27e9a47_893x718.png 424w, https://substackcdn.com/image/fetch/$s_!8Xl9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd79f54a-e9a3-4e5a-9a80-7593a27e9a47_893x718.png 848w, https://substackcdn.com/image/fetch/$s_!8Xl9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd79f54a-e9a3-4e5a-9a80-7593a27e9a47_893x718.png 1272w, https://substackcdn.com/image/fetch/$s_!8Xl9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd79f54a-e9a3-4e5a-9a80-7593a27e9a47_893x718.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 17. The Model to Hardware workflow using Mojo. Taken from the Modular Blog.</figcaption></figure></div><p><strong>MAX Engine </strong>is Modular&#8217;s next-generation compiler and runtime library for running AI inference and serving AI Models.</p><p>Similar to other serving frameworks, MAX Engine can take a trained model either in PyTorch (TorchScript), ONNX, or native Mojo formats, and serve it on a wide range of hardware, based on the principles discussed above.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Lr_h!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30604fd3-ee89-4561-95ab-1fe218a72338_634x567.svg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Lr_h!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30604fd3-ee89-4561-95ab-1fe218a72338_634x567.svg 424w, https://substackcdn.com/image/fetch/$s_!Lr_h!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30604fd3-ee89-4561-95ab-1fe218a72338_634x567.svg 848w, https://substackcdn.com/image/fetch/$s_!Lr_h!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30604fd3-ee89-4561-95ab-1fe218a72338_634x567.svg 1272w, https://substackcdn.com/image/fetch/$s_!Lr_h!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30604fd3-ee89-4561-95ab-1fe218a72338_634x567.svg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Lr_h!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30604fd3-ee89-4561-95ab-1fe218a72338_634x567.svg" width="634" height="567" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/30604fd3-ee89-4561-95ab-1fe218a72338_634x567.svg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:567,&quot;width&quot;:634,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;MAX: AI Compute Platform&quot;,&quot;title&quot;:&quot;MAX: AI Compute Platform&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="MAX: AI Compute Platform" title="MAX: AI Compute Platform" srcset="https://substackcdn.com/image/fetch/$s_!Lr_h!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30604fd3-ee89-4561-95ab-1fe218a72338_634x567.svg 424w, https://substackcdn.com/image/fetch/$s_!Lr_h!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30604fd3-ee89-4561-95ab-1fe218a72338_634x567.svg 848w, https://substackcdn.com/image/fetch/$s_!Lr_h!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30604fd3-ee89-4561-95ab-1fe218a72338_634x567.svg 1272w, https://substackcdn.com/image/fetch/$s_!Lr_h!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30604fd3-ee89-4561-95ab-1fe218a72338_634x567.svg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 18. Architecture of the Mojo MAX Engine. Taken from the MojoMAX landing page.</figcaption></figure></div><h4>2/ LMDeploy</h4><p><strong><a href="https://github.com/InternLM/lmdeploy">LMDeploy</a> </strong>is a<strong> </strong>toolkit for compressing, deploying, and serving LLM. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JK-l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdc9d38-be9e-45ae-9cbc-11a36d1c401f_4786x1453.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JK-l!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdc9d38-be9e-45ae-9cbc-11a36d1c401f_4786x1453.png 424w, https://substackcdn.com/image/fetch/$s_!JK-l!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdc9d38-be9e-45ae-9cbc-11a36d1c401f_4786x1453.png 848w, https://substackcdn.com/image/fetch/$s_!JK-l!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdc9d38-be9e-45ae-9cbc-11a36d1c401f_4786x1453.png 1272w, https://substackcdn.com/image/fetch/$s_!JK-l!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdc9d38-be9e-45ae-9cbc-11a36d1c401f_4786x1453.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JK-l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdc9d38-be9e-45ae-9cbc-11a36d1c401f_4786x1453.png" width="1456" height="442" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0cdc9d38-be9e-45ae-9cbc-11a36d1c401f_4786x1453.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:442,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;v0 1 0-benchmark&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="v0 1 0-benchmark" title="v0 1 0-benchmark" srcset="https://substackcdn.com/image/fetch/$s_!JK-l!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdc9d38-be9e-45ae-9cbc-11a36d1c401f_4786x1453.png 424w, https://substackcdn.com/image/fetch/$s_!JK-l!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdc9d38-be9e-45ae-9cbc-11a36d1c401f_4786x1453.png 848w, https://substackcdn.com/image/fetch/$s_!JK-l!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdc9d38-be9e-45ae-9cbc-11a36d1c401f_4786x1453.png 1272w, https://substackcdn.com/image/fetch/$s_!JK-l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0cdc9d38-be9e-45ae-9cbc-11a36d1c401f_4786x1453.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 17. LM Deploy engine compared to vLLM, achieving higher request throughput and more efficient output tokens saturation when increasing the batch size. Taken from the GitHub Page.</figcaption></figure></div><div><hr></div><h2>Conclusion</h2><p>In this article, we started by explaining the phases of Model Development and Deployment, a workflow that every AI model likely follows. We covered pre-training, post-training, and what to consider before deploying an AI model as part of a larger System.</p><p>On that topic, we covered a wide range of AI inference engines and serving frameworks, each designed for different deployment scenarios.</p><p>Each has its strengths, and in only a few cases will one be better than another. The core optimizations are the same overall, with minor changes in between.</p><p>As a rule of thumb:<br>&#8594; Use <em><strong>OpenVINO</strong></em> when your deployment targets are Intel CPUs and GPUs. <br>&#8594; For Apple devices, focus on <em><strong>CoreML</strong></em> and <em><strong>llama.cpp.</strong></em><br>&#8594; To test things out and run LLMs locally, go with <strong>Ollama</strong>.<br>&#8594; To debug models and store them in a standardized, multi-compatible format, you might want to choose <em><strong>ONNX</strong></em>.<br>&#8594; Experimental yet promising is the <strong>Mojo MAX Engine</strong>, which is cross-compatible with any type of hardware.<br>&#8594; For a large majority of LLM deployments, <em><strong>vLLM</strong></em> is enough.<br>&#8594; If you want more control, with more complexity, choose <em><strong>llama.cpp</strong></em><br>&#8594; For real large-scale deployments, stick to <strong>TensorRT</strong> and <strong>TensorRT-LLM</strong> Inference Engines and choose NVIDIA <strong>Triton</strong>, NVIDIA <strong>Dynamo</strong>, vLLM + llm-D or AirBrix for large-scale distributed inference.</p><p>The key takeaway: there is no one-size-fits-all runtime. </p><p>The right choice depends on your <strong>hardware</strong>, your <strong>latency</strong> vs. <strong>throughput</strong> needs, and whether your model is running in the cloud or on the edge. </p><p>-</p><blockquote><p>Thank you for reading, hope you learned a lot!<br>See you next week!</p></blockquote><div><hr></div><h3>References</h3><p><em>What Is Transfer Learning? A Guide for Deep Learning | Built In</em>. (2022). Built In. <a href="https://builtin.com/data-science/transfer-learning">https://builtin.com/data-science/transfer-learning</a></p><p>Lambert, N. (2025, January 8). <em>The state of post-training in 2025</em>. Interconnects.ai; Interconnects. <a href="https://www.interconnects.ai/p/the-state-of-post-training-2025">https://www.interconnects.ai/p/the-state-of-post-training-2025</a></p><p>&#8204;<em>ONNX Runtime | Home</em>. (2025). Onnxruntime.ai. <a href="https://onnxruntime.ai/">https://onnxruntime.ai/</a></p><p>&#8204;Shah, A. (2024, February 21). <em>NVIDIA TensorRT-LLM Revs Up Inference for Google Gemma</em>. NVIDIA Technical Blog. <a href="https://developer.nvidia.com/blog/nvidia-tensorrt-llm-revs-up-inference-for-google-gemma/">https://developer.nvidia.com/blog/nvidia-tensorrt-llm-revs-up-inference-for-google-gemma/</a></p><p>&#8204;Razvant, A. (2024, August 6). <em>3 Inference Engines for optimal model throughput</em>. Substack.com; Neural Bits. <a href="https://multimodalai.substack.com/p/3-inference-engines-for-optimal-throughput">https://multimodalai.substack.com/p/3-inference-engines-for-optimal-throughput</a></p><p>&#8204;Razvant, A. (2025, March 27). <em>How does vLLM serve LLMs efficiently at scale?</em> Substack.com; Neural Bits. <a href="https://multimodalai.substack.com/p/unpacking-vllm-distributed-inference">https://multimodalai.substack.com/p/unpacking-vllm-distributed-inference</a></p><p>&#8204;<em>Core ML | Apple Developer Documentation</em>. (2025). Apple Developer Documentation. <a href="https://developer.apple.com/documentation/coreml">https://developer.apple.com/documentation/coreml</a></p><p>&#8204;<em>openvinotoolkit/openvino: OpenVINO<sup>TM</sup> is an open source toolkit for optimizing and deploying AI inference</em>. (2025, June 18). GitHub. <a href="https://github.com/openvinotoolkit/openvino">https://github.com/openvinotoolkit/openvino</a></p><p>&#8204;<em>GGUF</em>. (2025). Huggingface.co.<a href="https://huggingface.co/docs/hub/en/gguf"> https://huggingface.co/docs/hub/en/gguf</a></p><p>&#8204;<em>ggml-org/llama.cpp: LLM inference in C/C++</em>. (2025). GitHub. <a href="https://github.com/ggml-org/llama.cpp">https://github.com/ggml-org/llama.cpp</a></p><p>&#8204;<em>Text Generation Inference</em>. (2025). Huggingface.co. <a href="https://huggingface.co/docs/text-generation-inference/en/index">https://huggingface.co/docs/text-generation-inference/en/index</a></p><p>&#8204;<em>Ollama</em>. (2025). Ollama. <a href="https://ollama.com">https://ollama.com/</a></p><p>&#8204;<em>Reminder: You don&#8217;t need ollama, running llamacpp is as easy as ollama. Ollama i... | Hacker News</em>. (2024). Ycombinator.com. <a href="https://news.ycombinator.com/item?id=40693391#:~:text=Ollama%20is%20just%20a%20wrapper%20over%20llamacpp.&amp;text=Llamacpp%20is%20great%20but%20saying,Ollama%20just%20isn't%20true.&amp;text=It%20actually%20is%20true.,OpenAI%20compatible%20server%20using%20llama.">https://news.ycombinator.com/item</a></p><p><em>ai-dynamo/dynamo: A Datacenter Scale Distributed Inference Serving Framework</em>. (2025, August 12). GitHub. <a href="https://github.com/ai-dynamo/dynamo">https://github.com/ai-dynamo/dynamo</a></p><p>Team, Aib. (2025, February 21). <em>Introducing AIBrix: A Scalable, Cost-Effective Control Plane for vLLM</em>. VLLM Blog; AIBrix Team. <a href="https://blog.vllm.ai/2025/02/21/aibrix-release.html">https://blog.vllm.ai/2025/02/21/aibrix-release.html</a></p><p>&#8204;<em>LMCache/LMCache: Supercharge Your LLM with the Fastest KV Cache Layer</em>. (2025, August 3). GitHub. <a href="https://github.com/LMCache/LMCache">https://github.com/LMCache/LMCache</a></p><p><em>Modular: MAX 24.3 - Introducing MAX Engine Extensibility</em>. (2024). Modular.com. <a href="https://www.modular.com/blog/max-24-3-introducing-max-engine-extensibility">https://www.modular.com/blog/max-24-3-introducing-max-engine-extensibility</a></p><div><hr></div><h3><strong>Images and Videos</strong></h3><p>All images are created by the author, if not otherwise stated.</p>]]></content:encoded></item></channel></rss>