Skip to content

Commit

Permalink
Bump transformers to 4.39.3 (#1086)
Browse files Browse the repository at this point in the history
  • Loading branch information
dakinggg authored Apr 4, 2024
1 parent 06ff95f commit 607b982
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions llmfoundry/models/layers/attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,9 +501,10 @@ def forward(
value = value.view(bsz, seqlen, self.kv_n_heads * self.head_dim)
elif rotary_emb_w_meta_info['impl'] == 'hf':
if is_transformers_version_gte('4.38'):
(cos, sin) = rotary_emb(x=value,
position_ids=offset_info,
seq_len=None)
(cos, sin) = rotary_emb(
x=value,
position_ids=offset_info,
)
else:
(cos, sin) = rotary_emb(x=value, seq_len=seq_len)
if is_transformers_version_gte('4.38'):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
'mosaicml[libcloud,wandb,oci,gcs]>=0.21.1,<0.22',
'mlflow>=2.10,<3',
'accelerate>=0.25,<0.26', # for HF inference `device_map`
'transformers>=4.38.2,<4.39',
'transformers>=4.39.3,<4.40',
'mosaicml-streaming>=0.7.4,<0.8',
'torch>=2.2.1,<2.3',
'datasets>=2.16,<2.17',
Expand Down

0 comments on commit 607b982

Please sign in to comment.