Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
f112086f
Commit
f112086f
authored
Feb 15, 2025
by
zhuwenwen
Browse files
update test_moe.py
parent
a75021db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tests/kernels/test_moe.py
tests/kernels/test_moe.py
+2
-2
No files found.
tests/kernels/test_moe.py
View file @
f112086f
...
...
@@ -171,8 +171,8 @@ def test_mixtral_moe(dtype: torch.dtype):
for
i
in
range
(
config
.
num_local_experts
):
weights
=
(
hf_moe
.
experts
[
i
].
w1
.
weight
.
data
,
hf_moe
.
experts
[
i
].
w3
.
weight
.
data
)
vllm_moe
.
experts
.
w13_weight
[
i
][:]
=
torch
.
cat
(
weights
,
dim
=
0
)
vllm_moe
.
experts
.
w2_weight
[
i
][:]
=
hf_moe
.
experts
[
i
].
w2
.
weight
.
data
vllm_moe
.
experts
.
w13_weight
[
i
][:]
=
(
torch
.
cat
(
weights
,
dim
=
0
)
).
T
vllm_moe
.
experts
.
w2_weight
[
i
][:]
=
(
hf_moe
.
experts
[
i
].
w2
.
weight
.
data
).
T
# Generate input batch of dimensions [batch_size, seq_len, hidden_dim]
hf_inputs
=
torch
.
randn
((
1
,
64
,
config
.
hidden_size
)).
to
(
dtype
).
to
(
"cuda"
)
...
...
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