Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Misc]: duplicate BaiChuanForCausalLM #9619

Closed
1 task done
youkaichao opened this issue Oct 23, 2024 · 3 comments · Fixed by #9620
Closed
1 task done

[Misc]: duplicate BaiChuanForCausalLM #9619

youkaichao opened this issue Oct 23, 2024 · 3 comments · Fixed by #9620
Labels

Comments

@youkaichao
Copy link
Member

Anything you want to discuss about vllm.

class BaichuanForCausalLM(BaiChuanBaseForCausalLM):
"""Baichuan 13B and Baichuan2 7B/13B."""
def __init__(
self,
config: PretrainedConfig,
cache_config: Optional[CacheConfig] = None,
quant_config: Optional[QuantizationConfig] = None,
lora_config: Optional[LoRAConfig] = None,
):
if config.hidden_size == 4096: # baichuan2 7b
super().__init__(config, "ROPE", cache_config, quant_config,
lora_config)
else: # baichuan 13b, baichuan2 13b
super().__init__(config, "ALIBI", cache_config, quant_config,
lora_config)
class BaiChuanForCausalLM(BaiChuanBaseForCausalLM):
"""Baichuan 7B."""
def __init__(
self,
config: PretrainedConfig,
cache_config: Optional[CacheConfig] = None,
quant_config: Optional[QuantizationConfig] = None,
lora_config: Optional[LoRAConfig] = None,
):
super().__init__(config, "ROPE", cache_config, quant_config,
lora_config)

BaichuanForCausalLM is defined twice, and the second one will overwrite the first one. which one should we keep?

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.
@DarkLight1337
Copy link
Member

DarkLight1337 commented Oct 23, 2024

Probably keep the first one? Since the 7B case in the first one also works for the second one. (Baichuan 7B config)

Remember that we'll have to update the registry accordingly to redirect HF BaiChuanForCausalLM to vLLM BaichuanForCausalLM.

@youkaichao
Copy link
Member Author

credit to @simon-mo

there’s one that is lower case and the other upper case C in Chuan.

@DarkLight1337
Copy link
Member

Oh, I thought you meant merging the classes together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants