<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ilia</title>
    <description>The latest articles on DEV Community by Ilia (@aetseihe).</description>
    <link>https://dev.to/aetseihe</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4109993%2F8dd5ffe4-78f6-4d71-94c8-571b94601e7f.jpg</url>
      <title>DEV Community: Ilia</title>
      <link>https://dev.to/aetseihe</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aetseihe"/>
    <language>en</language>
    <item>
      <title>PCST: A Systematic Study of Extreme Low-Bit LLaMA-7B Compression Without Retraining</title>
      <dc:creator>Ilia</dc:creator>
      <pubDate>Fri, 04 Sep 2026 14:52:00 +0000</pubDate>
      <link>https://dev.to/aetseihe/pcst-a-systematic-study-of-extreme-low-bit-llama-7b-compression-without-retraining-5f9p</link>
      <guid>https://dev.to/aetseihe/pcst-a-systematic-study-of-extreme-low-bit-llama-7b-compression-without-retraining-5f9p</guid>
      <description>&lt;p&gt;What Works, What Fails, and Why Local Weight Error Poorly Predicts Model Quality&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project:&lt;/strong&gt; PCST — Product Code Structured Transform  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This article deliberately reports both positive and negative results. It does not claim that PCST outperforms modern standard quantization. Its purpose is to document a reproducible search for the limits of LLaMA-7B compression without retraining and to show which locally promising methods fail end-to-end validation.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Publication links
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Formal preprint and DOI:&lt;/strong&gt; &lt;a href="https://zenodo.org/records/22304197" rel="noopener noreferrer"&gt;Zenodo record 22304197&lt;/a&gt;, DOI: &lt;a href="https://doi.org/10.5281/zenodo.22304197" rel="noopener noreferrer"&gt;10.5281/zenodo.22304197&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Russian-language article:&lt;/strong&gt; published on Habr — public URL to be added.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source code and reproducibility package:&lt;/strong&gt; public GitHub release is in preparation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Abstract
&lt;/h3&gt;

&lt;p&gt;We study extreme low-bit compression of LLaMA-7B weights without retraining the original model, distillation, pruning, or architectural changes. The goal of PCST—Product Code Structured Transform—is to find a compact representation of capabilities the model has already acquired, using post-training mathematical transformations and a small calibration corpus.&lt;/p&gt;

&lt;p&gt;The project evaluated more than 60 documented methods and variants, and substantially more individual configurations, including Product Quantization, SVD and low-rank residuals, Hessian- and activation-aware optimization, orthogonal gauge transformations, additive and residual quantization, sparse corrections, joint optimization of coupled matrices, techniques inspired by image and signal compression, and output-head calibration. Early project results were invalidated after a tensor-orientation bug was discovered. All central claims in this article use only the corrected pipeline.&lt;/p&gt;

&lt;p&gt;The final reproducible PCST v5 artifact occupies &lt;strong&gt;2.05 GiB&lt;/strong&gt;. On 32 independent WikiText-2 validation documents with 6,688 prediction positions, it achieves perplexity &lt;strong&gt;15.56&lt;/strong&gt;, Top-10 overlap with Q8 of &lt;strong&gt;59.59%&lt;/strong&gt;, and next-token accuracy of &lt;strong&gt;43.56%&lt;/strong&gt;. By comparison, a 3.07 GiB Q3_K_M model reaches perplexity &lt;strong&gt;7.36&lt;/strong&gt;, Top-10 overlap &lt;strong&gt;86.93%&lt;/strong&gt;, and next-token accuracy &lt;strong&gt;56.25%&lt;/strong&gt;. PCST v5 is therefore 1.02 GiB smaller than Q3_K_M, but remains substantially behind it in quality and runtime performance.&lt;/p&gt;

&lt;p&gt;The strongest positive result is a low-rank bridge between PCST hidden states and the LM Head. Selected on a development split and evaluated once on a sealed test split, the bridge improves Top-10 overlap by &lt;strong&gt;1.706 percentage points&lt;/strong&gt; at unchanged Q5 head payload, reduces KL from &lt;strong&gt;0.5478 to 0.4942&lt;/strong&gt;, and increases logit cosine similarity from &lt;strong&gt;0.8538 to 0.8823&lt;/strong&gt;. The central negative finding is that reducing weight MSE or local block error frequently fails to improve—and can even damage—final token ranking.&lt;/p&gt;

