Skip to content

Commit e7c8555

Browse files
authored
Bump up transformers version & Remove MistralConfig (#1254)
1 parent ec3b5ce commit e7c8555

File tree

6 files changed

+4
-81
lines changed

6 files changed

+4
-81
lines changed

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ pyarrow # Required for Ray data.
66
sentencepiece # Required for LLaMA tokenizer.
77
numpy
88
torch == 2.0.1
9-
transformers >= 4.33.1 # Required for Code Llama.
10-
xformers == 0.0.22
9+
transformers >= 4.34.0 # Required for Mistral.
10+
xformers == 0.0.22 # Required for Mistral.
1111
fastapi
1212
uvicorn[standard]
1313
pydantic < 2 # Required for OpenAI server.

vllm/model_executor/models/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
from vllm.model_executor.models.gpt_neox import GPTNeoXForCausalLM
1010
from vllm.model_executor.models.internlm import InternLMForCausalLM
1111
from vllm.model_executor.models.llama import LlamaForCausalLM
12+
from vllm.model_executor.models.mistral import MistralForCausalLM
1213
from vllm.model_executor.models.mpt import MPTForCausalLM
1314
from vllm.model_executor.models.opt import OPTForCausalLM
1415
from vllm.model_executor.models.qwen import QWenLMHeadModel
15-
from vllm.model_executor.models.mistral import MistralForCausalLM
1616

1717
__all__ = [
1818
"AquilaForCausalLM",

vllm/model_executor/models/mistral.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
import torch
3131
from torch import nn
32+
from transformers import MistralConfig
3233

3334
from vllm.model_executor.input_metadata import InputMetadata
3435
from vllm.model_executor.layers.activation import SiluAndMul
@@ -44,7 +45,6 @@
4445
convert_pyslice_to_tensor, hf_model_weights_iterator,
4546
load_tensor_parallel_weights, load_padded_tensor_parallel_vocab)
4647
from vllm.sequence import SamplerOutput
47-
from vllm.transformers_utils.configs.mistral import MistralConfig
4848

4949
KVCache = Tuple[torch.Tensor, torch.Tensor]
5050

vllm/transformers_utils/config.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,6 @@
1717
def get_config(model: str,
1818
trust_remote_code: bool,
1919
revision: Optional[str] = None) -> PretrainedConfig:
20-
# NOTE: Because the Mistral model in HF hub does not have
21-
# `configuration_mistral.py`, we cannot use `AutoConfig` to load the
22-
# config. Instead, we use `MistralConfig` directly.
23-
# NOTE: This is a hack. This does not work for local models.
24-
# FIXME: Remove this once the Mistral model is available in the stable
25-
# version of HF transformers.
26-
if "mistral" in model.lower():
27-
return MistralConfig.from_pretrained(model, revision=revision)
28-
2920
try:
3021
config = AutoConfig.from_pretrained(
3122
model, trust_remote_code=trust_remote_code, revision=revision)

vllm/transformers_utils/configs/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@
66
# tiiuae/falcon-7b(-instruct) models. Newer Falcon models will use the
77
# `FalconConfig` class from the official HuggingFace transformers library.
88
from vllm.transformers_utils.configs.falcon import RWConfig
9-
from vllm.transformers_utils.configs.mistral import MistralConfig
109

1110
__all__ = [
1211
"MPTConfig",
1312
"BaiChuanConfig",
1413
"AquilaConfig",
1514
"QWenConfig",
1615
"RWConfig",
17-
"MistralConfig",
1816
]

vllm/transformers_utils/configs/mistral.py

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)