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
661047f1
Unverified
Commit
661047f1
authored
Oct 05, 2023
by
Casper
Committed by
GitHub
Oct 05, 2023
Browse files
Remove warning
parent
1d0e1285
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 deletions
+2
-10
awq/models/mistral.py
awq/models/mistral.py
+2
-10
No files found.
awq/models/mistral.py
View file @
661047f1
import
logging
from
typing
import
Dict
from
.base
import
BaseAWQForCausalLM
try
:
from
transformers.models.mistral.modeling_mistral
import
MistralDecoderLayer
,
MistralForCausalLM
except
:
# TODO: Remove once released on PyPi
logging
.
warning
(
"You need the latest transformers 4.34.0.dev0: pip install -U git+https://github.com/huggingface/transformers.git"
)
MistralForCausalLM
=
None
MistralDecoderLayer
=
None
from
transformers.models.mistral.modeling_mistral
import
MistralDecoderLayer
,
MistralForCausalLM
class
MistralAWQForCausalLM
(
BaseAWQForCausalLM
):
layer_type
=
"MistralDecoderLayer"
...
...
@@ -157,4 +149,4 @@ class MistralFuser:
def
fuse_mlp
(
self
):
for
name
,
module
in
self
.
mlp_modules
:
mlp
=
QuantLlamaMLP
(
module
.
gate_proj
,
module
.
down_proj
,
module
.
up_proj
)
set_module_name
(
self
.
model
,
name
,
mlp
)
\ No newline at end of file
set_module_name
(
self
.
model
,
name
,
mlp
)
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