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
change
sglang
Commits
f0e15dc6
Unverified
Commit
f0e15dc6
authored
Jan 11, 2025
by
Xiaoyu Zhang
Committed by
GitHub
Jan 11, 2025
Browse files
[HotFix] fix fp8 scale load failed in tp>1 (#2837)
parent
f1769586
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
python/sglang/srt/layers/linear.py
python/sglang/srt/layers/linear.py
+2
-7
No files found.
python/sglang/srt/layers/linear.py
View file @
f0e15dc6
...
@@ -437,7 +437,7 @@ class ColumnParallelLinear(LinearBase):
...
@@ -437,7 +437,7 @@ class ColumnParallelLinear(LinearBase):
if
len
(
loaded_weight
.
shape
)
==
0
:
if
len
(
loaded_weight
.
shape
)
==
0
:
assert
loaded_weight
.
numel
()
==
1
assert
loaded_weight
.
numel
()
==
1
loaded_weight
=
loaded_weight
.
reshape
(
1
)
loaded_weight
=
loaded_weight
.
reshape
(
1
)
load_column_parallel_weight
(
param
,
loaded_weight
,
self
.
tp_rank
)
param
.
load_column_parallel_weight
(
loaded_weight
=
loaded_weight
)
def
forward
(
self
,
input_
):
def
forward
(
self
,
input_
):
bias
=
self
.
bias
if
not
self
.
skip_bias_add
else
None
bias
=
self
.
bias
if
not
self
.
skip_bias_add
else
None
...
@@ -1247,12 +1247,7 @@ class RowParallelLinear(LinearBase):
...
@@ -1247,12 +1247,7 @@ class RowParallelLinear(LinearBase):
assert
loaded_weight
.
numel
()
==
1
assert
loaded_weight
.
numel
()
==
1
loaded_weight
=
loaded_weight
.
reshape
(
1
)
loaded_weight
=
loaded_weight
.
reshape
(
1
)
load_row_parallel_weight
(
param
.
load_row_parallel_weight
(
loaded_weight
=
loaded_weight
)
param
,
loaded_weight
,
self
.
tp_rank
,
use_presharded_weights
=
self
.
use_presharded_weights
,
)
def
forward
(
self
,
input_
):
def
forward
(
self
,
input_
):
if
self
.
input_is_parallel
:
if
self
.
input_is_parallel
:
...
...
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