<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Ollama on Dexome</title>
        <link>https://blog.dexome.com/tags/ollama/</link>
        <description>Recent content in Ollama on Dexome</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <lastBuildDate>Wed, 10 Jun 2026 00:00:00 +0530</lastBuildDate><atom:link href="https://blog.dexome.com/tags/ollama/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>Running Local LLMs on an Intel Arc A310</title>
        <link>https://blog.dexome.com/post/self-hosting-llms-consumer-gpus/</link>
        <pubDate>Wed, 10 Jun 2026 00:00:00 +0530</pubDate>
        
        <guid>https://blog.dexome.com/post/self-hosting-llms-consumer-gpus/</guid>
        <description>&lt;p&gt;I use an Intel Arc A310 with 4 GB VRAM for Frigate, Immich and media transcoding.
I wanted to use the same GPU for a private LibreChat setup, with Ollama as the
model server and Netdata exposed through MCP.&lt;/p&gt;
&lt;p&gt;Small models worked for normal chat. Netdata tool calling did not work reliably.
The first problem was Ollama&amp;rsquo;s default 4096-token context, which removed the MCP
tool definitions from the prompt. After increasing the context, the remaining
problem was the capability of models which could fit on this GPU.&lt;/p&gt;
&lt;h2 id=&#34;my-setup&#34;&gt;My setup
&lt;/h2&gt;&lt;p&gt;Ollama 0.12.11 and later include an experimental Vulkan backend that can use
Intel Arc. I passed only &lt;code&gt;/dev/dri/renderD128&lt;/code&gt;, joined the render and video
groups, and kept the API on private Podman networks. LibreChat reached Ollama by
container DNS; Ollama used a separate egress bridge to pull models.&lt;/p&gt;
&lt;figure class=&#34;article-diagram&#34;&gt;
    &lt;pre class=&#34;mermaid&#34;&gt;
flowchart TB
	USER[Browser] --&gt; CHAT[LibreChat]
	CHAT --&gt;|private bridge| O[Ollama and Vulkan]
	CHAT --&gt;|13 tool schemas| MCP[Netdata MCP]
	O --&gt; ARC[Intel Arc A310, 4 GB]
	VIDEO[Frigate, Immich, Plex, Jellyfin] --&gt; ARC
	O --&gt;|model pulls only| NET[Internet bridge]
&lt;/pre&gt;
    &lt;figcaption&gt;The model API stays private while one render node is shared with the host&amp;#39;s media and vision workloads.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;The Vulkan backend worked for small local models. The first issue appeared before
the model generated any response.&lt;/p&gt;
&lt;h2 id=&#34;mcp-tools-were-removed-by-context-truncation&#34;&gt;MCP tools were removed by context truncation
&lt;/h2&gt;&lt;p&gt;LibreChat sent the system message, Netdata instructions, 13 MCP tool schemas,
and the user turn. The resulting first prompt was about 11,511 tokens. Ollama&amp;rsquo;s
default context was 4,096.&lt;/p&gt;
&lt;p&gt;The log made the failure explicit:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;truncating input prompt limit=4096 prompt=11511 keep=4 new=4095
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The tool definitions were near the discarded end. A model that never receives
the schemas cannot issue a tool call, regardless of its instruction following.
It answered in prose because prose was the only action left.&lt;/p&gt;
&lt;figure class=&#34;article-diagram&#34;&gt;
    &lt;pre class=&#34;mermaid&#34;&gt;
flowchart TB
	P[11.5k-token prompt] --&gt; CUT{4,096-token context}
	CUT --&gt; KEEP[Small retained slice]
	CUT -. discarded .-&gt; TOOLS[Netdata instructions and 13 tool schemas]
	KEEP --&gt; MODEL[Model sees no callable tools]
	MODEL --&gt; TEXT[Plain-text answer]
&lt;/pre&gt;
    &lt;figcaption&gt;At the default 4k context, truncation removed the MCP schemas before the model evaluated the request.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Raising &lt;code&gt;OLLAMA_CONTEXT_LENGTH&lt;/code&gt; made structured tool attempts appear. That
proved truncation was causal. It did not yet produce a usable system.&lt;/p&gt;
&lt;h2 id=&#34;larger-context-used-more-vram&#34;&gt;Larger context used more VRAM
&lt;/h2&gt;&lt;p&gt;At 16,384 tokens, the KV cache occupied about 1.8 GB. Only 18 of 29 model layers
fit on the GPU; the other 11 spilled to CPU. Processing the first 11.5k-token
prompt took 131 seconds, during which nothing streamed. LibreChat aborted before
the first token.&lt;/p&gt;
&lt;p&gt;Turning off the 6 KB server-instructions block helped less than expected. The
prompt still measured 10,189 tokens because the 13 tool schemas themselves were
the dominant cost, and LibreChat could not expose only a subset of MCP tools.
An 8,192-token context still truncated them.&lt;/p&gt;
&lt;p&gt;The practical setting was 12,288: enough for the tool prompt plus answer
headroom, with fewer layers displaced than at 16k. The first turn remained slow,
roughly 80 to 100 seconds for a 3B model. Follow-up turns were fast because
Ollama cached the prompt prefix; one 67-token follow-up returned in 0.8 seconds.&lt;/p&gt;
&lt;figure class=&#34;article-diagram&#34;&gt;
    &lt;pre class=&#34;mermaid&#34;&gt;
