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
8793a9f7
Unverified
Commit
8793a9f7
authored
Sep 27, 2023
by
Casper
Committed by
GitHub
Sep 27, 2023
Browse files
Merge pull request #80 from casper-hansen/low_cpu_mem_example
Add low_cpu_mem_usage=True in example
parents
1c5ccc79
aa6497cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/basic_quant.py
examples/basic_quant.py
+1
-1
No files found.
examples/basic_quant.py
View file @
8793a9f7
...
@@ -7,7 +7,7 @@ quant_config = { "zero_point": True, "q_group_size": 128, "w_bit": 4, "version":
...
@@ -7,7 +7,7 @@ quant_config = { "zero_point": True, "q_group_size": 128, "w_bit": 4, "version":
# Load model
# Load model
# NOTE: pass safetensors=True to load safetensors
# NOTE: pass safetensors=True to load safetensors
model
=
AutoAWQForCausalLM
.
from_pretrained
(
model_path
)
model
=
AutoAWQForCausalLM
.
from_pretrained
(
model_path
,
**
{
"low_cpu_mem_usage"
:
True
}
)
tokenizer
=
AutoTokenizer
.
from_pretrained
(
model_path
,
trust_remote_code
=
True
)
tokenizer
=
AutoTokenizer
.
from_pretrained
(
model_path
,
trust_remote_code
=
True
)
# Quantize
# Quantize
...
...
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