&lt;p&gt;This work does not establish a fundamental impossibility of compressing a 7B model to 1–2 GiB. It identifies a practical limit of the tested independent-PQ-plus-local-corrections design and motivates a different direction: network-wide joint representation and error shaping rather than an accumulation of isolated matrix-level improvements.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Motivation
&lt;/h3&gt;

&lt;p&gt;A language model stores billions of numbers, but useful behavior may not require every number to be preserved exactly. The weights are one particular encoding of a computation, not necessarily its shortest possible description.&lt;/p&gt;

&lt;p&gt;The practical motivation is direct. A model that runs locally on a small device does not depend on connectivity, an external API, or cloud infrastructure. Such models matter for autonomous systems, field devices, personal assistants, education, and regions where reliable connectivity is unavailable or expensive.&lt;/p&gt;

&lt;p&gt;The project began with an intentionally ambitious target: approach 1 GiB while retaining quality close to Q8. That target has not been reached. Instead of hiding the gap, we treat it as a measurable research problem.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Model intelligence != exact storage of the original weights
Model intelligence = preservation of the relevant computation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Scope and Constraints
&lt;/h3&gt;

&lt;p&gt;The main PCST track permits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;activation statistics from a calibration corpus;&lt;/li&gt;
&lt;li&gt;SVD, least squares, eigendecomposition, and orthogonal transforms;&lt;/li&gt;
&lt;li&gt;post-training selection of codes, codebooks, scales, and bit budgets;&lt;/li&gt;
&lt;li&gt;function-preserving reparameterizations;&lt;/li&gt;
&lt;li&gt;folding corrections into existing matrices;&lt;/li&gt;
&lt;li&gt;storage-format and inference-kernel optimization.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It excludes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;gradient fine-tuning of the original Transformer blocks;&lt;/li&gt;
&lt;li&gt;distillation into a different model;&lt;/li&gt;
&lt;li&gt;parameter, channel, or neuron pruning;&lt;/li&gt;
&lt;li&gt;changing depth, hidden size, head count, or FFN width;&lt;/li&gt;
&lt;li&gt;training the original model on task labels.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Calibration that uses teacher hidden states or logits is explicitly described as &lt;strong&gt;teacher-aware post-training calibration&lt;/strong&gt;, not as an exact transformation.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. A Critical Bug and Experimental Restart
&lt;/h3&gt;

&lt;p&gt;On August 21, 2026, we found an orientation error in the NumPy loader. A GGUF tensor already decoded as &lt;code&gt;(out, in)&lt;/code&gt; was reshaped rather than transposed for an &lt;code&gt;x @ W&lt;/code&gt; implementation. This permuted matrix elements and invalidated the early quality measurements.&lt;/p&gt;

&lt;p&gt;After the fix, the NumPy Q8 forward pass was validated against llama.cpp on identical tokens:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;logit cosine similarity: &lt;strong&gt;0.999942&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;relative error: &lt;strong&gt;0.01140&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;Top-1 agreement: &lt;strong&gt;100%&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;Top-10 overlap: &lt;strong&gt;97.5%&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pre-fix experiments are retained as a record of infrastructure and hypotheses, but they are not used as evidence for method quality. The incident provides a broader methodological lesson: a custom decoder must first reproduce a trusted runtime on an effectively uncompressed model.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. PCST Representation
&lt;/h3&gt;

&lt;p&gt;PCST is an experimental heterogeneous weight representation. Different layers and matrices receive different encoders and bit budgets. Its primary building block is Product Quantization (PQ).&lt;/p&gt;

&lt;p&gt;A matrix is partitioned into short vectors of length &lt;code&gt;B&lt;/code&gt;. Each vector is represented by the index of its nearest centroid in a codebook of size &lt;code&gt;K&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;w_block ≈ C[index]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The real footprint includes indices, codebooks, scales, low-rank factors, normalizations, embeddings, the LM Head, and metadata. We therefore distinguish logical payload, artifact bytes, peak process RSS, and steady-state working memory.&lt;/p&gt;

&lt;p&gt;PCST does not impose one configuration on the full model. Sensitivity changes by matrix type and network depth. Compression is therefore treated as a rate–distortion allocation problem: where should the next megabyte be spent to produce the largest improvement in final model behavior?&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Experimental Protocol
&lt;/h3&gt;

&lt;h4&gt;
  
  
  5.1. Model and reference
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;model: LLaMA-7B from the Llama 1 family;&lt;/li&gt;
&lt;li&gt;source checkpoint: compatible Q8_0 GGUF;&lt;/li&gt;
&lt;li&gt;primary teacher-logit reference: Q8;&lt;/li&gt;
&lt;li&gt;standard GGUF runtime: llama.cpp;&lt;/li&gt;
&lt;li&gt;PCST v5 evaluation loads the materialized &lt;code&gt;.pcstc&lt;/code&gt; artifact.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  5.2. Calibration data
&lt;/h4&gt;

&lt;p&gt;The final calibration corpus contains 24,480 tokens across 360 reset contexts drawn from WikiText, BoolQ, HellaSwag, and PIQA:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;train: 16,320 tokens;&lt;/li&gt;
&lt;li&gt;development: 4,080 tokens;&lt;/li&gt;
&lt;li&gt;sealed test: 4,080 tokens.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Splits are document-separated. The sealed test split is not used for greedy policy selection.&lt;/p&gt;

&lt;h4&gt;
  
  
  5.3. External WikiText evaluation
&lt;/h4&gt;

&lt;p&gt;The final comparison uses 32 independent WikiText-2 raw validation documents, up to 256 tokens per document, with BOS and state reset at document boundaries. It evaluates 6,688 prediction positions using identical tokenization and positions for every format.&lt;/p&gt;

&lt;h4&gt;
  
  
  5.4. Metrics
&lt;/h4&gt;

&lt;p&gt;No single metric is treated as “intelligence.” We report:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ground-truth NLL and perplexity;&lt;/li&gt;
&lt;li&gt;next-token target accuracy;&lt;/li&gt;
&lt;li&gt;Top-1, Top-10, and Top-50 agreement with Q8;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;KL(Q8 || PCST)&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;logit cosine similarity and relative Frobenius error;&lt;/li&gt;
&lt;li&gt;teacher-probability MassRecall@10;&lt;/li&gt;
&lt;li&gt;logit-margin error;&lt;/li&gt;
&lt;li&gt;local activation error for diagnostics;&lt;/li&gt;
&lt;li&gt;artifact size, throughput, and peak RSS.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6. Methods with Reproducible Positive Signals
&lt;/h3&gt;

&lt;h4&gt;
  
  
  6.1. Non-uniform bit allocation
&lt;/h4&gt;

&lt;p&gt;Early layers and individual matrix types have very different effects on final logits. Spending additional bytes on V/O in the early network produced substantially more value than the same allocation in upper layers. This motivated a selective layer-by-matrix policy rather than uniform precision.&lt;/p&gt;

&lt;h4&gt;
  
  
  6.2. Column-RMS for attention O
&lt;/h4&gt;

&lt;p&gt;After fixing the orientation bug, Row-RMS normalization harmed V and FFN matrices, while Column-RMS was critical for O. On corrected L0, local O error fell from &lt;strong&gt;0.6791 to 0.1619&lt;/strong&gt;, while cosine increased from &lt;strong&gt;0.9283 to 0.9920&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The result cautions against universal normalization recipes: the same transform can help O while damaging V, Gate, or Up.&lt;/p&gt;

&lt;h4&gt;
  
  
  6.3. Selective SVD residuals
&lt;/h4&gt;

&lt;p&gt;For a small subset of matrices, the residual left by coarse PQ admits a useful low-rank approximation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;W ≈ W_PQ + U_r S_r V_rᵀ
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A rank-32 correction for FFN Down was worthwhile only in layers &lt;code&gt;{0, 1, 2, 4, 30, 31}&lt;/code&gt;. Sequential validation retained local error reductions between &lt;strong&gt;42.5% and 91.4%&lt;/strong&gt;. V/O residuals were retained only for layers 24, 27, and 31. Residuals are therefore best treated as rare corrections for anomalous matrices, not a universal quality layer.&lt;/p&gt;

&lt;h4&gt;
  
  
  6.4. Function-preserving Hadamard gauges
&lt;/h4&gt;

&lt;p&gt;Coupled orthogonal transforms can change weight geometry without changing the exact model function, provided related matrices are transformed consistently. This creates an opportunity to search for coordinates that quantize more efficiently.&lt;/p&gt;

