text-generation-inference/server/text_generation_server/models/custom_modeling
drbh 30be188400
Fix: don't apply post layernorm in SiglipVisionTransformer (#2459)
* Fix: don't apply post layernorm in SiglipVisionTransformer

This fixes a bug with LLaVA Next when using Siglip as the vision model. LLaVA Next expects the output of the vision model to be the encoder outputs before layernorm (see original transformers implementation here: https://github.com/huggingface/transformers/blob/main/src/transformers/models/llava_next/modeling_llava_next.py#L813).

This also makes Siglip consistent with the existing Clip implementation:

https://github.com/huggingface/text-generation-inference/blob/main/server/text_generation_server/models/custom_modeling/clip.py#L613

* fix: adjust pali gemma for post layer norm and small refactors

---------

Co-authored-by: Travis Addair <tgaddair@gmail.com>
2024-08-26 17:04:46 -04:00
..
__init__.py feat(server): flash santacoder (#153) 2023-04-03 19:06:42 +02:00
bloom_modeling.py feat: add ruff and resolve issue (#2262) 2024-07-26 10:29:09 -04:00
clip.py feat: add ruff and resolve issue (#2262) 2024-07-26 10:29:09 -04:00
flash_cohere_modeling.py Prefix caching (#2402) 2024-08-20 11:15:30 +02:00
flash_dbrx_modeling.py Prefix caching (#2402) 2024-08-20 11:15:30 +02:00
flash_deepseek_v2_modeling.py Prefix caching (#2402) 2024-08-20 11:15:30 +02:00
flash_gemma2_modeling.py Prefix caching (#2402) 2024-08-20 11:15:30 +02:00
flash_gemma_modeling.py Prefix caching (#2402) 2024-08-20 11:15:30 +02:00
flash_gpt2_modeling.py Prefix caching (#2402) 2024-08-20 11:15:30 +02:00
flash_gptj_modeling.py add gptj modeling in TGI #2366 (CI RUN) (#2372) 2024-08-07 21:32:37 -04:00
flash_llama_modeling.py Prefix caching (#2402) 2024-08-20 11:15:30 +02:00
flash_mistral_modeling.py Prefix caching (#2402) 2024-08-20 11:15:30 +02:00
flash_mixtral_modeling.py Prefix caching (#2402) 2024-08-20 11:15:30 +02:00
flash_neox_modeling.py Prefix caching (#2402) 2024-08-20 11:15:30 +02:00
flash_pali_gemma_modeling.py Fix: don't apply post layernorm in SiglipVisionTransformer (#2459) 2024-08-26 17:04:46 -04:00
flash_phi_modeling.py Prefix caching (#2402) 2024-08-20 11:15:30 +02:00
flash_qwen2_modeling.py Prefix caching (#2402) 2024-08-20 11:15:30 +02:00
flash_rw_modeling.py Prefix caching (#2402) 2024-08-20 11:15:30 +02:00
flash_santacoder_modeling.py Prefix caching (#2402) 2024-08-20 11:15:30 +02:00
flash_starcoder2_modeling.py Prefix caching (#2402) 2024-08-20 11:15:30 +02:00
idefics2.py feat: add ruff and resolve issue (#2262) 2024-07-26 10:29:09 -04:00
idefics_config.py chore: add pre-commit (#1569) 2024-02-16 11:58:58 +01:00
idefics_image_processing.py feat: add ruff and resolve issue (#2262) 2024-07-26 10:29:09 -04:00
idefics_modeling.py enable HuggingFaceM4/idefics-9b in intel gpu (#2338) 2024-08-01 11:08:36 +02:00
idefics_perceiver.py feat: add ruff and resolve issue (#2262) 2024-07-26 10:29:09 -04:00
idefics_processing.py feat: add ruff and resolve issue (#2262) 2024-07-26 10:29:09 -04:00
idefics_vision.py feat: add ruff and resolve issue (#2262) 2024-07-26 10:29:09 -04:00
llava_next.py feat: add ruff and resolve issue (#2262) 2024-07-26 10:29:09 -04:00
mamba_modeling.py Refactor layers. (#1866) 2024-05-13 12:44:30 +02:00
mpt_modeling.py feat: add ruff and resolve issue (#2262) 2024-07-26 10:29:09 -04:00
neox_modeling.py feat: add ruff and resolve issue (#2262) 2024-07-26 10:29:09 -04:00
opt_modeling.py Fix the prefix for OPT model in opt_modelling.py #2370 (CI RUN) (#2371) 2024-08-07 23:14:02 -04:00
phi_modeling.py feat: add ruff and resolve issue (#2262) 2024-07-26 10:29:09 -04:00
siglip.py Fix: don't apply post layernorm in SiglipVisionTransformer (#2459) 2024-08-26 17:04:46 -04:00
t5_modeling.py feat: add ruff and resolve issue (#2262) 2024-07-26 10:29:09 -04:00
vlm.py feat: add ruff and resolve issue (#2262) 2024-07-26 10:29:09 -04:00