TOWARD DEMOCRATIZING LLMS: A FAST, ZERO-SHOT, CALIBRATION-FREE POST-TRAINING QUANTIZATION FRAMEWORK

TOWARD DEMOCRATIZING LLMS: A FAST, ZERO-SHOT, CALIBRATION-FREE POST-TRAINING QUANTIZATION FRAMEWORK. Masters thesis, King Fahd University of Petroleum and Minerals.

[img] PDF
g202315350_SamiUlHaq_Thesis.pdf - Accepted Version
Restricted to Repository staff only until 24 December 2026.
Available under License Creative Commons Attribution Non-commercial No Derivatives.

Download (6MB)

Arabic Abstract

في الآونة الأخيرة، أحدثت النماذج اللغوية الكبيرة (LLMs) ثورة في مجال الذكاء الاصطناعي؛ إلا أن أعداد معاملاتها الهائلة تشكل حاجزاً كبيراً أمام نشرها على الأجهزة الطرفية محدودة الموارد. وتعد مشكلة اختناق عرض نطاق الذاكرة تحدياً حرجاً للذكاء الاصطناعي واسع الانتشار، حيث يجب نقل مليارات الأوزان من الذاكرة إلى وحدات الحساب لكل رمز يتم إنشاؤه. وفي حين يوفر التكميم بعد التدريب (PTQ) مساراً عملياً للضغط، لا تزال الأساليب الحديثة تواجه قيوداً رئيسية: فهي إما تعتمد على بيانات معايرة مكلفة حسابياً، مما يهدد بفرط التخصيص أو عدم توفر البيانات، أو تستخدم تنسيقات دقة مختلطة غير ملائمة للأجهزة للتعامل مع القيم المتطرفة. لمعالجة هذه القيود، يطور هذا العمل إطار عمل للتكميم سريعاً، وخالياً من المعايرة، وموحد الدقة، ومحسناً لنشر النماذج بكفاءة على الأجهزة التجارية. نقوم بدراسة التقسيم الطبقي الإحصائي للقيم المتطرفة ونماذج التكميم المتجهي عبر ثلاث عائلات متنوعة من النماذج (Llama و OPT و BLOOM) تتراوح ما بين 125M إلى 13B معامل. وتحديداً، نقدم إطارين: التكميم الجماعي الهجين (HGQ)، الذي يستخدم استراتيجية "المسطرة المزدوجة" لفصل القيم المتطرفة دون الاعتماد على تنسيقات الدقة المختلطة، والتكميم المتجهي التكيفي المجمع (AGVQ)، الذي يتعلم كتب تشفير محلية لالتقاط هندسة المتجهات الفرعية. نتفوق بشكل كبير على خطوط الأساس الحديثة القائمة على المعايرة من حيث كفاءة المعالجة المسبقة. إذ يقلل HGQ وقت التكميم لنموذج Llama-2-13B من أكثر من 30 دقيقة إلى أقل من 20 ثانية (تسريع > 100 مرة) مع الحفاظ على مستوى التباس تنافسي. علاوة على ذلك، يحقق AGVQ دقة متميزة في مهام الاستدلال المنطقي السليم (بمتوسط 71.34%) على نموذج Llama-2-13B، مما يطابق أداء الدقة الأصلية (FP16) مع توفير ما يقرب من 74% من مساحة الذاكرة. تبرز هذه النتائج فعالية الأساليب الإحصائية الخالية من المعايرة في نشر النماذج اللغوية الكبيرة بدقة وكفاءة عالية.

English Abstract

Recently, Large Language Models (LLMs) have revolutionized artificial intelligence; however, their massive parameter counts create a significant barrier to deployment on resource-constrained edge devices. A critical challenge for ubiquitous AI is the memory bandwidth bottleneck, as billions of weights must be moved from memory to compute units for every generated token. While Post-Training Quantization (PTQ) offers a practical path to compression, existing state-of-the-art methods still struggle with major limitations: they either rely on computationally expensive calibration data, which risks overfitting or data unavailability, or use hardware-unfriendly mixed-precision formats to handle outliers. To address these limitations, this work develops a fast, calibration-free, and uniform-precision quantization framework optimized for efficient deployment on commodity hardware. We investigate statistical outlier stratification and vector quantization paradigms across three diverse model families (Llama, OPT, and BLOOM), ranging from 125M to 13B parameters. Specifically, we introduce two frameworks: Hybrid Group Quantization (HGQ), which employs a “Dual-Ruler” strategy to separate outliers without relying on mixed-precision formats, and Adaptive Grouped Vector Quantization (AGVQ), which learns local codebooks to capture sub-vector geometry. We substantially outperform state-of-the-art calibration-based baselines in terms of pre-processing efficiency. HGQ reduces the quantization run-time for Llama-2-13B from over 30 minutes to under 20 seconds (>100× speedup) while maintaining competitive perplexity. Furthermore, AGVQ achieves state-of-the-art zero-shot accuracy on common-sense reasoning tasks (71.34% average) on the Llama-2-13B model, matching the original FP16 performance while saving approximately 74% of the memory footprint. These results highlight the effectiveness of statistical, calibration-free approaches for democratizing accurate and efficient LLM deployment.

Item Type: Thesis (Masters)
Subjects: Computer
Engineering
Department: College of Computing and Mathematics > Computer Engineering
Committee Advisor: El-Maleh, Prof. Aiman Helmi (A. H.)
Committee Members: Siddiqui, Dr. Abdul Jabbar and Al-Suwaiyan, Dr. Ali S.
Depositing User: SAMI UL HAQ (g202315350)
Date Deposited: 25 Dec 2025 08:22
Last Modified: 25 Dec 2025 08:22
URI: http://eprints.kfupm.edu.sa/id/eprint/143873