Update gemma.py
This commit is contained in:
parent
637d01643c
commit
cf16811ab9
1 changed files with 3 additions and 2 deletions
|
|
@ -631,8 +631,9 @@ class FastGemmaModel(FastLlamaModel):
|
|||
# Downcast RoPE embedding to correct data type
|
||||
if (name.endswith("rotary_emb") or hasattr(module, "cos_cached")) \
|
||||
and (module.cos_cached.dtype != expected_dtype):
|
||||
module.cos_cached = module.cos_cached.to(expected_dtype)
|
||||
module.sin_cached = module.sin_cached.to(expected_dtype)
|
||||
|
||||
module.cos_cached = module.cos_cached.to(expected_dtype)
|
||||
module.sin_cached = module.sin_cached.to(expected_dtype)
|
||||
pass
|
||||
pass
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue