Skip to content

Commit a34a753

Browse files
youkaichaoLeiWang1999
authored andcommitted
[misc] comment to avoid future confusion about baichuan (vllm-project#9620)
Signed-off-by: youkaichao <youkaichao@gmail.com> Signed-off-by: LeiWang1999 <leiwang1999@outlook.com>
1 parent bd59fa1 commit a34a753

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

vllm/model_executor/models/baichuan.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,9 @@ def load_weights(self, weights: Iterable[Tuple[str, torch.Tensor]]):
432432

433433

434434
class BaichuanForCausalLM(BaiChuanBaseForCausalLM):
435-
"""Baichuan 13B and Baichuan2 7B/13B."""
435+
"""Baichuan 13B and Baichuan2 7B/13B.
436+
NOTE: the class name has a lower case 'c'.
437+
"""
436438

437439
def __init__(
438440
self,
@@ -450,7 +452,9 @@ def __init__(
450452

451453

452454
class BaiChuanForCausalLM(BaiChuanBaseForCausalLM):
453-
"""Baichuan 7B."""
455+
"""Baichuan 7B.
456+
NOTE: the class name has an upper case 'C'.
457+
"""
454458

455459
def __init__(
456460
self,

vllm/model_executor/models/registry.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@
2626
"AquilaModel": ("llama", "LlamaForCausalLM"),
2727
"AquilaForCausalLM": ("llama", "LlamaForCausalLM"), # AquilaChat2
2828
"ArcticForCausalLM": ("arctic", "ArcticForCausalLM"),
29-
"BaiChuanForCausalLM": ("baichuan", "BaiChuanForCausalLM"), # baichuan-7b
30-
"BaichuanForCausalLM": ("baichuan", "BaichuanForCausalLM"), # baichuan-13b
29+
# baichuan-7b, upper case 'C' in the class name
30+
"BaiChuanForCausalLM": ("baichuan", "BaiChuanForCausalLM"),
31+
# baichuan-13b, lower case 'c' in the class name
32+
"BaichuanForCausalLM": ("baichuan", "BaichuanForCausalLM"),
3133
"BloomForCausalLM": ("bloom", "BloomForCausalLM"),
3234
# ChatGLMModel supports multimodal
3335
"CohereForCausalLM": ("commandr", "CohereForCausalLM"),

0 commit comments

Comments
 (0)