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