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
4caf1539
Commit
4caf1539
authored
Jul 20, 2024
by
zhuwenwen
Browse files
use two method to add bias
parent
767bb050
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
vllm/model_executor/layers/linear.py
vllm/model_executor/layers/linear.py
+4
-1
No files found.
vllm/model_executor/layers/linear.py
View file @
4caf1539
...
@@ -115,7 +115,10 @@ class UnquantizedLinearMethod(LinearMethodBase):
...
@@ -115,7 +115,10 @@ class UnquantizedLinearMethod(LinearMethodBase):
if
self
.
use_llama_nn
:
if
self
.
use_llama_nn
:
if
bias
is
not
None
:
if
bias
is
not
None
:
if
len
(
x
.
shape
)
==
2
:
return
torch
.
addmm
(
bias
,
x
,
weight
)
return
torch
.
addmm
(
bias
,
x
,
weight
)
else
:
return
torch
.
matmul
(
x
,
weight
)
+
bias
else
:
else
:
return
torch
.
matmul
(
x
,
weight
)
return
torch
.
matmul
(
x
,
weight
)
else
:
else
:
...
...
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