Roy2144 commited on
Commit
877c144
·
verified ·
1 Parent(s): 84ceb30

Added README.md with benchmark details

Browse files
Files changed (1) hide show
  1. README.md +75 -0
README.md ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Quantized LLaMA vLLM Inference Project
2
+
3
+ ## 🚀 Project Overview
4
+ This project benchmarks the inference performance of:
5
+ - **vLLM** server with **Quantized (W8A8)** Mistral-7B model.
6
+ - **Hugging Face Transformers** with **Meta-LLaMA-3.1-8B-Instruct** float16 model.
7
+
8
+ We compare:
9
+ - Average latency (seconds)
10
+ - Throughput (tokens/sec)
11
+ - Output quality for same prompts
12
+
13
+ ---
14
+
15
+ ## 🖥️ System Setup
16
+
17
+ - **GPU**: A100-SXM4-40GB
18
+ - **CUDA**: 12.4
19
+ - **Driver**: 550.54.15
20
+ - **Environment**: Google Colab Virtual Environment (`llm_comp`)
21
+
22
+ ---
23
+
24
+ ## ⚙️ Tools Used
25
+
26
+ - [vLLM](https://github.com/vllm-project/vllm) (OpenAI API server for optimized LLM inference)
27
+ - [llmcompressor](https://github.com/vllm-project/llm-compressor) (Quantization compression toolkit)
28
+ - Hugging Face Transformers
29
+ - PyTorch
30
+
31
+ ---
32
+
33
+ ## 🛠 Workflow
34
+
35
+ 1. **Quantized** `mistralai/Mistral-7B-Instruct-v0.2` model using `SmoothQuant + GPTQModifier (W8A8)`.
36
+ 2. **Uploaded** quantized model to Hugging Face Hub: `Roy2144/Meta-LLama`.
37
+ 3. **Started** vLLM server to serve quantized model.
38
+ 4. **Benchmark 1**:
39
+ - vLLM + Quantized Mistral
40
+ - 5 prompts
41
+ - Measured average latency and tokens/sec.
42
+ 5. **Benchmark 2**:
43
+ - HF Transformers + Meta-LLaMA-3.1-8B-Instruct
44
+ - 5 prompts
45
+ - Measured average latency and tokens/sec.
46
+ 6. **Compared** speed, memory usage, and quality.
47
+
48
+ ---
49
+
50
+ ## 📈 Benchmark Results
51
+
52
+ | Metric | vLLM + Quantized Mistral-7B W8A8 | HF Transformers + Meta-LLaMA-3.1-8B fp16 |
53
+ |:-------|:---------------------------------|:---------------------------------------|
54
+ | Avg Latency | 0.62 s | 2.66 s |
55
+ | Avg Throughput | 163.99 tokens/sec | 30.46 tokens/sec |
56
+
57
+ ---
58
+
59
+ ## 🧠 Conclusion
60
+
61
+ - **vLLM + Quantization** massively improves inference speed (~4-5x faster).
62
+ - **Output quality** remains acceptable even after W8A8 quantization.
63
+ - **HF Transformers float16** slower but preserves maximum precision.
64
+
65
+ **vLLM is strongly recommended** for scalable production deployment of quantized LLMs!
66
+
67
+ ---
68
+
69
+ ## ✍️ Future Work
70
+
71
+ - Multi-user load testing with GuideLLM.
72
+ - Full chatbot webapp via Gradio frontend.
73
+ - Stress test up to 50 concurrent users.
74
+
75
+ ---