<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Guides on yzma</title>
    <link>https://yzma.ai/docs/guides/</link>
    <description>Recent content in Guides on yzma</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <atom:link href="https://yzma.ai/docs/guides/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Models</title>
      <link>https://yzma.ai/docs/guides/models/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://yzma.ai/docs/guides/models/</guid>
      <description>&lt;p&gt;yzma uses models in the GGUF format that &lt;code&gt;llama.cpp&lt;/code&gt; supports. There are more than 201,000 of them on Hugging Face:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://huggingface.co/models?library=gguf&amp;amp;sort=trending&#34;&gt;https://huggingface.co/models?library=gguf&amp;amp;sort=trending&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Set the &lt;code&gt;YZMA_LIB&lt;/code&gt; environment variable before you run any of these commands.&lt;/p&gt;&#xA;&lt;h2 id=&#34;vision-language-models-vlm&#34;&gt;Vision Language Models (VLM)&lt;/h2&gt;&#xA;&lt;p&gt;A Vision Language Model takes an image and text, and it gives text back. Each one needs a model file and a projector file.&lt;/p&gt;&#xA;&lt;h3 id=&#34;qwen3-vl-2b-instruct&#34;&gt;Qwen3-VL-2B-Instruct&lt;/h3&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://huggingface.co/bartowski/Qwen_Qwen3-VL-2B-Instruct-GGUF&#34;&gt;https://huggingface.co/bartowski/Qwen_Qwen3-VL-2B-Instruct-GGUF&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Good quality and a good size for most work. This is the model to start with.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Chat templates</title>
      <link>https://yzma.ai/docs/guides/chat-templates/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://yzma.ai/docs/guides/chat-templates/</guid>
      <description>&lt;p&gt;An instruction model expects a marker before each message. The markers say which part is the system prompt, which part the user said, and where the model must write. That shape is the chat template.&lt;/p&gt;&#xA;&lt;p&gt;Each model family has its own template. If you send the wrong shape, the model gives a poor answer or no answer.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-template-in-the-model-file&#34;&gt;The template in the model file&lt;/h2&gt;&#xA;&lt;p&gt;Most GGUF files hold their own template.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sampling</title>
      <link>https://yzma.ai/docs/guides/sampling/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://yzma.ai/docs/guides/sampling/</guid>
      <description>&lt;p&gt;A model does not give one token. It gives a score for every token in the vocabulary. The sampler chain turns those scores into one token.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-chain&#34;&gt;The chain&lt;/h2&gt;&#xA;&lt;p&gt;Each sampler in the chain changes the scores, or it takes a token. The samplers run in the order that you add them.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;sampler&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;llama&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;SamplerChainInit&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;llama&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;SamplerChainDefaultParams&lt;/span&gt;())&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;llama&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;SamplerChainAdd&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;sampler&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;llama&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;SamplerInitTopK&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;40&lt;/span&gt;))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;llama&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;SamplerChainAdd&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;sampler&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;llama&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;SamplerInitTopP&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;0.95&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;llama&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;SamplerChainAdd&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;sampler&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;llama&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;SamplerInitMinP&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;0.05&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;llama&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;SamplerChainAdd&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;sampler&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;llama&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;SamplerInitTemp&lt;/span&gt;(&lt;span style=&#34;color:#ae81ff&#34;&gt;0.8&lt;/span&gt;))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;llama&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;SamplerChainAdd&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;sampler&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;llama&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;SamplerInitDist&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;llama&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;DefaultSeed&lt;/span&gt;))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;defer&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;llama&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;SamplerFree&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;sampler&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Put the sampler that takes the token last. That is &lt;code&gt;SamplerInitDist&lt;/code&gt; or &lt;code&gt;SamplerInitGreedy&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Multimodal input</title>
      <link>https://yzma.ai/docs/guides/multimodal/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://yzma.ai/docs/guides/multimodal/</guid>
      <description>&lt;p&gt;&lt;code&gt;pkg/mtmd&lt;/code&gt; sends more than text to a model. It handles images, audio, and video.&lt;/p&gt;&#xA;&lt;h2 id=&#34;load-the-projector&#34;&gt;Load the projector&lt;/h2&gt;&#xA;&lt;p&gt;A multimodal model needs a projector file. The projector turns the image, the sound, or the video into tokens.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;mtmd&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Load&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;libPath&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;mctxParams&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;mtmd&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;ContextParamsDefault&lt;/span&gt;()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;mtmdCtx&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;err&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;mtmd&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;InitFromFile&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;projFile&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;model&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;mctxParams&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;defer&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;mtmd&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Free&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;mtmdCtx&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;check-what-the-model-accepts&#34;&gt;Check what the model accepts&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;mtmd&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;SupportVision&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;mtmdCtx&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;mtmd&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;SupportAudio&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;mtmdCtx&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;mtmd&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;SupportVideo&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;mtmdCtx&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Each one gives a boolean. Check before you send the input.&lt;/p&gt;&#xA;&lt;h2 id=&#34;images&#34;&gt;Images&lt;/h2&gt;&#xA;&lt;p&gt;Read an image from a file:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;bitmap&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;mtmd&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;BitmapInitFromFile&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;mtmdCtx&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;imageFile&lt;/span&gt;, &lt;span style=&#34;color:#66d9ef&#34;&gt;false&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;mtmd&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;InitOptDefault&lt;/span&gt;())&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;defer&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;mtmd&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;BitmapFree&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;bitmap&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Bitmap&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Read an image from memory:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Tool calling</title>
      <link>https://yzma.ai/docs/guides/tool-calling/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://yzma.ai/docs/guides/tool-calling/</guid>
      <description>&lt;p&gt;Tool calling lets a model ask your program to run a function. The model writes a request, your code runs the function, and you send the result back.&lt;/p&gt;&#xA;&lt;p&gt;See &lt;a href=&#34;https://yzma.ai/docs/tutorials/tool-calling/&#34;&gt;the tutorial&lt;/a&gt; for a complete program. This page holds the details.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-parts&#34;&gt;The parts&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;pkg/message&lt;/code&gt; holds these types.&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th style=&#34;text-align: left&#34;&gt;Type&lt;/th&gt;&#xA;          &lt;th style=&#34;text-align: left&#34;&gt;What it is&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;ToolDefinition&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;The description of a tool that you give the model.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;ToolFunctionDefinition&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;The name, the description, and the parameters of a function.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;ToolCall&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;A request from the model to run one function.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;ToolFunction&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;The name and the arguments of that request.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;Tool&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;A message that holds tool calls, and the text that came with them.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;ToolResponse&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;The result that you send back to the model.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;Chat&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;A normal message with a role and content.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h2 id=&#34;read-the-tool-calls&#34;&gt;Read the tool calls&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;toolCalls&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;message&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;ParseToolCalls&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;response&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;ParseToolCalls&lt;/code&gt; finds the format without help. It reads every format that the table below lists.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install from your program</title>
      <link>https://yzma.ai/docs/guides/programmatic-install/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://yzma.ai/docs/guides/programmatic-install/</guid>
      <description>&lt;p&gt;Your application can install the &lt;code&gt;llama.cpp&lt;/code&gt; libraries itself. Then the person who uses it does not have to run the &lt;code&gt;yzma&lt;/code&gt; command.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;pkg/download&lt;/code&gt; does this work.&lt;/p&gt;&#xA;&lt;h2 id=&#34;install&#34;&gt;Install&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; (&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;context&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;runtime&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;github.com/hybridgroup/yzma/pkg/download&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;target&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;download&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Target&lt;/span&gt;{&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#a6e22e&#34;&gt;Arch&lt;/span&gt;:      &lt;span style=&#34;color:#a6e22e&#34;&gt;download&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;MustParseArch&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;runtime&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;GOARCH&lt;/span&gt;),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#a6e22e&#34;&gt;OS&lt;/span&gt;:        &lt;span style=&#34;color:#a6e22e&#34;&gt;download&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;MustParseOS&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;runtime&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;GOOS&lt;/span&gt;),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#a6e22e&#34;&gt;Processor&lt;/span&gt;: &lt;span style=&#34;color:#a6e22e&#34;&gt;download&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;CUDA&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#a6e22e&#34;&gt;Version&lt;/span&gt;:   &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;latest&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;err&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;download&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Install&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;context&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Background&lt;/span&gt;(), &lt;span style=&#34;color:#a6e22e&#34;&gt;target&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;libPath&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;download&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;ProgressTracker&lt;/span&gt;, &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The last argument is the resolver. A nil value uses the built in table. See &lt;a href=&#34;https://yzma.ai/docs/guides/resolvers/&#34;&gt;Custom resolvers&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/hybridgroup/yzma/tree/main/examples/installer&#34;&gt;See the example code&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-target&#34;&gt;The target&lt;/h2&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th style=&#34;text-align: left&#34;&gt;Field&lt;/th&gt;&#xA;          &lt;th style=&#34;text-align: left&#34;&gt;What it holds&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;Arch&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;download.AMD64&lt;/code&gt; or &lt;code&gt;download.ARM64&lt;/code&gt;.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;OS&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;download.Linux&lt;/code&gt;, &lt;code&gt;download.Darwin&lt;/code&gt;, &lt;code&gt;download.Windows&lt;/code&gt;, &lt;code&gt;download.Bookworm&lt;/code&gt;, &lt;code&gt;download.Trixie&lt;/code&gt;, or &lt;code&gt;download.Wasm&lt;/code&gt;.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;Processor&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;download.CPU&lt;/code&gt;, &lt;code&gt;download.CUDA&lt;/code&gt;, &lt;code&gt;download.Metal&lt;/code&gt;, &lt;code&gt;download.Vulkan&lt;/code&gt;, &lt;code&gt;download.ROCm&lt;/code&gt;, or &lt;code&gt;download.WebGPU&lt;/code&gt;.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;Version&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;The release tag of &lt;code&gt;llama.cpp&lt;/code&gt;, or &lt;code&gt;&amp;quot;latest&amp;quot;&lt;/code&gt;, or an empty string.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h2 id=&#34;find-the-processor&#34;&gt;Find the processor&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;yzma&lt;/code&gt; can find CUDA and ROCm on the machine.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Custom resolvers</title>
      <link>https://yzma.ai/docs/guides/resolvers/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://yzma.ai/docs/guides/resolvers/</guid>
      <description>&lt;p&gt;A &lt;code&gt;Resolver&lt;/code&gt; reports the files to install for a target. &lt;code&gt;Install&lt;/code&gt; downloads them in the order that the resolver gives.&lt;/p&gt;&#xA;&lt;p&gt;Write a resolver when you need a build that the built in table does not name. For example:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;An internal mirror or an artifact server.&lt;/li&gt;&#xA;&lt;li&gt;A &lt;code&gt;file://&lt;/code&gt; path on a machine with no network.&lt;/li&gt;&#xA;&lt;li&gt;Your own build of &lt;code&gt;llama.cpp&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;A CUDA major version that is not the default.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;write-one&#34;&gt;Write one&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;resolver&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;download&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;ResolverFunc&lt;/span&gt;(&lt;span style=&#34;color:#66d9ef&#34;&gt;func&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;download&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Target&lt;/span&gt;) ([]&lt;span style=&#34;color:#66d9ef&#34;&gt;string&lt;/span&gt;, &lt;span style=&#34;color:#66d9ef&#34;&gt;error&lt;/span&gt;) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;OS&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;download&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Linux&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Arch&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;download&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;AMD64&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Processor&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;download&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;CUDA&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; []&lt;span style=&#34;color:#66d9ef&#34;&gt;string&lt;/span&gt;{&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;https://mirror.example.com/llama/&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Version&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;-cuda12-x64.tar.gz&amp;#34;&lt;/span&gt;}, &lt;span style=&#34;color:#66d9ef&#34;&gt;nil&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&lt;span style=&#34;color:#75715e&#34;&gt;// Anything that you do not care about falls through to the built in table.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&#x9;&lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;download&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;DefaultResolver&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Resolve&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;t&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;})&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;err&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;download&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Install&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;context&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Background&lt;/span&gt;(), &lt;span style=&#34;color:#a6e22e&#34;&gt;target&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;libPath&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;download&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;ProgressTracker&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;resolver&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://github.com/hybridgroup/yzma/tree/main/examples/resolver&#34;&gt;See the example code&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Verify an installation</title>
      <link>https://yzma.ai/docs/guides/verifying/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://yzma.ai/docs/guides/verifying/</guid>
      <description>&lt;p&gt;&lt;code&gt;yzma install&lt;/code&gt; downloads shared libraries and your program then runs them. Thus yzma checks each file.&lt;/p&gt;&#xA;&lt;p&gt;See &lt;a href=&#34;https://yzma.ai/docs/concepts/verification/&#34;&gt;Verification&lt;/a&gt; for how the checks work. This page shows the commands and the Go code.&lt;/p&gt;&#xA;&lt;h2 id=&#34;check-an-installation&#34;&gt;Check an installation&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;yzma verify --lib /path/to/lib&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th style=&#34;text-align: left&#34;&gt;Flag&lt;/th&gt;&#xA;          &lt;th style=&#34;text-align: left&#34;&gt;What it does&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;--lib&lt;/code&gt;, &lt;code&gt;-l&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;The directory with the libraries. Also reads &lt;code&gt;YZMA_LIB&lt;/code&gt;.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;--version&lt;/code&gt;, &lt;code&gt;-v&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;The &lt;code&gt;llama.cpp&lt;/code&gt; version that must be there.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;--strict&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;Also fails when the directory holds a file that this install did not put there.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;--json&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;Writes the report as JSON.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;The check reads the manifest that the install kept, so it needs no network.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Build for a browser</title>
      <link>https://yzma.ai/docs/guides/browser/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://yzma.ai/docs/guides/browser/</guid>
      <description>&lt;p&gt;This page holds the details for a program that runs in a browser. See &lt;a href=&#34;https://yzma.ai/docs/tutorials/browser/&#34;&gt;the tutorial&lt;/a&gt; to build and run one, and &lt;a href=&#34;https://yzma.ai/docs/concepts/webassembly/&#34;&gt;WebAssembly&lt;/a&gt; for how the parts fit together.&lt;/p&gt;&#xA;&lt;h2 id=&#34;select-the-build&#34;&gt;Select the build&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;yzma-loader.js&lt;/code&gt; selects the best build that the browser can run.&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th style=&#34;text-align: left&#34;&gt;Build&lt;/th&gt;&#xA;          &lt;th style=&#34;text-align: left&#34;&gt;What the browser must have&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;yzma_wasm_webgpu&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;WebGPU with f16 shaders, and JSPI. Chrome and Edge 137 or later.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;yzma_wasm_mt&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;SharedArrayBuffer&lt;/code&gt;, so a page with the COOP header and the COEP header.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;yzma_wasm&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: left&#34;&gt;Nothing. It works in every browser.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;A page can set the choice with &lt;code&gt;globalThis.yzmaMode&lt;/code&gt;. The values are &lt;code&gt;auto&lt;/code&gt;, which is the default, &lt;code&gt;webgpu&lt;/code&gt;, and &lt;code&gt;cpu&lt;/code&gt;. A page URL also accepts &lt;code&gt;?mode=cpu&lt;/code&gt; or &lt;code&gt;?mode=webgpu&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cross compiling</title>
      <link>https://yzma.ai/docs/guides/cross-compiling/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://yzma.ai/docs/guides/cross-compiling/</guid>
      <description>&lt;p&gt;yzma uses no CGo, so cross compilation is the normal Go workflow. Set &lt;code&gt;GOOS&lt;/code&gt; and &lt;code&gt;GOARCH&lt;/code&gt;, and build.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;GOOS&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;linux GOARCH&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;arm64 go build -o myapp-arm64 .&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You need no C compiler and no cross toolchain.&lt;/p&gt;&#xA;&lt;h2 id=&#34;why-this-works&#34;&gt;Why this works&lt;/h2&gt;&#xA;&lt;p&gt;A CGo program must compile C code for the target, so it needs a cross toolchain for each target. yzma calls &lt;code&gt;llama.cpp&lt;/code&gt; through purego and libffi. Nothing about &lt;code&gt;llama.cpp&lt;/code&gt; is part of your binary, so the Go compiler alone is sufficient.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
