Add Qwen 3.5 to FORCE_FLOAT32 (#4134)

* Add Qwen3.5 to FORCE_FLOAT32

* fix vision encoder dtype mismatch

* revert vision cast changes
This commit is contained in:
Etherll 2026-03-02 21:36:28 +02:00 committed by GitHub
commit fa0ff304ad
2 changed files with 2 additions and 0 deletions

View file

@ -106,6 +106,7 @@ FORCE_FLOAT32 = [
"gemma3text", # Gemma3TextModel (EmbeddingGemma, standalone text-only Gemma3)
"gemma3n",
"gpt_oss",
"qwen3_5", # Qwen3.5 RMSNorm uses (1+w) pattern like Gemma3, overflows float16
]
global DISABLE_COMPILE_MODEL_NAMES

View file

@ -1054,6 +1054,7 @@ class FastBaseModel:
do_forced_float32 = do_forced_float32,
correct_dtype = correct_dtype,
)
try:
model, tokenizer = patch_tokenizer(model, tokenizer)
except Exception as _patch_err: