本页还没有译文
本页 16 段还没译成한국어,下面显示的是英文原文。GPTQModel
还没翻译译自英文(docs.vllm.ai)本页 16 段都还没译
GPTQModel
To create a new 4-bit or 8-bit GPTQ quantized model, you can leverage GPTQModel from ModelCloud.AI.
Quantization reduces the model's precision from BF16/FP16 (16-bits) to INT4 (4-bits) or INT8 (8-bits) which significantly reduces the total model memory footprint while at-the-same-time increasing inference performance.
Compatible GPTQModel quantized models can leverage the Marlin and Machete vLLM custom kernels to maximize batching
transactions-per-second tps and token-latency performance for both Ampere (A100+) and Hopper (H100+) Nvidia GPUs.
These two kernels are highly optimized by vLLM and NeuralMagic (now part of Redhat) to allow world-class inference performance of quantized GPTQ
models.
GPTQModel is one of the few quantization toolkits in the world that allows Dynamic per-module quantization where different layers and/or modules within a llm model can be further optimized with custom quantization parameters. Dynamic quantization
is fully integrated into vLLM and backed up by support from the ModelCloud.AI team. Please refer to GPTQModel readme
for more details on this and other advanced features.
Installation
You can quantize your own models by installing GPTQModel or picking one of the 5000+ models on Huggingface.
pip install -U gptqmodel --no-build-isolation -vQuantizing a model
After installing GPTQModel, you are ready to quantize a model. Please refer to the GPTQModel readme for further details.
Here is an example of how to quantize meta-llama/Llama-3.2-1B-Instruct:
Running a quantized model with vLLM
To run a GPTQModel quantized model with vLLM, you can use DeepSeek-R1-Distill-Qwen-7B-gptqmodel-4bit-vortex-v2 with the following command:
python examples/deployment/llm_engine_example.py \
--model ModelCloud/DeepSeek-R1-Distill-Qwen-7B-gptqmodel-4bit-vortex-v2Using GPTQModel with vLLM's Python API
GPTQModel quantized models are also supported directly through the LLM entrypoint: