Views
No views yet
llama.cpp and mixed-precision quantization.llama.cpp1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model = AutoModelForCausalLM.from_pretrained(
5 "ArslanRobo/llama-3.1-8b-instruct-smoothquant-fp16",
6 torch_dtype=torch.float16,
7 device_map="auto"
8)
9
10tokenizer = AutoTokenizer.from_pretrained(
11 "ArslanRobo/llama-3.1-8b-instruct-smoothquant-fp16"
12)
13Training Details
14Training Data
15No additional training data was used.
16The model weights are derived directly from the base LLaMA-3.1-8B-Instruct model.
17
18Training Procedure
19Preprocessing
20Activation statistics collected on WikiText-2
21
22SmoothQuant applied with α = 0.5
23
24FP16 precision preserved
25
26Training Hyperparameters
27Training regime: FP16 (no training, preprocessing only)
28
29Speeds, Sizes, Times
30Model size: ~15 GB (FP16)
31
32SmoothQuant calibration: ~5–10 minutes on NVIDIA T4
33
34Evaluation
35Testing Data, Factors & Metrics
36Testing Data
37WikiText-2 (used for calibration and analysis)
38
39Factors
40Activation outliers
41
42Weight distribution
43
44Quantization sensitivity
45
46Metrics
47Perplexity (evaluated post-quantization)
48
49Quantization MSE and SNR (simulated)
50
51Results
52SmoothQuant reduces quantization error
53
54Improves robustness for 4-bit and mixed-precision quantization
55
56Minimal impact on FP16 perplexity
57
58Model Examination
59Weight distribution smoothing
60
61Reduced activation outliers
62
63Improved numerical stability for low-bit quantization
64
65Environmental Impact
66Hardware Type: NVIDIA T4 GPU
67
68Hours used: ~1 hour
69
70Cloud Provider: Google Colab / Kaggle
71
72Compute Region: Not specified
73
74Carbon Emitted: Not measured
75
76Technical Specifications
77Model Architecture and Objective
78Decoder-only Transformer
79
80Causal language modeling objective
81
82Compute Infrastructure
83Hardware
84NVIDIA T4 GPU (16 GB VRAM)
85
86Software
87PyTorch
88
89Hugging Face Transformers
90
91Accelerate
92
93Datasets
94
95Citation
96BibTeX
97bibtex
98Copy code
99@article{xiao2023smoothquant,
100 title={SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models},
101 author={Xiao, Guangxuan and others},
102 journal={arXiv preprint arXiv:2211.10438},
103 year={2023}
104}
105APA
106Xiao, G., et al. (2023). SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models. arXiv:2211.10438.
107
108Model Card Authors
109Muhammad Arslan Rafiq