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
bitsandbytes
Commits
e4e13db8
Unverified
Commit
e4e13db8
authored
Aug 17, 2022
by
David Silin
Committed by
GitHub
Aug 17, 2022
Browse files
fix param name
parent
9d60b3c5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
README.md
README.md
+3
-3
No files found.
README.md
View file @
e4e13db8
...
...
@@ -23,12 +23,12 @@ Resources:
1.
Comment out torch.nn.Linear:
``#linear = torch.nn.Linear(...)``
2.
Add bnb 8-bit linear light module:
``linear = bnb.nn.Linear8bitLt(...)``
(base arguments stay the same)
3.
There are two modes:
-
Mixed 8-bit training with 16-bit main weights. Pass the argument
``
use
_fp16_weights=True``
(default)
-
Int8 inference. Pass the argument
``
use
_fp16_weights=False``
-
Mixed 8-bit training with 16-bit main weights. Pass the argument
``
has
_fp16_weights=True``
(default)
-
Int8 inference. Pass the argument
``
has
_fp16_weights=False``
4.
To use the full LLM.int8() method, use the
``threshold=k``
argument. We recommend
``k=6.0``
.
```
python
# LLM.int8()
linear
=
bnb
.
nn
.
Linear8bitLt
(
dim1
,
dim2
,
bias
=
True
,
use
_fp16_weights
=
False
,
threshold
=
6.0
)
linear
=
bnb
.
nn
.
Linear8bitLt
(
dim1
,
dim2
,
bias
=
True
,
has
_fp16_weights
=
False
,
threshold
=
6.0
)
# inputs need to be fp16
out
=
linear
(
x
.
to
(
torch
.
float16
))
```
...
...
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