mirror of
https://github.com/saymrwulf/transformers.git
synced 2026-05-14 20:58:08 +00:00
style
This commit is contained in:
parent
b902568a1d
commit
196cf39446
1 changed files with 1 additions and 1 deletions
|
|
@ -4160,7 +4160,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
|
|||
# inside the Layers to the Model
|
||||
for buffer in {name for name, _ in model.named_buffers()}:
|
||||
rotary_module = None
|
||||
if "rotary_emb.inv_freq" in buffer and not "layer" in buffer:
|
||||
if "rotary_emb.inv_freq" in buffer and "layer" not in buffer:
|
||||
rotary_module = buffer.replace(".inv_freq", "")
|
||||
break
|
||||
if rotary_module is not None and rotary_module not in device_map:
|
||||
|
|
|
|||
Loading…
Reference in a new issue