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
a64d407d
Unverified
Commit
a64d407d
authored
Aug 06, 2024
by
drbh
Committed by
GitHub
Aug 06, 2024
Browse files
fix: default num_ln_in_parallel_attn to one if not supplied (#2364)
parent
1768c00b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
server/text_generation_server/models/custom_modeling/flash_rw_modeling.py
...ration_server/models/custom_modeling/flash_rw_modeling.py
+3
-1
No files found.
server/text_generation_server/models/custom_modeling/flash_rw_modeling.py
View file @
a64d407d
...
@@ -473,7 +473,9 @@ class FlashRWLayer(nn.Module):
...
@@ -473,7 +473,9 @@ class FlashRWLayer(nn.Module):
class
FlashRWLayerNorm
(
nn
.
Module
):
class
FlashRWLayerNorm
(
nn
.
Module
):
def
__init__
(
self
,
config
,
prefix
:
str
,
weights
):
def
__init__
(
self
,
config
,
prefix
:
str
,
weights
):
super
().
__init__
()
super
().
__init__
()
self
.
num_ln
=
config
.
num_ln_in_parallel_attn
# Falcon2 includes the number of layer norms in the config
# in the case no number of layer norms is provided, we default to 1
self
.
num_ln
=
getattr
(
config
,
"num_ln_in_parallel_attn"
,
1
)
if
self
.
num_ln
==
1
:
if
self
.
num_ln
==
1
:
self
.
input_ln
=
FastLayerNorm
.
load
(
self
.
input_ln
=
FastLayerNorm
.
load
(
...
...
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