&lt;p&gt;The effect was strongly layer-specific. Seed 4 was retained for V/O in L5 and L8 after corrected validation, while broader multi-seed or global application did not generalize.&lt;/p&gt;

&lt;h4&gt;
  
  
  6.5. Sequential calibration
&lt;/h4&gt;

&lt;p&gt;A compressed layer does not receive clean Q8 activations; it receives the already distorted outputs of all preceding compressed layers. Later layers were therefore refined on actual PCST-prefix states. The improvement was modest but reproducible, and the method establishes an important principle: local compression must be calibrated on the distribution induced by the compressed network itself.&lt;/p&gt;

&lt;h4&gt;
  
  
  6.6. Static components
&lt;/h4&gt;

&lt;p&gt;Embeddings and the LM Head require separate policies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Q4 group-32 embeddings provided substantial savings with limited damage in corrected short-context tests;&lt;/li&gt;
&lt;li&gt;a Q5 group-32 LM Head reduced its footprint from roughly 132.8 to 85.9 MiB while retaining local logit cosine &lt;strong&gt;0.9989&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;aggressive PQ of the LM Head reduced MSE but severely damaged ranking.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The materialized quality artifact uses Q8 embeddings and a Q5 LM Head with a baked bridge.&lt;/p&gt;

&lt;h4&gt;
  
  
  6.7. Low-rank head bridge
&lt;/h4&gt;

&lt;p&gt;After 32 compressed layers, PCST hidden states occupy a slightly shifted geometry, while the original LM Head still decodes them in the Q8 coordinate system. We estimated a low-rank mapping from PCST to Q8 hidden states and folded it into the Q5 LM Head. This required no additional runtime operation and did not change head payload.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;rank=32, alpha=0.7&lt;/code&gt; candidate was selected on development data and evaluated once on the sealed test split:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Q5 baseline&lt;/th&gt;
&lt;th&gt;Q5 + bridge&lt;/th&gt;
&lt;th&gt;Change&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Top-1 agreement&lt;/td&gt;
&lt;td&gt;65.025%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;65.809%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;+0.784 pp&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Top-10 overlap&lt;/td&gt;
&lt;td&gt;62.917%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;64.623%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;+1.706 pp&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Top-50 overlap&lt;/td&gt;
&lt;td&gt;63.349%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;65.456%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;+2.108 pp&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MassRecall@10&lt;/td&gt;
&lt;td&gt;71.813%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;72.256%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;+0.443 pp&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;KL&lt;/td&gt;
&lt;td&gt;0.54776&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.49419&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;−0.05358&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Logit cosine&lt;/td&gt;
&lt;td&gt;0.85381&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.88232&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;+0.02850&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This is the strongest validated quality improvement in the project. It suggests that part of the network-wide distortion is systematic and can be corrected by a compact output mapping.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Methods That Failed—and What They Teach Us
&lt;/h3&gt;

&lt;p&gt;“Failed” below refers to a tested recipe, bitrate, objective, and protocol. It does not invalidate an entire research family.&lt;/p&gt;

&lt;h4&gt;
  
  
  7.1. Image geometry does not transfer directly to raw weights
&lt;/h4&gt;

&lt;p&gt;Haar wavelets, quadtree coding, Gaussian splatting, fractal approximation, and coordinate polynomials rely on local spatial smoothness or repeated neighboring structure. Raw LLaMA matrices largely lack this geometry. Neighboring V coordinates at L0 had near-zero correlation, and adjacent differences had approximately &lt;code&gt;1.414×&lt;/code&gt; the RMS of the original weights.&lt;/p&gt;

&lt;h4&gt;
  
  
  7.2. Naive cross-layer sharing is weak
&lt;/h4&gt;

&lt;p&gt;Direct base-plus-delta coding, shared FFN codebooks, shared V/O subspaces, and neighboring-layer prediction yielded little useful compression. Layers may serve similar roles while using unrelated coordinate systems. This leaves open shared &lt;strong&gt;error&lt;/strong&gt; dictionaries or alignment after a suitable gauge, but not naive subtraction of raw weights.&lt;/p&gt;

&lt;h4&gt;
  
  
  7.3. Better reconstruction does not imply better language behavior
&lt;/h4&gt;

&lt;p&gt;Residual VQ, additive quantization, Hessian-aware centroid fitting, joint V/O, and joint FFN frequently improved local objectives without improving final token ranking.&lt;/p&gt;

