<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Model Download on KnightLi Blog</title>
        <link>https://knightli.com/en/tags/model-download/</link>
        <description>Recent content in Model Download on KnightLi Blog</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <lastBuildDate>Fri, 17 Apr 2026 14:48:04 +0800</lastBuildDate><atom:link href="https://knightli.com/en/tags/model-download/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>Where Does llama-cli -hf Save Hugging Face Models by Default</title>
        <link>https://knightli.com/en/2026/04/17/llama-cli-hf-download-default-cache-path/</link>
        <pubDate>Fri, 17 Apr 2026 14:48:04 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/04/17/llama-cli-hf-download-default-cache-path/</guid>
        <description>&lt;p&gt;If you use &lt;code&gt;llama-cli&lt;/code&gt; to download and run a model directly from Hugging Face, for example:&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-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;llama-cli -hf unsloth/gemma-4-E4B-it-GGUF
&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;this uses the Hugging Face download support built into &lt;code&gt;llama.cpp&lt;/code&gt;. Recent &lt;code&gt;llama.cpp&lt;/code&gt; builds store models downloaded with &lt;code&gt;-hf&lt;/code&gt; in the standard Hugging Face Hub cache directory.&lt;/p&gt;
&lt;h2 id=&#34;default-cache-locations&#34;&gt;Default cache locations
&lt;/h2&gt;&lt;p&gt;The cache location used by &lt;code&gt;llama-cli -hf&lt;/code&gt; is first controlled by the &lt;code&gt;LLAMA_CACHE&lt;/code&gt; environment variable. If &lt;code&gt;LLAMA_CACHE&lt;/code&gt; is not set, &lt;code&gt;llama.cpp&lt;/code&gt; checks Hugging Face cache variables such as &lt;code&gt;HF_HUB_CACHE&lt;/code&gt;, &lt;code&gt;HUGGINGFACE_HUB_CACHE&lt;/code&gt;, and &lt;code&gt;HF_HOME&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If none of those variables are set, common default paths are:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;System&lt;/th&gt;
          &lt;th&gt;Default cache directory&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;Linux&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;~/.cache/huggingface/hub&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;macOS&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;~/.cache/huggingface/hub&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Windows&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;%USERPROFILE%\.cache\huggingface\hub&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;On Windows, &lt;code&gt;%USERPROFILE%&lt;/code&gt; usually expands to:&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;C:\Users\用户名
&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;So the default cache directory is roughly:&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;C:\Users\用户名\.cache\huggingface\hub
&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;h2 id=&#34;how-to-change-the-llama-cli-cache-directory&#34;&gt;How to change the llama-cli cache directory
&lt;/h2&gt;&lt;p&gt;Set &lt;code&gt;LLAMA_CACHE&lt;/code&gt; if you want to store the downloaded models on a specific disk or in a specific folder. You can also follow the Hugging Face convention and set &lt;code&gt;HF_HOME&lt;/code&gt;; in that case, the Hub cache directory will be &lt;code&gt;$HF_HOME/hub&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Temporary Windows CMD example:&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;span class=&#34;lnt&#34;&gt;2
&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-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;set LLAMA_CACHE=D:\models\llama-cache
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;llama-cli -hf unsloth/gemma-4-E4B-it-GGUF
&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;Temporary PowerShell example:&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;span class=&#34;lnt&#34;&gt;2
&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-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;$env:LLAMA_CACHE&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;D:\models\llama-cache&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;llama-cli&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;-hf&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;unsloth&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;gemma&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;-E4B-it-GGUF&lt;/span&gt;
&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;Temporary Linux / macOS example:&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;span class=&#34;lnt&#34;&gt;2
&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-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;LLAMA_CACHE&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;/data/models/llama-cache
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;llama-cli -hf unsloth/gemma-4-E4B-it-GGUF
&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;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;llama-cli -hf ...&lt;/code&gt; uses the download logic from &lt;code&gt;llama.cpp&lt;/code&gt;, but recent builds default to the Hugging Face Hub cache.&lt;/li&gt;
&lt;li&gt;Linux / macOS default: &lt;code&gt;~/.cache/huggingface/hub&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Windows default: &lt;code&gt;%USERPROFILE%\.cache\huggingface\hub&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;To change the location, set &lt;code&gt;LLAMA_CACHE&lt;/code&gt;, or set &lt;code&gt;HF_HOME&lt;/code&gt; / &lt;code&gt;HF_HUB_CACHE&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        <item>
        <title>How to Fix SSL Certificate Verification Failed When llama-cli Downloads from Hugging Face on Windows</title>
        <link>https://knightli.com/en/2026/04/17/llama-cli-hugging-face-ssl-certificate-failed-on-windows/</link>
        <pubDate>Fri, 17 Apr 2026 14:20:29 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/04/17/llama-cli-hugging-face-ssl-certificate-failed-on-windows/</guid>
        <description>&lt;p&gt;If you run this command on Windows:&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-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;llama-cli -hf unsloth/gemma-4-E4B-it-GGUF
