# Formatted Paper Outline

**Format Applied:** Master's Thesis (Engineering/CS Structure)
**Style Guide:** APA 7th Edition (Citations) + IEEE-style Section Numbering (Structure)
**Target Venue:** University Repository (aligned with MLSys/ISCA standards)
**Word Target:** 25,000 - 30,000 words
**Chapters:** 8

---

## Formatting Requirements

### Manuscript Specifications
- **Font:** Times New Roman, 12pt
- **Line Spacing:** Double spaced (standard for thesis review)
- **Margins:** 1.5" Left (for binding), 1" Top/Bottom/Right
- **Page Numbers:** Top Right (Header)
- **Headings:** Decimal Numbering (1.0, 1.1, 1.1.1)

### ⚠️ CITATION REQUIREMENTS - CRITICAL

**Default Style:** APA 7th Edition

**In-text citation format:**
```
✅ CORRECT: (Dettmers et al., 2022)
✅ CORRECT: Frantar and Alistarh (2023) demonstrated that...
❌ WRONG: [1] - Do not use bracketed numbers for APA
```

**Reference list requirements:**
- **Order:** Alphabetical by author.
- **DOIs:** Mandatory for all journal articles and conference proceedings (e.g., NeurIPS, ICML, ISCA).
- **Preprints:** If citing arXiv, verify if a peer-reviewed version exists first.

---

## Formatted Structure

### Title Page
**Title:** Bridging the Latency Gap: Hardware-Native Quantization Strategies for Large Language Models on Integer-Only Architectures
**Author:** [Your Name]
**Degree:** Master of Science in [Field]
**Institution:** [University Name]
**Date:** [Month, Year]

### Abstract
**Heading:** Abstract (Centered, Bold, No Number)
**Length:** 350-500 words
**Structure:**
1.  **Context:** The deployment constraints of LLMs on edge devices.
2.  **Problem:** The "Latency Gap"—disconnect between theoretical 4-bit compression and actual wall-clock speed due to activation-aware overheads.
3.  **Method:** Introduction of "Hardware-Native" quantization; specific focus on integer-only datapath optimization.
4.  **Results:** Quantitative summary (e.g., "achieved X% latency reduction with only Y% perplexity degradation").
5.  **Conclusion:** Validation of instruction-set aligned suppression for real-time inference.

---

## Chapter 1: Introduction
**Length:** ~2,000 words

### 1.1 Background and Motivation
- The exponential growth of LLM parameters (7B -> 70B -> 175B).
- The "Memory Wall" and "Compute Wall" in edge deployment.
- Brief introduction to Quantization (INT8, INT4) as the standard solution.

### 1.2 Problem Statement
- **The Core Conflict:** Advanced quantization methods (like AWQ) preserve accuracy but introduce complex packing/unpacking routines.
- **The Gap:** These routines create runtime overhead that negates the theoretical speedup on integer-only hardware.
- **Research Question:** *How can quantization strategies for Large Language Models be optimized to eliminate the disconnect between theoretical compression rates and real-world inference latency on integer-only hardware?*

### 1.3 Research Objectives
1.  To characterize the latency overhead introduced by current activation-aware quantization methods.
2.  To develop a "Hardware-Native" outlier suppression strategy aligned with SIMD/INT8 instruction sets.
3.  To evaluate the trade-off between perplexity (accuracy) and instruction cycle count (latency).

### 1.4 Thesis Contributions
- **Analytical:** A breakdown of the "latency gap" in existing state-of-the-art (SOTA) methods.
- **Technical:** A novel quantization pipeline minimizing runtime de-quantization.
- **Empirical:** Extensive benchmarks comparing the proposed method against AWQ and GPTQ on target hardware.

### 1.5 Thesis Organization
- Roadmap of the subsequent 7 chapters.

---

## Chapter 2: Literature Review & Background
**Length:** ~5,000 words

### 2.1 Large Language Model Inference
- Transformer architecture basics (focus on GEMM operations).
- Inference bottlenecks: Memory bandwidth vs. Compute bound.

### 2.2 Theory of Quantization
- **2.2.1 Post-Training Quantization (PTQ) vs. QAT.**
- **2.2.2 Symmetric vs. Asymmetric Quantization.**
- **2.2.3 Granularity:** Per-tensor, per-channel, per-group.

### 2.3 State-of-the-Art in LLM Quantization
- **Weight-Only Quantization:** GPTQ, AWQ, SpQR.
- **Activation Quantization:** SmoothQuant, LLM.int8().
- **Analysis of Limitations:** Why current SOTA fails on specific integer-only pipelines (focus on the overhead of outlier management).

---

## Chapter 3: Methodology (System Design)
**Length:** ~4,500 words
*Note: This chapter covers the theoretical design of your solution.*

### 3.1 The "Hardware-Native" Hypothesis
- Definition of hardware-native constraints.
- Theoretical formulation of the proposed suppression strategy.

