Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
text-generation-inference
Commits
c6bcadf8
Unverified
Commit
c6bcadf8
authored
Jul 05, 2024
by
Aaron Mihalik
Committed by
GitHub
Jul 05, 2024
Browse files
Adding "longrope" for Phi-3 (#2172) (#2179)
Adding "longrope" for phi-3
parent
245d3de9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
server/text_generation_server/layers/rotary.py
server/text_generation_server/layers/rotary.py
+1
-1
No files found.
server/text_generation_server/layers/rotary.py
View file @
c6bcadf8
...
@@ -110,7 +110,7 @@ class PositionRotaryEmbedding(nn.Module):
...
@@ -110,7 +110,7 @@ class PositionRotaryEmbedding(nn.Module):
beta_fast
=
32
,
beta_fast
=
32
,
beta_slow
=
1
,
beta_slow
=
1
,
)
)
elif
rope_scaling
[
"type"
]
==
"su"
:
elif
rope_scaling
[
"type"
]
in
[
"su"
,
"longrope"
]
:
short_factor
=
torch
.
tensor
(
short_factor
=
torch
.
tensor
(
rope_scaling
[
"short_factor"
],
dtype
=
torch
.
float32
,
device
=
device
rope_scaling
[
"short_factor"
],
dtype
=
torch
.
float32
,
device
=
device
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment