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
norm
vllm
Commits
4934d492
Unverified
Commit
4934d492
authored
Dec 31, 2023
by
Jong-hun Shin
Committed by
GitHub
Dec 30, 2023
Browse files
Support GPT-NeoX Models without attention biases (#2301)
parent
358c328d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
vllm/model_executor/models/gpt_neox.py
vllm/model_executor/models/gpt_neox.py
+3
-0
No files found.
vllm/model_executor/models/gpt_neox.py
View file @
4934d492
...
@@ -54,6 +54,7 @@ class GPTNeoXAttention(nn.Module):
...
@@ -54,6 +54,7 @@ class GPTNeoXAttention(nn.Module):
self
.
total_num_heads
=
config
.
num_attention_heads
self
.
total_num_heads
=
config
.
num_attention_heads
self
.
hidden_size
=
config
.
hidden_size
self
.
hidden_size
=
config
.
hidden_size
self
.
head_size
=
self
.
hidden_size
//
self
.
total_num_heads
self
.
head_size
=
self
.
hidden_size
//
self
.
total_num_heads
self
.
bias
=
getattr
(
config
,
"attention_bias"
,
True
)
tensor_model_parallel_world_size
=
(
tensor_model_parallel_world_size
=
(
get_tensor_model_parallel_world_size
())
get_tensor_model_parallel_world_size
())
...
@@ -65,11 +66,13 @@ class GPTNeoXAttention(nn.Module):
...
@@ -65,11 +66,13 @@ class GPTNeoXAttention(nn.Module):
config
.
hidden_size
,
config
.
hidden_size
,
self
.
head_size
,
self
.
head_size
,
self
.
total_num_heads
,
self
.
total_num_heads
,
bias
=
self
.
bias
,
linear_method
=
linear_method
,
linear_method
=
linear_method
,
)
)
self
.
dense
=
RowParallelLinear
(
self
.
dense
=
RowParallelLinear
(
config
.
hidden_size
,
config
.
hidden_size
,
config
.
hidden_size
,
config
.
hidden_size
,
bias
=
self
.
bias
,
linear_method
=
linear_method
,
linear_method
=
linear_method
,
)
)
scaling
=
self
.
head_size
**-
0.5
scaling
=
self
.
head_size
**-
0.5
...
...
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