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
norm
vllm
Commits
2b981012
Unverified
Commit
2b981012
authored
Dec 09, 2023
by
firebook
Committed by
GitHub
Dec 08, 2023
Browse files
Fix Baichuan2-7B-Chat (#1987)
parent
6ccc0bff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
vllm/model_executor/models/baichuan.py
vllm/model_executor/models/baichuan.py
+6
-2
No files found.
vllm/model_executor/models/baichuan.py
View file @
2b981012
...
@@ -366,12 +366,16 @@ class BaiChuanBaseForCausalLM(nn.Module):
...
@@ -366,12 +366,16 @@ class BaiChuanBaseForCausalLM(nn.Module):
weight_loader
(
param
,
loaded_weight
)
weight_loader
(
param
,
loaded_weight
)
class
BaichuanForCausalLM
(
BaiChuanBaseForCausalLM
):
# baichuan 13b
class
BaichuanForCausalLM
(
BaiChuanBaseForCausalLM
):
# baichuan 13b, baichuan2 13b, baichuan2 7b
def
__init__
(
self
,
def
__init__
(
self
,
config
,
config
,
linear_method
:
Optional
[
LinearMethodBase
]
=
None
):
linear_method
:
Optional
[
LinearMethodBase
]
=
None
):
super
().
__init__
(
config
,
"ALIBI"
,
linear_method
)
if
config
.
hidden_size
==
4096
:
# baichuan2 7b
super
().
__init__
(
config
,
"ROPE"
,
linear_method
)
else
:
# baichuan 13b, baichuan2 13b
super
().
__init__
(
config
,
"ALIBI"
,
linear_method
)
class
BaiChuanForCausalLM
(
BaiChuanBaseForCausalLM
):
# baichuan 7b
class
BaiChuanForCausalLM
(
BaiChuanBaseForCausalLM
):
# baichuan 7b
...
...
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