From 7c600440f7560348e571f021f2b2d1469de5264d Mon Sep 17 00:00:00 2001 From: Woosuk Kwon Date: Thu, 23 Nov 2023 23:04:44 -0800 Subject: [PATCH] Fix model docstrings (#1764) --- vllm/model_executor/models/aquila.py | 6 +----- vllm/model_executor/models/baichuan.py | 6 +----- vllm/model_executor/models/bloom.py | 6 +----- vllm/model_executor/models/chatglm.py | 6 +----- vllm/model_executor/models/gpt2.py | 6 +----- vllm/model_executor/models/gpt_bigcode.py | 6 +----- vllm/model_executor/models/gpt_j.py | 6 +----- vllm/model_executor/models/gpt_neox.py | 6 +----- vllm/model_executor/models/llama.py | 6 +----- vllm/model_executor/models/mistral.py | 6 +----- vllm/model_executor/models/opt.py | 6 +----- vllm/model_executor/models/phi_1_5.py | 6 +----- vllm/model_executor/models/qwen.py | 6 +----- vllm/model_executor/models/yi.py | 6 +----- 14 files changed, 14 insertions(+), 70 deletions(-) diff --git a/vllm/model_executor/models/aquila.py b/vllm/model_executor/models/aquila.py index 8372da56..889239cd 100644 --- a/vllm/model_executor/models/aquila.py +++ b/vllm/model_executor/models/aquila.py @@ -20,11 +20,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Inference-only LLaMA model compatible with HuggingFace weights. - -The input of the model is flattened to a 1D tensor of tokens. The model uses -InputMetadata to extract the original 2D shape of the input. -""" +"""Inference-only LLaMA model compatible with HuggingFace weights.""" from typing import Any, Dict, List, Optional, Tuple import torch diff --git a/vllm/model_executor/models/baichuan.py b/vllm/model_executor/models/baichuan.py index 93cbc1a8..61cc2192 100644 --- a/vllm/model_executor/models/baichuan.py +++ b/vllm/model_executor/models/baichuan.py @@ -17,11 +17,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Inference-only BaiChuan model compatible with HuggingFace weights. - -The input of the model is flattened to a 1D tensor of tokens. The model uses -InputMetadata to extract the original 2D shape of the input. -""" +"""Inference-only BaiChuan model compatible with HuggingFace weights.""" import math from typing import List, Optional, Tuple diff --git a/vllm/model_executor/models/bloom.py b/vllm/model_executor/models/bloom.py index 0eb3fdbb..99ccd744 100644 --- a/vllm/model_executor/models/bloom.py +++ b/vllm/model_executor/models/bloom.py @@ -15,11 +15,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Inference-only BLOOM model compatible with HuggingFace weights. - -The input of the model is flattened to a 1D tensor of tokens. The model uses -InputMetadata to extract the original 2D shape of the input. -""" +"""Inference-only BLOOM model compatible with HuggingFace weights.""" import math from typing import List, Optional, Tuple diff --git a/vllm/model_executor/models/chatglm.py b/vllm/model_executor/models/chatglm.py index 2a113a15..db426a94 100644 --- a/vllm/model_executor/models/chatglm.py +++ b/vllm/model_executor/models/chatglm.py @@ -1,11 +1,7 @@ # coding=utf-8 # Adapted from # https://github.com/THUDM/ChatGLM2-6B -"""Inference-only ChatGLM model compatible with THUDM weights. - -The input of the model is flattened to a 1D tensor of tokens. The model uses -InputMetadata to extract the original 2D shape of the input. -""" +"""Inference-only ChatGLM model compatible with THUDM weights.""" from typing import List, Optional, Tuple import torch diff --git a/vllm/model_executor/models/gpt2.py b/vllm/model_executor/models/gpt2.py index 0f9f74d3..5dce59f7 100644 --- a/vllm/model_executor/models/gpt2.py +++ b/vllm/model_executor/models/gpt2.py @@ -16,11 +16,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Inference-only GPT-2 model compatible with HuggingFace weights. - -The input of the model is flattened to a 1D tensor of tokens. The model uses -InputMetadata to extract the original 2D shape of the input. -""" +"""Inference-only GPT-2 model compatible with HuggingFace weights.""" from typing import List, Optional, Tuple import torch diff --git a/vllm/model_executor/models/gpt_bigcode.py b/vllm/model_executor/models/gpt_bigcode.py index 47a5d771..9b69fc90 100644 --- a/vllm/model_executor/models/gpt_bigcode.py +++ b/vllm/model_executor/models/gpt_bigcode.py @@ -17,11 +17,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Inference-only GPTBigCode model compatible with HuggingFace weights. - -The input of the model is flattened to a 1D tensor of tokens. The model uses -InputMetadata to extract the original 2D shape of the input. -""" +"""Inference-only GPTBigCode model compatible with HuggingFace weights.""" from typing import List, Optional, Tuple import torch diff --git a/vllm/model_executor/models/gpt_j.py b/vllm/model_executor/models/gpt_j.py index 9093d642..1f0f7d42 100644 --- a/vllm/model_executor/models/gpt_j.py +++ b/vllm/model_executor/models/gpt_j.py @@ -15,11 +15,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Inference-only GPT-J model compatible with HuggingFace weights. - -The input of the model is flattened to a 1D tensor of tokens. The model uses -InputMetadata to extract the original 2D shape of the input. -""" +"""Inference-only GPT-J model compatible with HuggingFace weights.""" from typing import List, Optional, Tuple import torch diff --git a/vllm/model_executor/models/gpt_neox.py b/vllm/model_executor/models/gpt_neox.py index 8c0667d8..b289ddc5 100644 --- a/vllm/model_executor/models/gpt_neox.py +++ b/vllm/model_executor/models/gpt_neox.py @@ -15,11 +15,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Inference-only GPT-NeoX model compatible with HuggingFace weights. - -The input of the model is flattened to a 1D tensor of tokens. The model uses -InputMetadata to extract the original 2D shape of the input. -""" +"""Inference-only GPT-NeoX model compatible with HuggingFace weights.""" from typing import List, Optional, Tuple import torch diff --git a/vllm/model_executor/models/llama.py b/vllm/model_executor/models/llama.py index c3192e80..8e7344da 100644 --- a/vllm/model_executor/models/llama.py +++ b/vllm/model_executor/models/llama.py @@ -20,11 +20,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Inference-only LLaMA model compatible with HuggingFace weights. - -The input of the model is flattened to a 1D tensor of tokens. The model uses -InputMetadata to extract the original 2D shape of the input. -""" +"""Inference-only LLaMA model compatible with HuggingFace weights.""" from typing import Any, Dict, List, Optional, Tuple import torch diff --git a/vllm/model_executor/models/mistral.py b/vllm/model_executor/models/mistral.py index 793e25b6..d1857261 100644 --- a/vllm/model_executor/models/mistral.py +++ b/vllm/model_executor/models/mistral.py @@ -20,11 +20,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Inference-only Mistral model compatible with HuggingFace weights. - -The input of the model is flattened to a 1D tensor of tokens. The model uses -InputMetadata to extract the original 2D shape of the input. -""" +"""Inference-only Mistral model compatible with HuggingFace weights.""" from typing import List, Optional, Tuple import torch diff --git a/vllm/model_executor/models/opt.py b/vllm/model_executor/models/opt.py index 4c8ff596..8d88ccd7 100644 --- a/vllm/model_executor/models/opt.py +++ b/vllm/model_executor/models/opt.py @@ -16,11 +16,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Inference-only OPT model compatible with HuggingFace weights. - -The input of the model is flattened to a 1D tensor of tokens. The model uses -InputMetadata to extract the original 2D shape of the input. -""" +"""Inference-only OPT model compatible with HuggingFace weights.""" from typing import List, Optional, Tuple import torch diff --git a/vllm/model_executor/models/phi_1_5.py b/vllm/model_executor/models/phi_1_5.py index 18cd40f3..7ef61460 100644 --- a/vllm/model_executor/models/phi_1_5.py +++ b/vllm/model_executor/models/phi_1_5.py @@ -34,11 +34,7 @@ # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -"""Inference-only Phi-1.5 model compatible with HuggingFace weights. - -The input of the model is flattened to a 1D tensor of tokens. The model uses -InputMetadata to extract the original 2D shape of the input. -""" +"""Inference-only Phi-1.5 model compatible with HuggingFace weights.""" from typing import List, Optional, Tuple import torch diff --git a/vllm/model_executor/models/qwen.py b/vllm/model_executor/models/qwen.py index ce13cae7..d581838f 100644 --- a/vllm/model_executor/models/qwen.py +++ b/vllm/model_executor/models/qwen.py @@ -3,11 +3,7 @@ # https://huggingface.co/Qwen/Qwen-7B/blob/main/modeling_qwen.py # Copyright (c) Alibaba Cloud. # LICENSE: https://huggingface.co/Qwen/Qwen-7B/blob/main/LICENSE -"""Inference-only QWen model compatible with HuggingFace weights. - -The input of the model is flattened to a 1D tensor of tokens. The model uses -InputMetadata to extract the original 2D shape of the input. -""" +"""Inference-only QWen model compatible with HuggingFace weights.""" from typing import Any, Dict, List, Optional, Tuple import torch diff --git a/vllm/model_executor/models/yi.py b/vllm/model_executor/models/yi.py index 8faa106f..c4571328 100644 --- a/vllm/model_executor/models/yi.py +++ b/vllm/model_executor/models/yi.py @@ -20,11 +20,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Inference-only Yi model (https://01.ai) compatible with HuggingFace weights. - -The input of the model is flattened to a 1D tensor of tokens. The model uses -InputMetadata to extract the original 2D shape of the input. -""" +"""Inference-only Yi model (https://01.ai) compatible with HuggingFace weights.""" from typing import Any, Dict, List, Optional, Tuple import torch