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
a528f350
Commit
a528f350
authored
Aug 17, 2024
by
zhuwenwen
Browse files
update fp16 model layout conversion conditions
parent
f82f451f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
vllm/model_executor/models/baichuan.py
vllm/model_executor/models/baichuan.py
+1
-1
vllm/model_executor/models/chatglm.py
vllm/model_executor/models/chatglm.py
+1
-1
vllm/model_executor/models/llama.py
vllm/model_executor/models/llama.py
+1
-1
vllm/model_executor/models/qwen.py
vllm/model_executor/models/qwen.py
+1
-1
vllm/model_executor/models/qwen2.py
vllm/model_executor/models/qwen2.py
+1
-1
No files found.
vllm/model_executor/models/baichuan.py
View file @
a528f350
...
@@ -404,7 +404,7 @@ class BaiChuanBaseForCausalLM(nn.Module):
...
@@ -404,7 +404,7 @@ class BaiChuanBaseForCausalLM(nn.Module):
default_weight_loader
)
default_weight_loader
)
weight_loader
(
param
,
loaded_weight
)
weight_loader
(
param
,
loaded_weight
)
if
self
.
use_llama_nn
:
if
self
.
use_llama_nn
and
self
.
quant_method
is
None
:
lay_key_words
=
[
lay_key_words
=
[
"self_attn.W_pack.weight"
,
"self_attn.W_pack.weight"
,
"self_attn.o_proj.weight"
,
"self_attn.o_proj.weight"
,
...
...
vllm/model_executor/models/chatglm.py
View file @
a528f350
...
@@ -404,7 +404,7 @@ class ChatGLMForCausalLM(nn.Module):
...
@@ -404,7 +404,7 @@ class ChatGLMForCausalLM(nn.Module):
default_weight_loader
)
default_weight_loader
)
weight_loader
(
param
,
loaded_weight
)
weight_loader
(
param
,
loaded_weight
)
if
self
.
use_llama_nn
:
if
self
.
use_llama_nn
and
self
.
quant_method
is
None
:
lay_key_words
=
[
lay_key_words
=
[
"self_attention.query_key_value.weight"
,
"self_attention.query_key_value.weight"
,
"self_attention.dense.weight"
,
"self_attention.dense.weight"
,
...
...
vllm/model_executor/models/llama.py
View file @
a528f350
...
@@ -453,7 +453,7 @@ class LlamaForCausalLM(nn.Module):
...
@@ -453,7 +453,7 @@ class LlamaForCausalLM(nn.Module):
default_weight_loader
)
default_weight_loader
)
weight_loader
(
param
,
loaded_weight
)
weight_loader
(
param
,
loaded_weight
)
if
self
.
use_llama_nn
:
if
self
.
use_llama_nn
and
self
.
quant_method
is
None
:
lay_key_words
=
[
lay_key_words
=
[
"self_attn.qkv_proj.weight"
,
"self_attn.qkv_proj.weight"
,
"self_attn.o_proj.weight"
,
"self_attn.o_proj.weight"
,
...
...
vllm/model_executor/models/qwen.py
View file @
a528f350
...
@@ -309,7 +309,7 @@ class QWenLMHeadModel(nn.Module):
...
@@ -309,7 +309,7 @@ class QWenLMHeadModel(nn.Module):
weight_loader
=
getattr
(
param
,
"weight_loader"
,
weight_loader
=
getattr
(
param
,
"weight_loader"
,
default_weight_loader
)
default_weight_loader
)
weight_loader
(
param
,
loaded_weight
)
weight_loader
(
param
,
loaded_weight
)
if
self
.
use_llama_nn
:
if
self
.
use_llama_nn
and
self
.
quant_method
is
None
:
lay_key_words
=
[
lay_key_words
=
[
"attn.c_attn.weight"
,
"attn.c_attn.weight"
,
"attn.c_proj.weight"
,
"attn.c_proj.weight"
,
...
...
vllm/model_executor/models/qwen2.py
View file @
a528f350
...
@@ -396,7 +396,7 @@ class Qwen2ForCausalLM(nn.Module):
...
@@ -396,7 +396,7 @@ class Qwen2ForCausalLM(nn.Module):
default_weight_loader
)
default_weight_loader
)
weight_loader
(
param
,
loaded_weight
)
weight_loader
(
param
,
loaded_weight
)
if
self
.
use_llama_nn
:
if
self
.
use_llama_nn
and
self
.
quant_method
is
None
:
lay_key_words
=
[
lay_key_words
=
[
"self_attn.qkv_proj.weight"
,
"self_attn.qkv_proj.weight"
,
"self_attn.o_proj.weight"
,
"self_attn.o_proj.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