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
2e46eefc
Unverified
Commit
2e46eefc
authored
May 28, 2024
by
EtienneDosSantos
Committed by
GitHub
May 28, 2024
Browse files
Sorted alphabetically for better overview
parent
227d904d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
32 deletions
+32
-32
bitsandbytes/functional.py
bitsandbytes/functional.py
+32
-32
No files found.
bitsandbytes/functional.py
View file @
2e46eefc
...
...
@@ -27,11 +27,24 @@ name2qmap = {}
if
lib
and
lib
.
compiled_with_cuda
:
"""C FUNCTIONS FOR OPTIMIZERS"""
str2optimizer32bit
=
{
"adagrad"
:
(
lib
.
cadagrad32bit_grad_32
,
lib
.
cadagrad32bit_grad_16
,
),
"adam"
:
(
lib
.
cadam32bit_grad_fp32
,
lib
.
cadam32bit_grad_fp16
,
lib
.
cadam32bit_grad_bf16
,
),
"lamb"
:
(
lib
.
cadam32bit_grad_fp32
,
lib
.
cadam32bit_grad_fp16
,
),
"lion"
:
(
lib
.
clion32bit_grad_fp32
,
lib
.
clion32bit_grad_fp16
,
lib
.
clion32bit_grad_bf16
,
),
"momentum"
:
(
lib
.
cmomentum32bit_grad_32
,
lib
.
cmomentum32bit_grad_16
,
...
...
@@ -40,19 +53,6 @@ if lib and lib.compiled_with_cuda:
lib
.
crmsprop32bit_grad_32
,
lib
.
crmsprop32bit_grad_16
,
),
"lion"
:
(
lib
.
clion32bit_grad_fp32
,
lib
.
clion32bit_grad_fp16
,
lib
.
clion32bit_grad_bf16
,
),
"adagrad"
:
(
lib
.
cadagrad32bit_grad_32
,
lib
.
cadagrad32bit_grad_16
,
),
"lamb"
:
(
lib
.
cadam32bit_grad_fp32
,
lib
.
cadam32bit_grad_fp16
,
),
}
str2optimizer8bit
=
{
...
...
@@ -60,34 +60,43 @@ if lib and lib.compiled_with_cuda:
lib
.
cadam_static_8bit_grad_32
,
lib
.
cadam_static_8bit_grad_16
,
),
"momentum"
:
(
"lamb"
:
(
lib
.
cadam_static_8bit_grad_32
,
lib
.
cadam_static_8bit_grad_16
,
),
"lars"
:
(
lib
.
cmomentum_static_8bit_grad_32
,
lib
.
cmomentum_static_8bit_grad_16
,
),
"rmsprop"
:
(
lib
.
crmsprop_static_8bit_grad_32
,
lib
.
crmsprop_static_8bit_grad_16
,
),
"lion"
:
(
lib
.
clion_static_8bit_grad_32
,
lib
.
clion_static_8bit_grad_16
,
),
"lamb"
:
(
lib
.
cadam_static_8bit_grad_32
,
lib
.
cadam_static_8bit_grad_16
,
),
"lars"
:
(
"momentum"
:
(
lib
.
cmomentum_static_8bit_grad_32
,
lib
.
cmomentum_static_8bit_grad_16
,
),
"rmsprop"
:
(
lib
.
crmsprop_static_8bit_grad_32
,
lib
.
crmsprop_static_8bit_grad_16
,
),
}
str2optimizer8bit_blockwise
=
{
"adagrad"
:
(
lib
.
cadagrad_8bit_blockwise_grad_fp32
,
lib
.
cadagrad_8bit_blockwise_grad_fp16
,
),
"adam"
:
(
lib
.
cadam_8bit_blockwise_grad_fp32
,
lib
.
cadam_8bit_blockwise_grad_fp16
,
lib
.
cadam_8bit_blockwise_grad_bf16
,
),
"lion"
:
(
lib
.
clion_8bit_blockwise_grad_fp32
,
lib
.
clion_8bit_blockwise_grad_fp16
,
lib
.
clion_8bit_blockwise_grad_bf16
,
),
"momentum"
:
(
lib
.
cmomentum_8bit_blockwise_grad_fp32
,
lib
.
cmomentum_8bit_blockwise_grad_fp16
,
...
...
@@ -96,15 +105,6 @@ if lib and lib.compiled_with_cuda:
lib
.
crmsprop_8bit_blockwise_grad_fp32
,
lib
.
crmsprop_8bit_blockwise_grad_fp16
,
),
"lion"
:
(
lib
.
clion_8bit_blockwise_grad_fp32
,
lib
.
clion_8bit_blockwise_grad_fp16
,
lib
.
clion_8bit_blockwise_grad_bf16
,
),
"adagrad"
:
(
lib
.
cadagrad_8bit_blockwise_grad_fp32
,
lib
.
cadagrad_8bit_blockwise_grad_fp16
,
),
}
...
...
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