You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,32 @@
1
1
# AutoFP8
2
2
3
+
Open-source FP8 quantization project for producting compressed checkpoints for running in vLLM - see https://github.com/vllm-project/vllm/pull/4332 for implementation.
4
+
5
+
# How to run quantized models
6
+
7
+
Install vLLM: `pip install vllm>=0.4.2`
8
+
9
+
Then simply pass the quantized checkpoint directly to vLLM's entrypoints! It will detect the checkpoint format using the `quantization_config` in the `config.json`.
10
+
```python
11
+
from vllm importLLM
12
+
model = LLM("nm-testing/Meta-Llama-3-8B-Instruct-FP8")
13
+
# INFO 05-06 10:06:23 model_runner.py:172] Loading model weights took 8.4596 GB
14
+
15
+
outputs = model.generate("Once upon a time,")
16
+
print(outputs[0].outputs[0].text)
17
+
# ' there was a beautiful princess who lived in a far-off kingdom. She was kind'
18
+
```
19
+
20
+
## How to quantize a model
21
+
3
22
Example model with static scales for activations and weights: https://huggingface.co/nm-testing/Meta-Llama-3-8B-Instruct-FP8
0 commit comments