&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;and see an error like this:&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;span class=&#34;lnt&#34;&gt;2
&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;get_repo_commit: error: HTTPLIB failed: SSL server verification failed
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;error: failed to download model from Hugging Face
&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 problem is usually not CUDA or &lt;code&gt;llama.cpp&lt;/code&gt; itself. More often, the program cannot correctly access the system certificate chain in the current environment, so HTTPS verification fails.&lt;/p&gt;
&lt;p&gt;From the log, &lt;code&gt;ggml-rpc.dll&lt;/code&gt; and &lt;code&gt;ggml-cpu-alderlake.dll&lt;/code&gt; were loaded successfully, which means the runtime environment is mostly fine. The issue is mainly in the model download step.&lt;/p&gt;
&lt;h2 id=&#34;the-easiest-workaround-download-the-model-manually&#34;&gt;The easiest workaround: download the model manually
&lt;/h2&gt;&lt;p&gt;If you just want to get it running quickly, downloading the model manually is usually the most stable option.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open the matching Hugging Face repository page.&lt;/li&gt;
&lt;li&gt;Download the required &lt;code&gt;.gguf&lt;/code&gt; file from &lt;code&gt;Files and versions&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;After the download finishes, run it with the local file path:&lt;/li&gt;
&lt;/ol&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-gdscript3&#34; data-lang=&#34;gdscript3&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;llama&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;cli&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;m&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;C&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;\&lt;span class=&#34;n&#34;&gt;Users&lt;/span&gt;\&lt;span class=&#34;n&#34;&gt;knightli&lt;/span&gt;\&lt;span class=&#34;n&#34;&gt;Downloads&lt;/span&gt;\&lt;span class=&#34;n&#34;&gt;gemma&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;e4b&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;it&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;gguf&lt;/span&gt;
&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;This bypasses SSL verification during the &lt;code&gt;-hf&lt;/code&gt; download step and is useful when you only want to verify that the model can run locally.&lt;/p&gt;
&lt;h2 id=&#34;if-you-still-want-to-use--hf-automatic-download&#34;&gt;If you still want to use &lt;code&gt;-hf&lt;/code&gt; automatic download
&lt;/h2&gt;&lt;p&gt;You can manually specify a certificate file path so the program can find a usable CA bundle in the current session.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;cacert.pem&lt;/code&gt; can be obtained from the CA Extract page maintained by the curl project:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Page: &lt;a class=&#34;link&#34; href=&#34;https://curl.se/docs/caextract.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://curl.se/docs/caextract.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Direct download: &lt;a class=&#34;link&#34; href=&#34;https://curl.se/ca/cacert.pem&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://curl.se/ca/cacert.pem&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you download it in a browser, open the direct download link and save it as &lt;code&gt;cacert.pem&lt;/code&gt;. You can also download it to a fixed directory with PowerShell:&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;span class=&#34;lnt&#34;&gt;2
&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-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;New-Item&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;-ItemType&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Directory&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;-Force&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;C:&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;certs&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;Invoke-WebRequest&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;-Uri&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;https&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;//&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;curl&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;se&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ca&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;cacert&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;py&#34;&gt;pem&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;-OutFile&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;C:&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;certs&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;cacert&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;py&#34;&gt;pem&lt;/span&gt;
&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;After the download finishes, set these variables in the command line:&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;span class=&#34;lnt&#34;&gt;2
&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-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;set SSL_CERT_FILE=C:\certs\cacert.pem
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;set CURL_CA_BUNDLE=C:\certs\cacert.pem
&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;Then run the original command again:&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-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;llama-cli -hf unsloth/gemma-4-E4B-it-GGUF
&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;If the issue really comes from the certificate chain, this usually fixes it directly.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>How to Get GGUF Models from Hugging Face with llama.cpp</title>
        <link>https://knightli.com/en/2026/04/12/llama-cpp-hugging-face-gguf-models/</link>
        <pubDate>Sun, 12 Apr 2026 09:31:38 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/04/12/llama-cpp-hugging-face-gguf-models/</guid>
        <description>&lt;p&gt;&lt;code&gt;llama.cpp&lt;/code&gt; can work directly with GGUF models hosted on Hugging Face, so you do not always need to download model files manually first.&lt;/p&gt;
&lt;p&gt;If a model repository already provides GGUF files, you can use the &lt;code&gt;-hf&lt;/code&gt; argument in the CLI, for example:&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-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;llama-cli -hf ggml-org/gemma-3-1b-it-GGUF
&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;By default, this downloads from Hugging Face.&lt;br&gt;
If you use another service that exposes a Hugging Face compatible API, you can switch the download endpoint with the &lt;code&gt;MODEL_ENDPOINT&lt;/code&gt; environment variable.&lt;/p&gt;
&lt;p&gt;One important detail is that &lt;code&gt;llama.cpp&lt;/code&gt; only works directly with the &lt;code&gt;GGUF&lt;/code&gt; format.&lt;br&gt;
If your model is in another format, you need to convert it first with the &lt;code&gt;convert_*.py&lt;/code&gt; scripts provided in the repository.&lt;/p&gt;
&lt;p&gt;Hugging Face also offers several online tools related to &lt;code&gt;llama.cpp&lt;/code&gt;, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;converting models to &lt;code&gt;GGUF&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;quantizing weights to reduce size&lt;/li&gt;
&lt;li&gt;converting LoRA adapters&lt;/li&gt;
&lt;li&gt;editing GGUF metadata in the browser&lt;/li&gt;
&lt;li&gt;hosting &lt;code&gt;llama.cpp&lt;/code&gt; inference endpoints&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you only want the practical takeaway, start with repositories that already provide &lt;code&gt;GGUF&lt;/code&gt;, then use &lt;code&gt;llama-cli -hf &amp;lt;user&amp;gt;/&amp;lt;model&amp;gt;&lt;/code&gt;. In most cases, that is the simplest path.&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
