Skip to content

Commit

Permalink
[Misc] Bump up transformers to v4.39.0 & Remove StarCoder2Config (vll…
Browse files Browse the repository at this point in the history
…m-project#3551)

Co-authored-by: Roy <jasonailu87@gmail.com>
Co-authored-by: Roger Meier <r.meier@siemens.com>
  • Loading branch information
3 people authored Mar 21, 2024
1 parent 8657323 commit c188ecb
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 76 deletions.
2 changes: 1 addition & 1 deletion requirements-rocm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ray >= 2.9
sentencepiece # Required for LLaMA tokenizer.
numpy
tokenizers>=0.15.0
transformers >= 4.38.0 # Required for Gemma.
transformers >= 4.39.0 # Required for StarCoder2.
fastapi
uvicorn[standard]
pydantic >= 2.0 # Required for OpenAI server.
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ray >= 2.9
sentencepiece # Required for LLaMA tokenizer.
numpy
torch == 2.1.2
transformers >= 4.38.0 # Required for Gemma.
transformers >= 4.39.0 # Required for StarCoder2.
xformers == 0.0.23.post1 # Required for CUDA 12.1.
fastapi
uvicorn[standard]
Expand Down
8 changes: 1 addition & 7 deletions vllm/model_executor/models/starcoder2.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import torch
from torch import nn
from transformers import Starcoder2Config

from vllm.model_executor.input_metadata import InputMetadata
from vllm.model_executor.sampling_metadata import SamplingMetadata
Expand All @@ -42,13 +43,6 @@
hf_model_weights_iterator)
from vllm.sequence import SamplerOutput

try:
from transformers import Starcoder2Config
except ImportError:
# fallback to PretrainedConfig
# NOTE: Please install transformers from source or use transformers>=4.39.0
from transformers import PretrainedConfig as Starcoder2Config

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


Expand Down
10 changes: 0 additions & 10 deletions vllm/transformers_utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"mpt": MPTConfig,
"RefinedWeb": RWConfig, # For tiiuae/falcon-40b(-instruct)
"RefinedWebModel": RWConfig, # For tiiuae/falcon-7b(-instruct)
"starcoder2": Starcoder2Config,
"jais": JAISConfig,
}

Expand All @@ -18,15 +17,6 @@ def get_config(model: str,
trust_remote_code: bool,
revision: Optional[str] = None,
code_revision: Optional[str] = None) -> PretrainedConfig:
# FIXME(woosuk): This is a temporary fix for StarCoder2.
# Remove this when the model is supported by HuggingFace transformers.
if "bigcode" in model and "starcoder2" in model:
config_class = _CONFIG_REGISTRY["starcoder2"]
config = config_class.from_pretrained(model,
revision=revision,
code_revision=code_revision)
return config

try:
config = AutoConfig.from_pretrained(
model,
Expand Down
2 changes: 0 additions & 2 deletions vllm/transformers_utils/configs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
# tiiuae/falcon-7b(-instruct) models. Newer Falcon models will use the
# `FalconConfig` class from the official HuggingFace transformers library.
from vllm.transformers_utils.configs.falcon import RWConfig
from vllm.transformers_utils.configs.starcoder2 import Starcoder2Config
from vllm.transformers_utils.configs.jais import JAISConfig

__all__ = [
"ChatGLMConfig",
"MPTConfig",
"RWConfig",
"Starcoder2Config",
"JAISConfig",
]
55 changes: 0 additions & 55 deletions vllm/transformers_utils/configs/starcoder2.py

This file was deleted.

0 comments on commit c188ecb

Please sign in to comment.