<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>#llama.cpp · meghraj.dev</title>
<meta name="description" content="Daily field notes on AI, databases and infrastructure by Meghraj Choudhary.">
<meta name="author" content="Meghraj Choudhary">
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
<link rel="canonical" href="https://meghraj.dev/tags/llama.cpp">
<meta property="og:site_name" content="meghraj.dev">
<meta property="og:locale" content="en_US">
<meta property="og:type" content="website">
<meta property="og:title" content="#llama.cpp">
<meta property="og:description" content="Daily field notes on AI, databases and infrastructure.">
<meta property="og:url" content="https://meghraj.dev/tags/llama.cpp">
<meta property="og:image" content="https://meghraj.dev/og/site.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="meghraj.dev: daily notes on AI, databases and infrastructure">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="#llama.cpp">
<meta name="twitter:description" content="Daily field notes on AI, databases and infrastructure.">
<meta name="twitter:image" content="https://meghraj.dev/og/site.png">
<meta name="twitter:image:alt" content="meghraj.dev: daily notes on AI, databases and infrastructure">
<meta name="color-scheme" content="light dark">
<meta name="theme-color" content="#0b0d12" media="(prefers-color-scheme: dark)">
<meta name="theme-color" content="#fbfaf7" media="(prefers-color-scheme: light)">
<link rel="icon" href="/static/favicon.svg" type="image/svg+xml">
<link rel="icon" href="/static/icon-192.png" type="image/png" sizes="192x192">
<link rel="apple-touch-icon" href="/static/apple-touch-icon.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="preload" href="/static/fonts/inter.woff2" as="font" type="font/woff2" crossorigin>
<script src="/static/theme.js?v=ec03d52-dirty"></script>
<link rel="stylesheet" href="/static/site.css?v=ec03d52-dirty">

<meta name="push-url" content="https://push.meghraj.dev">
</head>
<body>
<a class="skip" href="#main">Skip to content</a>

<header class="site-header">
  <div class="wrap header-row">
    <a class="brand" href="/" aria-label="meghraj.dev home"><span class="brand-tile"><svg class="brand-m" viewBox="0 0 64 64" aria-hidden="true"><path d="M21 14L11 50" stroke="#7cf0c5" stroke-width="5.5" stroke-linecap="round"/><path d="M26 45V31a5.5 5.5 0 0 1 11 0v14M37 31a5.5 5.5 0 0 1 11 0v14" fill="none" stroke="#e8eaef" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/></svg><span class="brand-rest" aria-hidden="true">eghraj<span class="brand-tld">.dev</span></span><span class="brand-caret" aria-hidden="true"></span></span></a>
    <nav class="nav" aria-label="Main">
      <a href="/c/ai" class="cat-ai">AI</a><a href="/c/db" class="cat-db">Databases</a><a href="/c/infra" class="cat-infra">Infrastructure</a>
      <a href="/archive">Archive</a>
      <a href="/about">About</a>
          </nav>
    <div class="tools">
      <button type="button" class="kbd-btn" data-palette aria-label="Open command palette"><span class="kbd-prompt" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M12 2l1.9 5.6L19.5 9.5l-5.6 1.9L12 17l-1.9-5.6L4.5 9.5l5.6-1.9z"/><path d="M19 15l.9 2.6 2.6.9-2.6.9L19 22l-.9-2.6-2.6-.9 2.6-.9z"/></svg></span> <span class="kbd-label">Search or jump</span> <kbd>/</kbd></button>
      <button type="button" class="theme-btn" data-theme-toggle aria-label="Theme: system" title="Theme: system">
        <svg class="i-system" viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="4" width="18" height="13" rx="2"/><path d="M8 21h8M12 17v4"/></svg>
        <svg class="i-light" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></svg>
        <svg class="i-dark" viewBox="0 0 24 24" aria-hidden="true"><path d="M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z"/></svg>
      </button>
    </div>
  </div>
</header>
<main id="main">

<section class="wrap narrow page-head">
  <p class="kicker">Tag</p>
  <h1>#llama.cpp</h1>
  
</section>

