Bump up transformers version & Remove MistralConfig (#1254)

This commit is contained in:
Woosuk Kwon
2023-10-13 10:05:26 -07:00
committed by GitHub
parent ec3b5ce9cc
commit e7c8555d06
6 changed files with 4 additions and 81 deletions

View File

@@ -17,15 +17,6 @@ _CONFIG_REGISTRY = {
def get_config(model: str,
trust_remote_code: bool,
revision: Optional[str] = None) -> PretrainedConfig:
# NOTE: Because the Mistral model in HF hub does not have
# `configuration_mistral.py`, we cannot use `AutoConfig` to load the
# config. Instead, we use `MistralConfig` directly.
# NOTE: This is a hack. This does not work for local models.
# FIXME: Remove this once the Mistral model is available in the stable
# version of HF transformers.
if "mistral" in model.lower():
return MistralConfig.from_pretrained(model, revision=revision)
try:
config = AutoConfig.from_pretrained(
model, trust_remote_code=trust_remote_code, revision=revision)