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
9653385f
Commit
9653385f
authored
Jul 20, 2024
by
gaoqiong
Browse files
去掉调试信息
parent
835bd9fc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
10 deletions
+1
-10
vllm/model_executor/layers/linear.py
vllm/model_executor/layers/linear.py
+1
-6
vllm/model_executor/models/llama.py
vllm/model_executor/models/llama.py
+0
-4
No files found.
vllm/model_executor/layers/linear.py
View file @
9653385f
...
...
@@ -108,19 +108,14 @@ class UnquantizedLinearMethod(LinearMethodBase):
x
:
torch
.
Tensor
,
bias
:
Optional
[
torch
.
Tensor
]
=
None
)
->
torch
.
Tensor
:
weight
=
layer
.
weight
#print("**************matmul weight.shape:",weight.shape)
#print("self.use_llama_nn:",self.use_llama_nn)
if
self
.
separate_bias_add
:
#print("********self.separate_bias_add")
if
bias
is
not
None
:
return
F
.
linear
(
x
,
weight
)
+
bias
return
F
.
linear
(
x
,
weight
)
if
self
.
use_llama_nn
:
# print("**************matmul input.shape:",x.shape)
# print("**************matmul weight.shape:",weight.shape)
if
bias
is
not
None
:
return
torch
.
matmul
(
x
,
weight
)
+
bias
...
...
vllm/model_executor/models/llama.py
View file @
9653385f
...
...
@@ -459,14 +459,10 @@ class LlamaForCausalLM(nn.Module):
#print("key:\n",key)
matches
=
re
.
findall
(
combined_words
,
layername
)
if
matches
:
#print(layername)
# print(weight.data)
#创建一个跟value一样大的tensor
_weight
=
torch
.
zeros_like
(
weight
.
data
)
ori_shape
=
_weight
.
shape
# if layername=="model.layers.0.self_attn.qkv_proj.weight":
# print("weight.data[0:5][0:5]:",weight.data[0:5][0:5])
ops
.
trans_w16_gemm
(
_weight
,
weight
.
data
,
_weight
.
shape
[
0
],
_weight
.
shape
[
1
])
weight
.
data
.
copy_
(
_weight
)
...
...
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