<section class="wrap narrow">
  
  
<article class="row">
  <div class="row-meta">
    <time datetime="2026-12-01">Dec 1, 2026</time>
    <a class="pill cat-ai" href="/c/ai">AI</a>
  </div>
  <div class="row-body">
    <h3><a href="/posts/nvfp4-vs-mxfp4-vs-gguf-q4-k-m-explained">NVFP4 vs MXFP4 vs GGUF Q4_K_M: same 4 bits, three ways to share a scale</a></h3>
    <p>An FP4 (E2M1) weight can only be one of 15 numbers. NVFP4, MXFP4 and llama.cpp&#39;s Q4_K_M all survive that by giving each small block of weights its own scale, its own ruler. Blocks of 16 with an FP8 scale (4.5 bits), blocks of 32 with a power-of-two scale (4.25 bits), or super-blocks of 256 with 6-bit scales and mins (about 4.9 bits). A worked rounding example, independent quality numbers, which hardware runs FP4 natively, and which file to download.</p>
    <div class="row-foot">
      <span>12 min read</span>
      <span class="has-video" title="Has a video">▶ video</span>
      <a class="tag" href="/tags/nvfp4">#nvfp4</a><a class="tag" href="/tags/mxfp4">#mxfp4</a><a class="tag" href="/tags/fp4">#fp4</a><a class="tag" href="/tags/q4_k_m">#q4_k_m</a><a class="tag" href="/tags/gguf">#gguf</a><a class="tag" href="/tags/quantization">#quantization</a><a class="tag" href="/tags/llama.cpp">#llama.cpp</a><a class="tag" href="/tags/blackwell">#blackwell</a><a class="tag" href="/tags/gpt-oss">#gpt-oss</a><a class="tag" href="/tags/llm">#llm</a>
    </div>
  </div>
</article>

<article class="row">
  <div class="row-meta">
    <time datetime="2026-11-30">Nov 30, 2026</time>
    <a class="pill cat-ai" href="/c/ai">AI</a>
  </div>
  <div class="row-body">
    <h3><a href="/posts/flash-attention-explained-hbm-sram-tiling-online-softmax">Flash attention explained: exact attention, 2–4× faster, by moving less memory</a></h3>
    <p>At 128K tokens, standard attention&#39;s score matrix is 32 GiB for one head in one layer. FlashAttention never writes it to GPU memory: it streams small tiles through on-chip SRAM, keeps a running max and sum for softmax, and recomputes instead of storing. Same exact result, memory linear in sequence length, 2–4× faster. The A100 numbers, FlashAttention-2, -3 and -4, the exponential bottleneck on new GPUs, and where you meet it in PyTorch, vLLM, Ollama and llama.cpp.</p>
    <div class="row-foot">
      <span>11 min read</span>
      <span class="has-video" title="Has a video">▶ video</span>
      <a class="tag" href="/tags/flash-attention">#flash-attention</a><a class="tag" href="/tags/flashattention">#flashattention</a><a class="tag" href="/tags/attention">#attention</a><a class="tag" href="/tags/gpu">#gpu</a><a class="tag" href="/tags/hbm">#hbm</a><a class="tag" href="/tags/sram">#sram</a><a class="tag" href="/tags/online-softmax">#online-softmax</a><a class="tag" href="/tags/llm">#llm</a><a class="tag" href="/tags/vllm">#vllm</a><a class="tag" href="/tags/llama.cpp">#llama.cpp</a><a class="tag" href="/tags/pytorch">#pytorch</a><a class="tag" href="/tags/paged-attention">#paged-attention</a>
    </div>
  </div>
</article>

<article class="row">
  <div class="row-meta">
    <time datetime="2026-11-29">Nov 29, 2026</time>
    <a class="pill cat-ai" href="/c/ai">AI</a>
  </div>
  <div class="row-body">
    <h3><a href="/posts/gguf-malware-hugging-face-is-gguf-safe">GGUF malware on Hugging Face: what hid after the last tensor, and how to check a model</a></h3>
    <p>A scan of 226,310 GGUF repositories on Hugging Face found five poisoned models from two accounts, downloaded 2,428 times. No loader exploit and no CVE: one trick hid instructions in the chat template, the other appended a Windows program after the last tensor, where no loader reads. A region-by-region tour of one GGUF file, and five checks before you run one.</p>
    <div class="row-foot">
      <span>12 min read</span>
      <span class="has-video" title="Has a video">▶ video</span>
      <a class="tag" href="/tags/gguf">#gguf</a><a class="tag" href="/tags/gguf-malware">#gguf-malware</a><a class="tag" href="/tags/hugging-face">#hugging-face</a><a class="tag" href="/tags/llm-security">#llm-security</a><a class="tag" href="/tags/chat-template">#chat-template</a><a class="tag" href="/tags/llama.cpp">#llama.cpp</a><a class="tag" href="/tags/ollama">#ollama</a><a class="tag" href="/tags/lm-studio">#lm-studio</a><a class="tag" href="/tags/safetensors">#safetensors</a><a class="tag" href="/tags/supply-chain">#supply-chain</a>
    </div>
  </div>
