ホーム AI・IT A single developer is trying to fundamentally change AI 'compression' — The full story of ik_llama.cpp

A single developer is trying to fundamentally change AI 'compression' — The full story of ik_llama.cpp

三浦 拓海 三浦 拓海 • 更新: • 公開: • 読了約 33 分
目次

Have you ever tried running an AI like ChatGPT on your own computer? If you have, you know that the higher the performance of the AI model, the larger the file size, the more memory it consumes, and the slower it runs. 'Smaller and faster'—this is the heartfelt wish of every local LLM (Large Language Model running on your own PC) user.


The most practical solution to this problem is 'quantization.' Quantization is a technique that reduces the precision of the numerical data inside an AI model, dramatically shrinking the file size and memory usage. For example, if you compress weights that are normally stored in 16-bit (very precise numbers) down to 4-bit or 3-bit, the model size becomes one-fourth to one-fifth of its original size.


A quiet revolution is currently taking place in this world of quantization. The protagonist is 'ik_llama.cpp.' It is a fork (derivative version) of llama.cpp, the foundational software for local LLMs, and it is being developed single-handedly by ikawrakow, an independent developer based in Italy and Bulgaria. And in March 2026, the quantization method he developed independently finally began to be integrated into the main llama.cpp repository.


Why is this project, which has barely been introduced in the Japanese-speaking world, so important? What is technically new about it? And how will it affect our AI experience? I will explain it step by step.


What is llama.cpp in the first place?

n2ebf968774fd


As a premise for this discussion, I will briefly touch upon llama.cpp. llama.cpp is open-source software for running large language models, such as the LLaMA model released by Meta (formerly Facebook), on the CPUs and GPUs of ordinary computers. It is written in C/C++ and has over 73,000 stars on GitHub.


Many local LLM tools for general users, such as Ollama and LM Studio, use this llama.cpp internally. In other words, llama.cpp is the 'engine' of local AI.


The model format handled by llama.cpp is 'GGUF,' and over 135,000 GGUF format model files have been published on Hugging Face. It is no exaggeration to say that the entire local LLM ecosystem revolves around llama.cpp.


In other words, an improvement in llama.cpp's quantization method means that the experience of local LLM users around the world will directly improve.


The limits of conventional quantization—K-quants and I-quants


llama.cpp has traditionally had two types of quantization methods.


The first is 'K-quants' (K-quantization). Denoted by names like Q4_K_M and Q5_K_S, it performs linear scaling (a method of compressing numerical values using a uniform scale) on a block-by-block basis. While it is fast and stable in calculation, the quality degrades rapidly at extremely low bit counts (2 to 3 bits).


The second is 'I-quants' (Importance Matrix Quantization). Denoted by names like IQ3_XXS and IQ2_XS, it uses a pre-calculated matrix (importance matrix) that determines 'which weights are important,' prioritizing the preservation of important weights with high precision. While the quality at low bits is better than K-quants, it has the drawbacks of slower processing speeds and the requirement for prior calibration (adjustment work).


In short, with conventional methods, it was impossible to escape the trade-off where 'reducing the size lowers quality' or 'maintaining quality makes it slower.'


The new quantization created by ik_llama.cpp: The IQ_K series


ikawrakow of ik_llama.cpp developed a new quantization method called the 'IQ_K series' to break this trade-off. It is named with variants IQ2_K, IQ3_K, IQ4_K, IQ5_K, and IQ6_K.


While conventional K-quants used linear mapping (where the relationship between the quantized value and the actual weight is linear), the IQ_K series adopts non-linear mapping. Specifically, it uses a small lookup table (conversion table) when converting quantized values into actual weights.


For example, in the case of IQ2_K, 16 weights are grouped into one block, which are then organized into 256 superblocks, and converted using a 2x4 entry lookup table. This results in just 2.375 bits per weight. For IQ3_K, it is 3.4375 bits using a 2x8 entry table.


