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
AutoAWQ
Commits
e3936a44
Commit
e3936a44
authored
Sep 20, 2023
by
Casper Hansen
Browse files
Avoid fusing for larger Falcon models
parent
3256ffec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
awq/models/falcon.py
awq/models/falcon.py
+4
-1
No files found.
awq/models/falcon.py
View file @
e3936a44
...
@@ -7,7 +7,10 @@ class FalconAWQForCausalLM(BaseAWQForCausalLM):
...
@@ -7,7 +7,10 @@ class FalconAWQForCausalLM(BaseAWQForCausalLM):
@
staticmethod
@
staticmethod
def
fuse_layers
(
model
:
FalconForCausalLM
,
quant_config
:
dict
):
def
fuse_layers
(
model
:
FalconForCausalLM
,
quant_config
:
dict
):
fuser
=
FalconFuser
(
model
)
fuser
=
FalconFuser
(
model
)
fuser
.
fuse_transformer
()
# TODO: Implement correctly fused modules for Falcon 40B and Falcon 180B
if
model
.
config
.
num_attention_heads
==
71
:
fuser
.
fuse_transformer
()
@
staticmethod
@
staticmethod
def
get_model_layers
(
model
:
FalconForCausalLM
):
def
get_model_layers
(
model
:
FalconForCausalLM
):
...
...
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