&lt;p&gt;The clearest example is alternating joint V/O at L16. Updating all codes and codebooks for a local &lt;code&gt;A·V·O&lt;/code&gt; objective at constant payload damaged independent development performance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Top-10: &lt;strong&gt;62.42% → 56.61%&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;cosine: &lt;strong&gt;0.8620 → 0.8130&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;KL: &lt;strong&gt;0.6174 → 0.8970&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A local objective can redirect error into dimensions that are amplified by the remaining network.&lt;/p&gt;

&lt;h4&gt;
  
  
  7.4. Ranking-aware objectives overfit easily
&lt;/h4&gt;

&lt;p&gt;Top-K is discrete and high variance. Improvements found on 68–272 positions often vanished on independent documents. A margin-subspace head refinement trained on 16,320 positions and evaluated on 4,080 development positions also failed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Top-10: &lt;strong&gt;62.42% → 60.76%&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;target Top-1: &lt;strong&gt;38.16% → 37.39%&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;NLL: &lt;strong&gt;3.2337 → 3.2637&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Direct ranking optimization therefore needs cross-validation, strong regularization, and guardrails on NLL, KL, and probability mass recall.&lt;/p&gt;

&lt;h4&gt;
  
  
  7.5. Lossless coding is nearly exhausted
&lt;/h4&gt;

&lt;p&gt;The entropy of current PQ indices is close to their stored bit width. The remaining ideal entropy gain was estimated at only &lt;strong&gt;17.5 MiB&lt;/strong&gt;, far short of the 2.05-to-1.5 GiB gap. A general custom bit-packed container was larger than the current representation once metadata was included.&lt;/p&gt;

&lt;h4&gt;
  
  
  7.6. Other tested recipes
&lt;/h4&gt;

&lt;p&gt;The following were not accepted at their tested budgets: Chebyshev/polynomial SVD, universal per-head SVD, Tensor Train, sparse coding, sparse FP16 outliers, hierarchical/residual/additive VQ, raw-weight shared codebooks, LM Head–embedding tying, B-frame and inter-layer delta coding, graph ordering, Block-KLT, binary layers, hidden-state anchors, entropy-constrained PQ, tile-wise dense/sparse schemes, bounded QTIP-like and VPTQ-style pilots, fixed-codebook joint V/O and FFN, and aggressive margin-aware head correction.&lt;/p&gt;

&lt;p&gt;These experiments do not constitute full replications of AQLM, QTIP, or VPTQ; they close only the compatible bounded recipes tested inside PCST.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. PCST v5 Artifact
&lt;/h3&gt;

&lt;p&gt;The materialized &lt;code&gt;llama-7b-pcst-v5-quality.pcstc&lt;/code&gt; contains 32 compressed Transformer layers, 224 PQ streams, selective SVD residuals, selected gauges, sequential refinement, calibrated output RMSNorm, Q8 embeddings, and a Q5 LM Head with a baked rank-32 bridge.&lt;/p&gt;

&lt;p&gt;Validation results:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;artifact size: &lt;strong&gt;2,204,308,700 bytes = 2,102.19 MiB = 2.05 GiB&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;lossless PQ stream round-trip: passed;&lt;/li&gt;
&lt;li&gt;container-to-source-policy numerical mismatches: 0;&lt;/li&gt;
&lt;li&gt;deterministic hidden-state delta: 0.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  9. Main External Results
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Format&lt;/th&gt;
&lt;th&gt;Size&lt;/th&gt;
&lt;th&gt;PPL ↓&lt;/th&gt;
&lt;th&gt;Top-1 vs Q8 ↑&lt;/th&gt;
&lt;th&gt;Top-10 vs Q8 ↑&lt;/th&gt;
&lt;th&gt;Target Top-1 ↑&lt;/th&gt;
&lt;th&gt;Throughput*&lt;/th&gt;
&lt;th&gt;Peak RSS*&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Q8_0&lt;/td&gt;
&lt;td&gt;6.67 GiB&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;6.922&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;100.00%&lt;/td&gt;
&lt;td&gt;100.00%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;57.13%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;20.33 tok/s&lt;/td&gt;
&lt;td&gt;13.80 GiB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;PCST v5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2.05 GiB&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;15.560&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;60.47%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;59.59%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;43.56%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;2.43 tok/s&lt;/td&gt;
&lt;td&gt;4.26 GiB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Q3_K_M&lt;/td&gt;
&lt;td&gt;3.07 GiB&lt;/td&gt;
&lt;td&gt;7.356&lt;/td&gt;
&lt;td&gt;89.89%&lt;/td&gt;
&lt;td&gt;86.93%&lt;/td&gt;
&lt;td&gt;56.25%&lt;/td&gt;
&lt;td&gt;18.64 tok/s&lt;/td&gt;
&lt;td&gt;6.12 GiB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Q4_K_M&lt;/td&gt;
&lt;td&gt;3.80 GiB&lt;/td&gt;
&lt;td&gt;7.009&lt;/td&gt;
&lt;td&gt;95.01%&lt;/td&gt;
&lt;td&gt;92.65%&lt;/td&gt;
&lt;td&gt;56.89%&lt;/td&gt;
&lt;td&gt;30.36 tok/s&lt;/td&gt;
&lt;td&gt;7.13 GiB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;* PCST uses a research Python decoder, while GGUF runs through optimized llama.cpp. The values describe the current implementations rather than the intrinsic performance limits of the formats.&lt;/p&gt;

