text-generation-inference/server
Daniël de Kok 2dd680b799 Improve the handling of quantized weights (#2250)
* Improve the handling of quantized weights

Handling of quantized weights was split between two mechanisms:

- For quantized checkpoints, we used the new weight loader
  infrastructure.
- For quantization while loading (EETQ, FP8, bitsandbytes) we
  instead relied on conditional in `get_linear`.

Weight loaders support context managers to selectively load
particular layers with different weight loaders, which is useful
for models like Idefics2 AWQ, which uses a quantized text model,
but unquantized vision and connector models. However, the context
manager would be overrided by `get_linear`, which string-checks
`quantizer`. Also, the context manager would not work with
EETQ, FP8, and bitsandbytes.

This change migrates all quantizers to the weight loader infrastructure.
This has several benefits:

- We can use context managers with all quantizers.
- All the implementation details move down to the quantizer layers,
  `get_linear` does not need to know how to handle quantizer linear
  layers.
- All quantizer weights are strongly typed, we don't pass around
  raw tensors.
- We don't have to pass around the `quantizer` string everywhere.

* Exclude non-MLP layers when using FP8 quantization with Llama
2024-09-25 05:27:40 +00:00
..
custom_kernels chore: add pre-commit (#1569) 2024-04-24 15:32:02 +03:00
exllama_kernels MI300 compatibility (#1764) 2024-07-17 05:36:58 +00:00
exllamav2_kernels chore: add pre-commit (#1569) 2024-04-24 15:32:02 +03:00
marlin Add support for FP8 on compute capability >=8.0, <8.9 (#2213) 2024-09-25 05:27:40 +00:00
tests Improve the handling of quantized weights (#2250) 2024-09-25 05:27:40 +00:00
text_generation_server Improve the handling of quantized weights (#2250) 2024-09-25 05:27:40 +00:00
.gitignore Impl simple mamba model (#1480) 2024-04-23 11:45:11 +03:00
Makefile fix: Remove bitsandbytes installation when running cpu-only install (#2216) 2024-09-25 05:27:40 +00:00
Makefile-awq chore: add pre-commit (#1569) 2024-04-24 15:32:02 +03:00
Makefile-eetq Upgrade EETQ (Fixes the cuda graphs). (#1729) 2024-04-25 17:58:27 +03:00
Makefile-flash-att Hotfixing make install. (#2008) 2024-09-24 03:29:29 +00:00
Makefile-flash-att-v2 Hotfixing make install. (#2008) 2024-09-24 03:29:29 +00:00
Makefile-lorax-punica Enable multiple LoRa adapters (#2010) 2024-09-24 03:55:04 +00:00
Makefile-selective-scan chore: add pre-commit (#1569) 2024-04-24 15:32:02 +03:00
Makefile-vllm Update LLMM1 bound (#2050) 2024-09-24 03:42:29 +00:00
poetry.lock Making make install work better by default. (#2004) 2024-09-24 03:29:29 +00:00
pyproject.toml Making make install work better by default. (#2004) 2024-09-24 03:29:29 +00:00
README.md chore: add pre-commit (#1569) 2024-04-24 15:32:02 +03:00
requirements_cuda.txt Modifing the version number. 2024-07-17 05:36:58 +00:00
requirements_intel.txt reable xpu, broken by gptq and setuptool upgrade (#1988) 2024-09-24 03:26:17 +00:00
requirements_rocm.txt Modifing the version number. 2024-07-17 05:36:58 +00:00

Text Generation Inference Python gRPC Server

A Python gRPC server for Text Generation Inference

Install

make install

Run

make run-dev