### 3.2 Analysis of Outlier Distribution
- Statistical analysis of activation outliers in target models (e.g., LLaMA-2, Mistral).
- **Figure 1:** Heatmap of activation outliers across transformer layers.

### 3.3 Proposed Architecture: Instruction-Aligned Quantization
- **3.3.1 Pre-processing:** Static analysis and calibration.
- **3.3.2 Runtime Execution:** Eliminating dynamic re-quantization steps.
- **3.3.3 Memory Layout:** Optimizing for SIMD loads.

---

## Chapter 4: Implementation Details
**Length:** ~4,000 words
*Note: This chapter covers the engineering realization.*

### 4.1 Hardware & Software Stack
- Target Hardware: [Specific CPU/GPU/Accelerator architecture].
- Software Environment: PyTorch, CUDA/C++ Kernels, TVM (if used).

### 4.2 Kernel Optimization
- Custom INT8 kernel development.
- Handling packing/unpacking at the register level.
- **Code Snippet 1:** Comparison of standard vs. optimized de-quantization loop (pseudocode).

### 4.3 Integration with Inference Engines
- How the method integrates into existing frameworks (e.g., vLLM, HuggingFace).

---

## Chapter 5: Experimental Setup
**Length:** ~2,500 words

### 5.1 Datasets and Models
- **Models:** LLaMA-2 (7B, 13B), Mistral 7B.
- **Calibration Data:** C4, Wikitext-2.
- **Evaluation Data:** MMLU, HumanEval (for downstream task accuracy).

### 5.2 Baselines
- FP16 (Uncompressed).
- INT8 (Standard).
- AWQ (Current SOTA for activation awareness).
- GPTQ.

### 5.3 Evaluation Metrics
- **Accuracy:** Perplexity (PPL), Zero-shot accuracy.
- **Performance:** End-to-end Latency (ms), Token generation speed (tok/s), Kernel execution time.
- **Efficiency:** Memory footprint (GB).

---

## Chapter 6: Results and Analysis
**Length:** ~5,000 words

### 6.1 Accuracy Preservation
- Comparison of Perplexity scores.
- **Table 1:** Perplexity degradation across models and methods.

### 6.2 Latency Analysis
- **6.2.1 End-to-End Speedup:** Wall-clock time comparison.
- **Figure 2:** Bar chart showing speedup relative to FP16 baseline.
- **6.2.2 Kernel-Level Profiling:** Breakdown of time spent in GEMM vs. Overhead.

### 6.3 Ablation Studies
- Impact of block size on latency vs. accuracy.
- Impact of calibration set size.

---

## Chapter 7: Discussion
**Length:** ~3,000 words

### 7.1 Interpretation of Findings
- Validating the hypothesis: Does "Hardware-Native" restore the speedup?
- The cost of accuracy: Is the minor PPL increase acceptable for the latency gain?

### 7.2 Theoretical Implications
- How this shifts the focus from "compression ratio" to "instruction efficiency."

### 7.3 Practical Implications
- Feasibility for deployment on mobile/edge devices.

### 7.4 Limitations
- Hardware specificity (does it generalize to other architectures?).
- Model scale (tested on 7B/13B, applicable to 70B?).

---

## Chapter 8: Conclusion and Future Work
**Length:** ~1,500 words

### 8.1 Summary of Thesis
- Restatement of the problem and the solution.

### 8.2 Key Takeaways
- Final verdict on the trade-off between outlier management and raw speed.

### 8.3 Future Directions
- Mixed-precision hardware support.
- Application to Vision-Language Models (VLMs).

---

## References
**Format:** APA 7th Edition
**Estimated Count:** 60-80 Citations

---

## Appendices
**Appendix A:** Detailed Kernel Code
**Appendix B:** Additional Perplexity Tables (Full Benchmarks)

---

## Quality Checklist for this Thesis

### Structure
- [ ] Does Chapter 2 adequately cover *why* AWQ is the current standard?
- [ ] Is the distinction between Chapter 3 (Design) and Chapter 4 (Implementation) clear?
- [ ] Do the Results (Chapter 6) directly answer the Research Question posed in Chapter 1?

### Formatting & Style
- [ ] **Table/Figure Numbering:** Ensure Global numbering (Table 1... Table N) never restarts at chapters.
- [ ] **Tense:** Use **Past Tense** for your experiments ("We measured...", "The kernel executed...") and **Present Tense** for established facts ("Transformers rely on...").
- [ ] **Citations:** Ensure no `[1]` brackets are used; strictly `(Author, Year)`.

### ⚠️ CRITICAL: Reference URL Check
- **DO NOT** use links to Semantic Scholar or ResearchGate.
- **DO** use links to: `https://doi.org/...` or `https://arxiv.org/...` (if no DOI exists).