&lt;p&gt;PCST is approximately 3.25× smaller than Q8 and 1.02 GiB smaller than Q3_K_M. However, its perplexity is 2.12× that of Q3_K_M. Matching Q3 NLL would require removing approximately &lt;strong&gt;92.5% of PCST's current excess NLL over Q8&lt;/strong&gt;. The remaining gap is therefore not an incremental tuning problem.&lt;/p&gt;

&lt;h3&gt;
  
  
  10. Interpretation
&lt;/h3&gt;

&lt;h4&gt;
  
  
  10.1. What the study establishes
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;A technically functional 2.05 GiB LLaMA-7B representation can retain a substantial portion of Q8 behavior without retraining.&lt;/li&gt;
&lt;li&gt;Sensitivity is highly non-uniform across layers and matrices.&lt;/li&gt;
&lt;li&gt;A small number of anomalous matrices benefit from selective low-rank residuals.&lt;/li&gt;
&lt;li&gt;Calibration should use activations produced by the compressed prefix.&lt;/li&gt;
&lt;li&gt;Part of the final error is systematic and correctable by a compact head bridge.&lt;/li&gt;
&lt;li&gt;Local MSE is useful for diagnosis but insufficient for model selection.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  10.2. What the study does not establish
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;PCST v5 does not beat standard quantization on the quality–size–speed frontier.&lt;/li&gt;
&lt;li&gt;The result cannot be described as Q6-, Q4-, or Q3-equivalent quality.&lt;/li&gt;
&lt;li&gt;The current Python runtime does not demonstrate Raspberry Pi readiness.&lt;/li&gt;
&lt;li&gt;One LLaMA-7B experiment does not establish transfer to other models.&lt;/li&gt;
&lt;li&gt;The study does not prove a fundamental limit for no-training compression.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  11. Threats to Validity
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Single model.&lt;/strong&gt; The policy may exploit Llama 1 7B-specific behavior.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Limited external corpus.&lt;/strong&gt; 6,688 positions provide an honest checkpoint, not a complete capability evaluation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Incomplete downstream evaluation.&lt;/strong&gt; The current HellaSwag fast check is too small for a paper claim.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Missing equal-size IQ baselines.&lt;/strong&gt; Strong Pareto claims require IQ2_XXS, IQ2_XS, IQ2_S, TQ2_0, and Q2_K comparisons.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Different runtime maturity.&lt;/strong&gt; Python PCST and llama.cpp do not provide an apples-to-apples systems comparison.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multiple hypothesis testing.&lt;/strong&gt; Many experiments increase the chance of accidental development-set wins; central results require sealed tests and confidence intervals.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  12. Next Research Directions
&lt;/h3&gt;

&lt;h4&gt;
  
  
  12.1. Equal-size baselines
&lt;/h4&gt;

&lt;p&gt;The immediate priority is to evaluate IQ2_XXS, IQ2_XS, IQ2_S, TQ2_0, and Q2_K produced from the same source checkpoint, with the same importance matrix where applicable, using the identical benchmark runner.&lt;/p&gt;

&lt;h4&gt;
  
  
  12.2. Hybrid IQ–PCST
&lt;/h4&gt;

