Views
No views yet
mistralai/Mistral-7B-Instruct-v0.2, compressed using llmcompressor (a quantization toolkit developed by the vLLM team).1from llmcompressor.modifiers.quantization import GPTQModifier
2from llmcompressor.modifiers.smoothquant import SmoothQuantModifier
3from llmcompressor.transformers import oneshot
4
5recipe = [
6 SmoothQuantModifier(smoothing_strength=0.8),
7 GPTQModifier(scheme="W8A8", targets="Linear", ignore=["lm_head"]),
8]
9
10oneshot(
11 model="mistralai/Mistral-7B-Instruct-v0.2",
12....
13....
14)1from transformers import AutoTokenizer, AutoModelForCausalLM
2
3model = AutoModelForCausalLM.from_pretrained("Roy2144/Mistral-7B-Instruct-INT8")
4tokenizer = AutoTokenizer.from_pretrained("Roy2144/Mistral-7B-Instruct-INT8")
5
6inputs = tokenizer("Why is quantization useful for LLMs?", return_tensors="pt").to("cuda")
7outputs = model.generate(**inputs, max_new_tokens=64)
8
9print(tokenizer.decode(outputs[0], skip_special_tokens=True))transformers does not include optimized kernels for direct INT8 computation. So transformers (INT8) is optional here.| Metric | Transformers (INT8) | Transformers (FP16) | vLLM (INT8) |
|---|---|---|---|
| Avg Latency | 150,045 ms ❌ | 2,278 ms ✅ | 1,100 ms ⚡ |
| Throughput | 0.51 tokens/sec ❌ | 33.72 tokens/sec ✅ | 76.47 tokens/sec ⚡ |
| Peak VRAM | 20.5 GB ✅ | 29.0 GB ❌ | 20.5 GB ✅ |
mistralai/Mistral-7B-Instruct-v0.2 (base) and its quantized variantmax_new_tokens=64, batch_size=1
Mistral-7B-Instruct model using both:GuideLLM is a promising benchmarking tool that can simulate realistic OpenAI-style load and measure key inference metrics with concurrency and scale.