</article>

<article class="row">
  <div class="row-meta">
    <time datetime="2026-11-21">Nov 21, 2026</time>
    <a class="pill cat-ai" href="/c/ai">AI</a>
  </div>
  <div class="row-body">
    <h3><a href="/posts/mlx-vs-gguf-on-mac-six-myths-which-to-download">MLX vs GGUF on a Mac: six myths, and which file to download</a></h3>
    <p>MLX is Apple&#39;s machine-learning framework with its own safetensors-based models; GGUF is llama.cpp&#39;s single-file format, running on the Mac GPU through Metal. Published tests show MLX usually writes answers faster, but reading the prompt can flip the result, &#39;4-bit&#39; means 4.5 bits in one and about 4.9 in the other, and GGUF has about 7.6 times more models on Hugging Face.</p>
    <div class="row-foot">
      <span>11 min read</span>
      <span class="has-video" title="Has a video">▶ video</span>
      <a class="tag" href="/tags/mlx">#mlx</a><a class="tag" href="/tags/gguf">#gguf</a><a class="tag" href="/tags/llama.cpp">#llama.cpp</a><a class="tag" href="/tags/apple-silicon">#apple-silicon</a><a class="tag" href="/tags/local-llm">#local-llm</a><a class="tag" href="/tags/quantization">#quantization</a>
    </div>
  </div>
</article>

<article class="row">
  <div class="row-meta">
    <time datetime="2026-11-21">Nov 21, 2026</time>
    <a class="pill cat-ai" href="/c/ai">AI</a>
  </div>
  <div class="row-body">
    <h3><a href="/posts/ollama-vs-lm-studio-same-engine-which-is-faster">Ollama vs LM Studio: same engine, different car (and which is faster)</a></h3>
    <p>Ollama and LM Studio both run llama.cpp for GGUF files and Apple&#39;s MLX on Apple Silicon Macs, so which one is faster depends more on quantization, context length, GPU offload and engine than on the app. The five differences that do matter: interface, API and ports, model storage, defaults, and licence and platforms.</p>
    <div class="row-foot">
      <span>10 min read</span>
      <span class="has-video" title="Has a video">▶ video</span>
      <a class="tag" href="/tags/ollama">#ollama</a><a class="tag" href="/tags/lm-studio">#lm-studio</a><a class="tag" href="/tags/llama.cpp">#llama.cpp</a><a class="tag" href="/tags/mlx">#mlx</a><a class="tag" href="/tags/local-llm">#local-llm</a>
    </div>
  </div>
</article>

<article class="row">
  <div class="row-meta">
    <time datetime="2026-11-19">Nov 19, 2026</time>
    <a class="pill cat-ai" href="/c/ai">AI</a>
  </div>
  <div class="row-body">
    <h3><a href="/posts/vllm-vs-ollama-vs-llama-cpp-which-is-faster">vLLM vs Ollama vs llama.cpp: which is faster depends on how many people ask</a></h3>
    <p>In Red Hat&#39;s published test vLLM peaked at 793 tokens a second and Ollama at 41 on the same GPU, but that was with up to 256 users at once. Single-user speed and many-user throughput are different questions. What each engine is, what Ollama runs underneath in 2026, and a decision tree for picking one.</p>
    <div class="row-foot">
      <span>11 min read</span>
      <span class="has-video" title="Has a video">▶ video</span>
      <a class="tag" href="/tags/vllm">#vllm</a><a class="tag" href="/tags/ollama">#ollama</a><a class="tag" href="/tags/llama.cpp">#llama.cpp</a><a class="tag" href="/tags/local-llm">#local-llm</a><a class="tag" href="/tags/inference">#inference</a>
    </div>
  </div>