&lt;p&gt;If an existing i-quant is a stronger bulk encoder than independent PQ, PCST can become a global optimizer around it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;i-quant for most weights;&lt;/li&gt;
&lt;li&gt;PCST sensitivity mapping for bit allocation;&lt;/li&gt;
&lt;li&gt;selective residuals for rare critical matrices;&lt;/li&gt;
&lt;li&gt;a head bridge for systematic output error;&lt;/li&gt;
&lt;li&gt;mixed precision under a fixed global byte budget.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  12.3. Joint &lt;code&gt;Q + LR&lt;/code&gt; decomposition
&lt;/h4&gt;

&lt;p&gt;Instead of computing &lt;code&gt;PQ(W)&lt;/code&gt; and then &lt;code&gt;SVD(W − PQ(W))&lt;/code&gt;, jointly solve:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;W ≈ Q + LR
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;under an activation-weighted objective, while quantizing both the base and low-rank factors. This CALDERA-like direction is materially different from the sequential residual SVD already tested.&lt;/p&gt;

&lt;h4&gt;
  
  
  12.4. Network-wide causal allocation
&lt;/h4&gt;

&lt;p&gt;Each matrix should be valued by final benefit per stored byte:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;value(matrix) = improvement in final NLL / additional artifact bytes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A counterfactual audit can temporarily restore one matrix to Q8 inside the complete PCST model. This may reveal a small set of causal bottlenecks that local reconstruction metrics miss.&lt;/p&gt;

&lt;h4&gt;
  
  
  12.5. Native runtime
&lt;/h4&gt;

&lt;p&gt;Once a competitive representation is found, the systems path includes mmap storage, fused lookup-and-accumulate kernels, direct multiplication without FP32 matrix reconstruction, AVX2/AVX-512 and ARM NEON implementations, layer streaming, and a controlled memory arena.&lt;/p&gt;

&lt;h3&gt;
  
  
  13. Conclusion
&lt;/h3&gt;

&lt;p&gt;PCST v5 does not meet the original goal of 1–1.5 GiB at near-Q8 quality, and it currently trails Q3_K_M. It nevertheless provides a useful map of the search space.&lt;/p&gt;

&lt;p&gt;Extreme Transformer compression cannot reliably be built as a sum of local victories. Error travels through the residual network, shifts downstream activation distributions, and can improve in MSE while token ranking becomes worse. The strongest positive result—the head bridge—works precisely because it corrects a systematic network-level mismatch.&lt;/p&gt;

&lt;p&gt;The next question is therefore not “which compressor should be applied to another matrix?” It is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How can we encode the computation of the complete network so that layer-wise errors cancel on the real activation manifold?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We do not yet have the answer. We do have a reproducible formulation, an honest baseline, and dozens of dead ends that no longer need to be rediscovered.&lt;/p&gt;




&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Frantar, E. et al. &lt;a href="https://arxiv.org/abs/2210.17323" rel="noopener noreferrer"&gt;GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers&lt;/a&gt;, 2022.&lt;/li&gt;
&lt;li&gt;Chee, J. et al. &lt;a href="https://arxiv.org/abs/2307.13304" rel="noopener noreferrer"&gt;QuIP: 2-Bit Quantization of Large Language Models With Guarantees&lt;/a&gt;, 2023.&lt;/li&gt;
&lt;li&gt;Egiazarian, V. et al. &lt;a href="https://arxiv.org/abs/2401.06118" rel="noopener noreferrer"&gt;Extreme Compression of Large Language Models via Additive Quantization&lt;/a&gt;, 2024.&lt;/li&gt;
&lt;li&gt;Liu, Y. et al. &lt;a href="https://arxiv.org/abs/2409.17066" rel="noopener noreferrer"&gt;VPTQ: Extreme Low-bit Vector Post-Training Quantization for Large Language Models&lt;/a&gt;, 2024.&lt;/li&gt;
&lt;li&gt;Saha, R. et al. &lt;a href="https://arxiv.org/abs/2405.18886" rel="noopener noreferrer"&gt;Compressing Large Language Models using Low Rank and Low Precision Decomposition&lt;/a&gt;, 2024.&lt;/li&gt;
&lt;li&gt;ggml-org. &lt;a href="https://github.com/ggml-org/llama.cpp/wiki/Tensor-Encoding-Schemes/3672234405ae38623cec84796413822f6ac6bfaf" rel="noopener noreferrer"&gt;llama.cpp Tensor Encoding Schemes&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>llm</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