flowchart TB
	C4[4k context] --&gt;|small KV cache| FAST[More GPU residency]
	C4 --&gt;|but| TRUNC[Tool schemas truncated]
	TRUNC -. next test .-&gt; C12[12k context]
	C12 --&gt;|schemas fit| VISIBLE[Tools visible]
	C12 --&gt;|larger KV cache| SPLIT[Some layers spill to CPU]
	SPLIT -. next test .-&gt; C16[16k context]
	C16 --&gt;|about 1.8 GB KV| SLOW[18 of 29 layers on GPU, 131s prompt evaluation]
&lt;/pre&gt;
    &lt;figcaption&gt;A larger context fixed schema visibility but enlarged the KV cache and forced model layers onto the CPU.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;The model files fitted, but the model, KV cache and the other GPU workloads did
not always fit at the same time.&lt;/p&gt;
&lt;h2 id=&#34;models-i-tested&#34;&gt;Models I tested
&lt;/h2&gt;&lt;p&gt;With logs confirming no truncation, I tested the models against simple Netdata
questions.&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Model&lt;/th&gt;
          &lt;th style=&#34;text-align: right&#34;&gt;GPU placement&lt;/th&gt;
          &lt;th style=&#34;text-align: right&#34;&gt;First prompt&lt;/th&gt;
          &lt;th&gt;Result&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;Qwen2.5 1.5B&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;29/29 layers&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;about 55s&lt;/td&gt;
          &lt;td&gt;Printed a tool call as JSON text; LibreChat could not execute it&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Llama 3.2 3B&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;20-21/29 layers&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;105-131s&lt;/td&gt;
          &lt;td&gt;Emitted a real call with schema-invalid arguments&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Qwen2.5 7B&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;13/29 layers&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;about 218s&lt;/td&gt;
          &lt;td&gt;Too slow and returned an unusable result&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The 3B model even failed the no-argument &lt;code&gt;list_raised_alerts&lt;/code&gt; schema. This was
not limited to one complicated metrics query. It could choose a tool and emit a
tool-call shape, but not produce arguments the MCP client accepted reliably.&lt;/p&gt;
&lt;p&gt;LibreChat&amp;rsquo;s &amp;ldquo;Ran tool&amp;rdquo; pill was not proof of success. It appeared when dispatch
began; the execution log later showed &lt;code&gt;Received tool input did not match expected schema&lt;/code&gt;. Without checking that log, I would have mistaken an attempted
call followed by hallucinated prose for real monitoring data.&lt;/p&gt;
&lt;p&gt;Increasing the timeout only waited longer for the same result. It did not fix
the invalid tool arguments or make the 7B model fit better.&lt;/p&gt;
&lt;h2 id=&#34;testing-the-intel-sycl-backend&#34;&gt;Testing the Intel SYCL backend
&lt;/h2&gt;&lt;p&gt;Intel&amp;rsquo;s old IPEX-LLM path looked attractive because it promised optimized SYCL
inference. By the time I evaluated it, the repository was archived, its bundled
Ollama was old, the images used rolling tags, and the project was flagged with
known security issues. I rejected it.&lt;/p&gt;
&lt;p&gt;The maintained high-throughput option is upstream llama.cpp&amp;rsquo;s Intel SYCL image.
I staged it beside Ollama rather than replacing the working service. It needed
both &lt;code&gt;renderD128&lt;/code&gt; and this host&amp;rsquo;s actual card node, &lt;code&gt;card1&lt;/code&gt;; assuming &lt;code&gt;card0&lt;/code&gt;
prevented container creation.&lt;/p&gt;
&lt;p&gt;llama-server introduced its own constraints:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the default four parallel slots divided the usable context per request;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--parallel 1&lt;/code&gt; was necessary for the large single-user prompt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--jinja&lt;/code&gt; was required for structured tool calls;&lt;/li&gt;
&lt;li&gt;oversized prompts hard-failed unless context shifting was configured;&lt;/li&gt;
&lt;li&gt;one server process loaded one GGUF model, unlike Ollama&amp;rsquo;s model manager;&lt;/li&gt;
&lt;li&gt;the first SYCL request paid a JIT compilation cost.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I kept Ollama plus Vulkan as the default. SYCL can improve throughput, but it
does not make a 3B model format better arguments, nor does it make a 7B model fit
in 4 GB.&lt;/p&gt;
&lt;h2 id=&#34;what-works-well-on-the-a310&#34;&gt;What works well on the A310
&lt;/h2&gt;&lt;p&gt;The A310 is useful for private chat, summarization and small experiments. Llama
3.2 3B was the best local default from my tests. It fitted well enough and could
emit a real tool-call structure. Qwen2.5 1.5B was faster but printed the tool call
as text.&lt;/p&gt;
&lt;p&gt;It was not reliable for the 13 Netdata MCP tools. Their schemas required a large
context and the models which remained usable on 4 GB VRAM could not consistently
produce valid tool arguments.&lt;/p&gt;
&lt;p&gt;The debugging order I use now is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Confirm the accelerator backend actually loaded; do not infer GPU use from
container access to &lt;code&gt;/dev/dri&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Read the prompt token count and truncation log.&lt;/li&gt;
&lt;li&gt;Measure KV cache size and GPU layer placement at the chosen context.&lt;/li&gt;
&lt;li&gt;Separate prompt-evaluation latency from generation speed.&lt;/li&gt;
&lt;li&gt;Verify tool execution success in logs, not in UI decoration.&lt;/li&gt;
&lt;li&gt;Check whether the remaining problem is model capability rather than another
timeout or context setting.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I kept Ollama with Vulkan as the default because it supports model management and
normal local chat worked. llama.cpp with SYCL is available for comparison, but a
faster backend does not make the small model better at producing schema-valid
tool calls.&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
