text-generation-inference/integration-tests/models
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
..
__snapshots__ Improve the handling of quantized weights (#2250) 2024-09-25 05:27:40 +00:00
test_bloom_560m_sharded.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_bloom_560m.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_chat_llama.py Fix seeded output. (#1949) 2024-09-24 03:14:53 +00:00
test_completion_prompts.py Improve the handling of quantized weights (#2250) 2024-09-25 05:27:40 +00:00
test_flash_awq_sharded.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_flash_awq.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_flash_falcon.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_flash_gemma_gptq.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_flash_gemma.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_flash_gpt2.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_flash_grammar_llama.py fix: correctly index into mask when applying grammar (#1618) 2024-04-25 10:16:16 +03:00
test_flash_llama_exl2.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_flash_llama_gptq.py GPTQ CI improvements (#2151) 2024-09-25 05:21:03 +00:00
test_flash_llama_marlin_24.py Improve the handling of quantized weights (#2250) 2024-09-25 05:27:40 +00:00
test_flash_llama_marlin.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_flash_llama.py feat(server): only compute prefill logprobs when asked (#406) 2023-06-02 17:12:30 +02:00
test_flash_medusa.py Revamp medusa implementation so that every model can benefit. (#1588) 2024-04-25 09:13:03 +03:00
test_flash_mistral.py fix(router): fix openapi and add jsonschema validation (#1578) 2024-04-24 18:07:44 +03:00
test_flash_neox_sharded.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_flash_neox.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_flash_pali_gemma.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_flash_phi.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_flash_qwen2.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_flash_santacoder.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_flash_starcoder2.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_flash_starcoder_gptq.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_flash_starcoder.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_grammar_llama.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_grammar_response_format_llama.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_idefics2.py Refactor dead code - Removing all flash_xxx.py files. (#2166) 2024-09-25 05:20:28 +00:00
test_idefics.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_llava_next.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_lora_mistral.py feat: simple mistral lora integration tests (#2180) 2024-09-25 05:27:40 +00:00
test_mamba.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_mpt.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_mt0_base.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_neox_sharded.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_neox.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_t5_sharded.py Add pytest release marker (#2114) 2024-09-24 03:52:50 +00:00
test_tools_llama.py feat: improve tools to include name and add tests (#1693) 2024-06-03 15:39:47 +03:00