This lookup table is extremely small (4 to 32 INT8 values) and fits into one or two CPU SIMD registers (dedicated storage areas capable of processing multiple data points at once). Therefore, it can be processed extremely efficiently using SIMD instructions.


In other words, the IQ_K series is a method that takes the best of both worlds: 'higher quality than conventional methods at the same bit count' and 'faster than conventional I-quants.'


Row interleaving: The secret weapon to make CPUs even faster


ik_llama.cpp has another major proprietary technology: 'row-interleaved packing'.


Normally, weight data for quantized models is arranged continuously row by row in memory. With row interleaving, this is rearranged by grouping four rows together and alternating them (this is what the 'R4' suffix means).


Why does this make it faster? When a CPU performs matrix calculations, it wants to read and process data from multiple rows simultaneously. However, with standard arrangement, data from different rows is located far apart in memory, which slows down reading. With row interleaving, the necessary data is grouped closely together, dramatically reducing memory access loss.


The effect is reflected in the numbers. In benchmarks on a Ryzen 7950X, the R4 version of IQ3_S is 5.2 times faster than the standard llama.cpp version. On an Apple M2 Max, it is 7 times faster. This is literally an order-of-magnitude speedup.


In other words, even if you run the same model on the same computer, using ik_llama.cpp's optimizations could allow you to output 50 to 70 tokens per second, compared to the 10 tokens (about 10 characters) per second you might have been getting before. The experience changes from 'sluggish' to 'smooth'.


Trellis Quantization: Going even further


ikawrakow's exploration does not stop at the IQ_K series. He is also developing an even more advanced method called 'Trellis Quantization'. It is implemented under the names IQ1_KT, IQ2_KT, IQ3_KT, and IQ4_KT.


Trellis refers to a 'lattice' and is a concept that has long been used in signal processing and data compression. In trellis quantization, weight quantization is solved as an 'optimization problem for the entire sequence'. In other words, instead of quantizing each weight individually, it searches for a quantization pattern that minimizes the overall error while considering the relationships with preceding and succeeding weights.


As a result, IQ2_KT (approx. 2.125 bits/weight) has a lower perplexity (an indicator of model prediction accuracy, where lower is better) than IQ2_KS (2.1875 bits), despite having slightly fewer bits. In short, it achieves the usually impossible result of being 'smaller yet smarter'.


However, there are weaknesses. The quantization calculation itself is about five times slower than the IQ_K series, and the token generation speed on the CPU still has room for optimization. While it already performs well on GPUs (CUDA), it will likely take a little more time before it is ready for full-scale use on CPUs.


In other words, trellis quantization is a method that pursues 'ultimate compression quality,' and at this point, it is positioned close to the results of cutting-edge research.


Merging into the main llama.cpp repository — The moment an individual's achievement becomes the standard


In March 2026, there was a major development. The IQ_K / IQ_KS series quantization developed in ik_llama.cpp is currently being merged into the main llama.cpp repository as PR (Pull Request) #19726.


This means more than just code integration. Model files quantized with ik_llama.cpp will be readable directly in the main llama.cpp, and new quantization types such as IQ3_K and IQ4_K will become selectable in the main llama-quantize command.


At present, it only supports the CPU backend, with GPU backends like CUDA and Vulkan scheduled to be added in future PRs. However, the direction is clear—the achievements of an individual developer are being incorporated into the global standard infrastructure for local LLMs.


For local LLM users, this means that in the near future, the day will come when 'simply selecting IQ3_K or IQ4_K in llama-quantize will allow you to obtain higher-quality models than the conventional Q-series quantization.'


70B model benchmarks — How much of a difference is there really?


Beyond theory, let's look at the actual numbers. In one benchmark, the Llama 3.3 70B model was compared between the two using a configuration consisting of a Xeon E5-2673 v4 (20-core CPU), 128GB of RAM, and an RTX 3090.


When using IQ4_NL quantization in ik_llama.cpp, the prompt processing speed reached 146 tokens per second with an 8K token context. It was also reported that the token generation speed in long contexts was more stable, and the load balancing between VRAM and system RAM was smoother.


In another benchmark, an optimized build on an AMD Threadripper 1950X showed performance over 60% higher than the standard llama.cpp build. For LLaMA-3.1-8B, it recorded a processing speed of 370 tokens per second, equivalent to approximately 5.5 TFLOPS.


While not a dramatic difference, the optimizations in ik_llama.cpp are definitely effective, especially in CPU inference and hybrid GPU/CPU inference (a method where large models that do not fit in GPU memory are run by splitting the load with the CPU).


Why was a single developer able to achieve all of this?


ikawrakow's GitHub profile simply says 'Gentleman at large,' and his affiliated organization is not disclosed. All that is known is that he is based in Italy and Bulgaria.


However, looking at his code reveals deep expertise in SIMD optimization, numerical analysis, and signal processing. From designing quantization lookup tables to implementing CUDA kernels, he covers every layer by himself.


In the open-source world, such individual contributions can change the direction of an entire project. Gerganov, the original developer of llama.cpp, also started as an individual developer, and the fact that he is trying to incorporate the achievements of ik_llama.cpp into the main project itself proves the technical value of this project.


How will this affect our lives?


The integration of ik_llama.cpp's achievements into the main project will directly bring about the following changes.


First, larger models will be able to run on the same hardware. If the quality of IQ3_K (approx. 3.4 bits/weight) is comparable to the conventional Q4_K (4 bits/weight), you can maintain quality even when dropping models previously run at 4 bits down to 3 bits, allowing you to load larger models with the saved memory.


Second, practical inference using only a CPU becomes more realistic. The 5-7x speedup through row interleaving is significant for users who do not own expensive GPUs. It expands the possibility of being able to converse with AI at practical speeds on a laptop.


And when applications like Ollama and LM Studio update llama.cpp internally, users will receive these benefits without even realizing it. "It feels faster lately" — behind that feeling is the work of ikawrakow.


Summary


ik_llama.cpp is a project developed as a fork of llama.cpp by ikawrakow, an independent developer based in Italy and Bulgaria. The new quantization method called the IQ_K series achieves "higher quality at the same size" and "higher speed at the same quality" through non-linear lookup tables and SIMD optimization. Row-interleaved packing speeds up CPU inference by up to 7 times, and trellis quantization is pushing even further toward the limits of compression.


And in March 2026, these achievements began to be merged into the main llama.cpp repository. The tenacity of an individual is changing the experience for local LLM users around the world.


While AI research from large corporations tends to grab the spotlight, at the forefront of open source, such deep individual technical expertise is raising the bar for the entire ecosystem. ik_llama.cpp is the most vivid example of this.


Reference Sources


ik_llama.cpp GitHub: https://github.com/ikawrakow/ik_llama.cpp

IQ_K/IQ_KS Quantization Merged into llama.cpp: https://jangwook.net/en/blog/en/llama-cpp-iq-quantization-merge/

PR #19726 (Port IQ_K and IQ_KS quants): https://github.com/ggml-org/llama.cpp/pull/19726

New quantization types IQ2_K, IQ3_K, IQ4_K, IQ5_K: https://github.com/ikawrakow/ik_llama.cpp/discussions/8

Benchmarking llama.cpp vs ik_llama.cpp on 70B: https://www.hardware-corner.net/guides/llama-cpp-vs-ik_llama-cpp/

CPU performance comparison: https://github.com/ikawrakow/ik_llama.cpp/discussions/164

Which Quantization Should I Use? (arXiv): https://arxiv.org/abs/2601.14277

Choosing a GGUF Model K-Quants I-Quants: https://kaitchup.substack.com/p/choosing-a-gguf-model-k-quants-i

同じカテゴリの記事

三浦 拓海
コンテンツディレクター 三浦 拓海
プロフィールを見る →

映画と連続ドラマの公開情報を追う担当。配給会社のプレスシートと公式サイトの発表日を確認したうえで執筆します。

おすすめの関連記事