</article>

<article class="row">
  <div class="row-meta">
    <time datetime="2026-11-18">Nov 18, 2026</time>
    <a class="pill cat-ai" href="/c/ai">AI</a>
  </div>
  <div class="row-body">
    <h3><a href="/posts/gguf-explained-file-format-q4-k-m-quantization">GGUF explained: what&#39;s inside the file, and what Q4_K_M means</a></h3>
    <p>ggml just hit 1.0. The file format it reads, GGUF, is what llama.cpp, Ollama and LM Studio load: a 24-byte header, typed metadata with the whole tokenizer, a tensor table, and 32-byte-aligned weights. Plus what Q4_K_M means and what it costs.</p>
    <div class="row-foot">
      <span>11 min read</span>
      <span class="has-video" title="Has a video">▶ video</span>
      <a class="tag" href="/tags/gguf">#gguf</a><a class="tag" href="/tags/llama.cpp">#llama.cpp</a><a class="tag" href="/tags/ggml">#ggml</a><a class="tag" href="/tags/quantization">#quantization</a><a class="tag" href="/tags/local-llm">#local-llm</a>
    </div>
  </div>
</article>

  
</section>

</main>
<footer class="site-footer">
  <div class="wrap footer-row">
    <div class="foot-brand"><svg class="mark" width="22" height="22" viewBox="0 0 64 64" aria-hidden="true"><rect width="64" height="64" rx="15" fill="#0b0d12"/><path class="mark-slash" d="M21 14L11 50" stroke="#7cf0c5" stroke-width="5.5" stroke-linecap="round"/><path d="M26 45V31a5.5 5.5 0 0 1 11 0v14M37 31a5.5 5.5 0 0 1 11 0v14" fill="none" stroke="#e8eaef" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/></svg><p>© 2026 Meghraj Choudhary · Written in Jodhpur, Rajasthan, India</p></div>
    <div class="foot-links"><a href="/tags">Tags</a><a href="/archive">Archive</a><a href="/about">About</a><ul class="socials" aria-label="Social profiles">
  <li><span class="off" aria-disabled="true" title="GitHub: coming soon"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.4 5.4 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"/><path d="M9 18c-4.51 2-5-2-7-2"/></svg><span class="sr">GitHub (coming soon)</span></span></li><li><span class="off" aria-disabled="true" title="X: coming soon"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 4l11.7 16H20L8.3 4z"/><path d="M4 20l6.8-7.4M20 4l-6.6 7.2"/></svg><span class="sr">X (coming soon)</span></span></li><li><a href="https://www.linkedin.com/in/devmraj" rel="me noopener" target="_blank" aria-label="LinkedIn" title="LinkedIn"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-4 0v7h-4v-7a6 6 0 0 1 6-6z"/><rect x="2" y="9" width="4" height="12"/><circle cx="4" cy="4" r="2"/></svg></a></li><li><span class="off" aria-disabled="true" title="YouTube: coming soon"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M2.5 17a24 24 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.6 49.6 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24 24 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.6 49.6 0 0 1-16.2 0A2 2 0 0 1 2.5 17"/><path d="M10 15l5-3-5-3z"/></svg><span class="sr">YouTube (coming soon)</span></span></li><li><span class="off" aria-disabled="true" title="Instagram: coming soon"><svg viewBox="0 0 24 24" aria-hidden="true"><rect x="2" y="2" width="20" height="20" rx="5"/><circle cx="12" cy="12" r="4"/><path d="M17.5 6.5h.01"/></svg><span class="sr">Instagram (coming soon)</span></span></li><li><a href="mailto:hello@meghraj.dev" aria-label="hello@meghraj.dev" title="hello@meghraj.dev"><svg viewBox="0 0 24 24" aria-hidden="true"><rect x="2" y="4" width="20" height="16" rx="2"/><path d="M22 7l-10 6L2 7"/></svg></a></li>
</ul></div>
  </div>
</footer>

<script src="/static/site.js?v=ec03d52-dirty" defer></script>
<script src="/static/notify.js?v=ec03d52-dirty" defer></script>

</body>
</html>