Examining Threshold Effects on Q4M Gemma-3-270M-IT Quantization: A Compromise Between Compression and Fidelity
In the world of Edge AI and the development of large language models (LLM), model size is often a major constraint when running on resource-limited devices. Responding to this challenge, the independent research team POKDARTIK (ICT Awareness Community Group, Pemalang, Indonesia) through the WiTi4Bit project has released experimental notes that are interesting to listen to.
Through a report entitled "Analysis of Threshold Configuration Effects on Compression Ratio and Logit Fidelity in Q4M Quantization of Gemma-3-270M-IT", they explored how to regulate Threshold affects tensor categorization, compression ratio, and logit fidelity in the Gemma-3-270M-IT
Understanding the Starting Point: Baseline Model and Q4M Format
The basic model (baseline) tested is Gemma-3-270M-IT in the representation bfloat16 (BF16), which consists of 236 tensors with a total file size of 536,223,056 bytes.
In the Q4M quantization methodology, each sub-block is designed to contain 32 elements. The storage structure per block is allocated 18 bytes—consisting of 2 bytes of FP16 scale and 16 bytes of 4-bit compressed data. This format results in an effective size of approximately 4.5 bits per quantized element. However, not all tensors are treated equally; The Threshold mechanism determines whether a tensor is categorized into the Q4M path or retained in the split-FP16 path.
Threshold A vs. Threshold B: Tensor Flow Contrast
In the experiments, we compare two different configurations labeled Threshold A and Threshold B, without revealing the internal numerical values used in the tensor categorization mechanism.
The tensor categorization results show very contrasting differences:
Threshold A (Aggressive Compression):
Directs 55 tensors to the Q4M path and 181 tensors to the split-FP16 path.
Results in a final file size of 193,342,400 bytes.
Achieves a compression ratio of 2.7742x with incredible storage reduction (storage reduction) of 63.95%.
Threshold B (Conservative Compression):
Only routes 1 tensor to the Q4M path, while the other 235 tensors are processed through the path split-FP16.
Produces a file size of 295,083,928 bytes.
Achieves a compression ratio of 1.8175x with storage savings of 44.98%.
Logit Fidelity Test: When Small Size Meets Accuracy
From an efficiency standpoint space, Threshold A is clearly the absolute winner as it is able to cut the model size by almost 64%.However, the efficiency of this measure comes at the cost of a compromise on numerical fidelity.
Based on the evaluation of logit fidelity metrics—including Cosine Similarity, Root Mean Square Error (RMSE), Mean Absolute Error (MAE), KL Divergence, and Negative Log-Likelihood (NLL)—revealed findings interesting:
Cosine Similarity: Threshold B scored higher cosine similarity numbers (closer to the baseline model) in various evaluation paths (Softmax and DR9).
Numerical Error (RMSE & MAE): The error value in Threshold B was recorded to be much lower than Threshold A, which indicates that the level of numerical deviation from the original model can be reduced to a minimum possible.
Probability Divergence: The KL Divergence and NLL metrics consistently show that Threshold B produces a probability distribution that is more in line with the original reference.
This finding confirms the existence of the classic trade-off law in model quantization: configurations with aggressive compression provide massive memory savings but sacrifice some logit accuracy, whereas conservative configurations preserve numerical integrity at the cost of larger file sizes
Conclusion and Resource Access
The experiments carried out by the Pokdartik team did not aim to introduce a new quantization algorithm, but rather to provide valuable empirical documentation regarding the behavior of the Threshold mechanism within the Precision Transition Dynamics (PTD) ecosystem. The choice of configuration must ultimately be adjusted to the priorities of the application scenario: whether the main focus is directed at extreme storage space efficiency or strictly maintaining the numerical accuracy of the model.
For researchers, developers, and Edge AI activists who wish to explore this methodology more comprehensively or test the quantization results model directly, please refer to the following official link:
Research Journal Documentation: Zenodo Record 23994346
Model Repository (Q4M): Hugging Face - WiTi4Bit/gemma-3-270m-it-qnm-4bit
Repository Model (2M Variant): Hugging Face - WiTi4Bit/gemma-3-270m-it-qnm-4bit-2m
Same Writing
Running LLM Inside ESP32 RAM: Evolution of the WiTiAI INT8 96K for a Standalone IoT Ecosystem
18 11 2026
A Deep Dive into WiTiAI 4-Bit: When Artificial Intelligence Meets the Extreme Efficiency of Low Power ARM CPUs
05 11 2026
POKDARTIK Introduces WiTiAI 4-Bit for Public Trial: An Efficient AI Solution Based on Gemma Models
03 11 2026
Commentary (1)
Wah ini yg dari videonya pak Onno ya :) , keren