Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
21063c11
Unverified
Commit
21063c11
authored
Nov 06, 2024
by
Aaron Pham
Committed by
GitHub
Nov 06, 2024
Browse files
[CI/Build] drop support for Python 3.8 EOL (#8464)
Signed-off-by:
Aaron Pham
<
contact@aarnphm.xyz
>
parent
4be3a451
Changes
115
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
18 additions
and
35 deletions
+18
-35
vllm/model_executor/models/mllama.py
vllm/model_executor/models/mllama.py
+0
-1
vllm/model_executor/models/mlp_speculator.py
vllm/model_executor/models/mlp_speculator.py
+1
-1
vllm/model_executor/models/molmo.py
vllm/model_executor/models/molmo.py
+3
-3
vllm/model_executor/models/mpt.py
vllm/model_executor/models/mpt.py
+0
-1
vllm/model_executor/models/nemotron.py
vllm/model_executor/models/nemotron.py
+0
-1
vllm/model_executor/models/olmo.py
vllm/model_executor/models/olmo.py
+0
-1
vllm/model_executor/models/opt.py
vllm/model_executor/models/opt.py
+0
-1
vllm/model_executor/models/orion.py
vllm/model_executor/models/orion.py
+0
-1
vllm/model_executor/models/persimmon.py
vllm/model_executor/models/persimmon.py
+0
-1
vllm/model_executor/models/phi.py
vllm/model_executor/models/phi.py
+0
-1
vllm/model_executor/models/phi3.py
vllm/model_executor/models/phi3.py
+0
-1
vllm/model_executor/models/phi3v.py
vllm/model_executor/models/phi3v.py
+0
-1
vllm/model_executor/models/phimoe.py
vllm/model_executor/models/phimoe.py
+0
-1
vllm/model_executor/models/pixtral.py
vllm/model_executor/models/pixtral.py
+5
-5
vllm/model_executor/models/qwen.py
vllm/model_executor/models/qwen.py
+0
-1
vllm/model_executor/models/qwen2.py
vllm/model_executor/models/qwen2.py
+3
-4
vllm/model_executor/models/qwen2_audio.py
vllm/model_executor/models/qwen2_audio.py
+0
-1
vllm/model_executor/models/qwen2_cls.py
vllm/model_executor/models/qwen2_cls.py
+3
-4
vllm/model_executor/models/qwen2_moe.py
vllm/model_executor/models/qwen2_moe.py
+0
-1
vllm/model_executor/models/qwen2_rm.py
vllm/model_executor/models/qwen2_rm.py
+3
-4
No files found.
vllm/model_executor/models/mllama.py
View file @
21063c11
# coding=utf-8
# Copyright 2024 the HuggingFace Inc. team. All rights reserved.
# Copyright 2024 the HuggingFace Inc. team. All rights reserved.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# Licensed under the Apache License, Version 2.0 (the "License");
...
...
vllm/model_executor/models/mlp_speculator.py
View file @
21063c11
...
@@ -37,7 +37,7 @@ class MLPSpeculatorLayerNorm(nn.Module):
...
@@ -37,7 +37,7 @@ class MLPSpeculatorLayerNorm(nn.Module):
eps
=
1e-06
,
eps
=
1e-06
,
elementwise_scale_and_shift
=
True
,
elementwise_scale_and_shift
=
True
,
):
):
super
(
MLPSpeculatorLayerNorm
,
self
).
__init__
()
super
().
__init__
()
self
.
elementwise_scale_and_shift
=
elementwise_scale_and_shift
self
.
elementwise_scale_and_shift
=
elementwise_scale_and_shift
if
self
.
elementwise_scale_and_shift
:
if
self
.
elementwise_scale_and_shift
:
self
.
weight
=
nn
.
Parameter
(
torch
.
empty
(
normalized_shape
))
self
.
weight
=
nn
.
Parameter
(
torch
.
empty
(
normalized_shape
))
...
...
vllm/model_executor/models/molmo.py
View file @
21063c11
...
@@ -1121,9 +1121,9 @@ class MolmoForCausalLM(nn.Module, SupportsMultiModal, SupportsPP):
...
@@ -1121,9 +1121,9 @@ class MolmoForCausalLM(nn.Module, SupportsMultiModal, SupportsPP):
batch_size
*
num_image
*
num_patch
,
-
1
).
contiguous
()
batch_size
*
num_image
*
num_patch
,
-
1
).
contiguous
()
image_input_idx
=
image_input_idx
*
valid
.
to
(
image_input_idx
.
dtype
)
image_input_idx
=
image_input_idx
*
valid
.
to
(
image_input_idx
.
dtype
)
offset
=
torch
.
cat
(
offset
=
torch
.
cat
(
[
seq_len
.
new_zeros
(
1
),
[
seq_len
.
new_zeros
(
seq_len
.
cumsum
(
dim
=
0
)[:
-
1
]],
(
1
)),
seq_len
.
cumsum
(
dim
=
0
)[:
-
1
]],
dim
=
0
)[:,
None
]
dim
=
0
)[:,
None
]
image_input_idx
=
image_input_idx
+
offset
.
to
(
image_input_idx
.
dtype
)
image_input_idx
=
image_input_idx
+
offset
.
to
(
image_input_idx
.
dtype
)
image_input_idx
=
image_input_idx
.
flatten
()[:,
None
]
image_input_idx
=
image_input_idx
.
flatten
()[:,
None
]
mat
=
image_input_idx
==
torch
.
arange
(
mat
=
image_input_idx
==
torch
.
arange
(
...
...
vllm/model_executor/models/mpt.py
View file @
21063c11
# coding=utf-8
# Adapted from https://huggingface.co/mosaicml/mpt-7b/tree/main
# Adapted from https://huggingface.co/mosaicml/mpt-7b/tree/main
import
math
import
math
from
typing
import
Iterable
,
List
,
Optional
,
Tuple
,
Union
from
typing
import
Iterable
,
List
,
Optional
,
Tuple
,
Union
...
...
vllm/model_executor/models/nemotron.py
View file @
21063c11
# coding=utf-8
# Adapted from
# Adapted from
# https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
# https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
# Copyright 2023 The vLLM team.
# Copyright 2023 The vLLM team.
...
...
vllm/model_executor/models/olmo.py
View file @
21063c11
# coding=utf-8
# Adapted from
# Adapted from
# https://github.com/huggingface/transformers/blob/v4.40.1/src/transformers/models/olmo/modeling_olmo.py
# https://github.com/huggingface/transformers/blob/v4.40.1/src/transformers/models/olmo/modeling_olmo.py
# Copyright 2024 The vLLM team.
# Copyright 2024 The vLLM team.
...
...
vllm/model_executor/models/opt.py
View file @
21063c11
# coding=utf-8
# Adapted from
# Adapted from
# https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/opt/modeling_opt.py
# https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/opt/modeling_opt.py
# Copyright 2023 The vLLM team.
# Copyright 2023 The vLLM team.
...
...
vllm/model_executor/models/orion.py
View file @
21063c11
# coding=utf-8
# Adapted from
# Adapted from
# https://huggingface.co/OrionStarAI/Orion-14B-Base/blob/main/modeling_orion.py
# https://huggingface.co/OrionStarAI/Orion-14B-Base/blob/main/modeling_orion.py
# Copyright (c) OrionStar Inc.
# Copyright (c) OrionStar Inc.
...
...
vllm/model_executor/models/persimmon.py
View file @
21063c11
# coding=utf-8
# adapted from https://github.com/huggingface/transformers/blob/v4.39.3/src/transformers/models/persimmon/modeling_persimmon.py
# adapted from https://github.com/huggingface/transformers/blob/v4.39.3/src/transformers/models/persimmon/modeling_persimmon.py
# Copyright 2023 The vLLM team.
# Copyright 2023 The vLLM team.
# Copyright 2023 EleutherAI and the HuggingFace Inc. team. All rights reserved.
# Copyright 2023 EleutherAI and the HuggingFace Inc. team. All rights reserved.
...
...
vllm/model_executor/models/phi.py
View file @
21063c11
# coding=utf-8
# Adapted from
# Adapted from
# https://huggingface.co/microsoft/phi-1_5/blob/main/modeling_phi.py
# https://huggingface.co/microsoft/phi-1_5/blob/main/modeling_phi.py
# Copyright 2023 The vLLM team.
# Copyright 2023 The vLLM team.
...
...
vllm/model_executor/models/phi3.py
View file @
21063c11
# coding=utf-8
# Adapted from llama.py
# Adapted from llama.py
"""Inference-only Phi3 model code inherit from Llama.py"""
"""Inference-only Phi3 model code inherit from Llama.py"""
...
...
vllm/model_executor/models/phi3v.py
View file @
21063c11
# coding=utf-8
# Copyright 2024 The vLLM team.
# Copyright 2024 The vLLM team.
# Copyright 2024 Microsoft and the HuggingFace Inc. team. All rights reserved.
# Copyright 2024 Microsoft and the HuggingFace Inc. team. All rights reserved.
#
#
...
...
vllm/model_executor/models/phimoe.py
View file @
21063c11
# coding=utf-8
# Adapted from
# Adapted from
# https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
# https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
# Copyright 2023 The vLLM team.
# Copyright 2023 The vLLM team.
...
...
vllm/model_executor/models/pixtral.py
View file @
21063c11
...
@@ -136,11 +136,11 @@ def input_processor_for_pixtral(ctx: InputContext, inputs: DecoderOnlyInputs):
...
@@ -136,11 +136,11 @@ def input_processor_for_pixtral(ctx: InputContext, inputs: DecoderOnlyInputs):
if
image_token_id
not
in
inputs
[
'prompt_token_ids'
]:
if
image_token_id
not
in
inputs
[
'prompt_token_ids'
]:
raise
ValueError
(
raise
ValueError
(
(
f
"You've passed
{
inputs
=
}
without
{
image_token_id
=
}
"
f
"You've passed
{
inputs
=
}
without
{
image_token_id
=
}
"
" Make sure to process your input via mistral_common's"
" Make sure to process your input via mistral_common's"
" tokenizer or pass a chat completion request. For more"
" tokenizer or pass a chat completion request. For more"
" For more info, see: "
" For more info, see: "
"https://github.com/vllm-project/vllm/issues/8411."
)
)
"https://github.com/vllm-project/vllm/issues/8411."
)
return
inputs
return
inputs
...
...
vllm/model_executor/models/qwen.py
View file @
21063c11
# coding=utf-8
# Adapted from
# Adapted from
# https://huggingface.co/Qwen/Qwen-7B/blob/main/modeling_qwen.py
# https://huggingface.co/Qwen/Qwen-7B/blob/main/modeling_qwen.py
# Copyright (c) Alibaba Cloud.
# Copyright (c) Alibaba Cloud.
...
...
vllm/model_executor/models/qwen2.py
View file @
21063c11
# coding=utf-8
# Adapted from
# Adapted from
# https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/qwen2/modeling_qwen2.py
# https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/qwen2/modeling_qwen2.py
# Copyright 2024 The Qwen team.
# Copyright 2024 The Qwen team.
...
@@ -417,9 +416,9 @@ class Qwen2ForCausalLM(nn.Module, SupportsLoRA, SupportsPP):
...
@@ -417,9 +416,9 @@ class Qwen2ForCausalLM(nn.Module, SupportsLoRA, SupportsPP):
and
hasattr
(
config
,
"max_window_layers"
)):
and
hasattr
(
config
,
"max_window_layers"
)):
raise
ValueError
(
"Sliding window for some but all layers is not "
raise
ValueError
(
"Sliding window for some but all layers is not "
"supported. This model uses sliding window "
"supported. This model uses sliding window "
"but `max_window_layers` =
%s
is less than "
"but `max_window_layers` =
{}
is less than "
"`num_hidden_layers` =
%s
. Please open an issue "
"`num_hidden_layers` =
{}
. Please open an issue "
"to discuss this feature."
%
(
"to discuss this feature."
.
format
(
config
.
max_window_layers
,
config
.
max_window_layers
,
config
.
num_hidden_layers
,
config
.
num_hidden_layers
,
))
))
...
...
vllm/model_executor/models/qwen2_audio.py
View file @
21063c11
# coding=utf-8
# Copyright 2024 The Qwen team.
# Copyright 2024 The Qwen team.
# Copyright 2023 The vLLM team.
# Copyright 2023 The vLLM team.
# Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved.
# Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved.
...
...
vllm/model_executor/models/qwen2_cls.py
View file @
21063c11
# coding=utf-8
# Adapted from
# Adapted from
# https://huggingface.co/Qwen/Qwen2.5-Math-RM-72B/blob/main/modeling_qwen2_rm.py
# https://huggingface.co/Qwen/Qwen2.5-Math-RM-72B/blob/main/modeling_qwen2_rm.py
# Copyright 2024 Kakao Corp. (Kanana-X Team)
# Copyright 2024 Kakao Corp. (Kanana-X Team)
...
@@ -60,9 +59,9 @@ class Qwen2ForSequenceClassification(nn.Module):
...
@@ -60,9 +59,9 @@ class Qwen2ForSequenceClassification(nn.Module):
and
hasattr
(
config
,
"max_window_layers"
)):
and
hasattr
(
config
,
"max_window_layers"
)):
raise
ValueError
(
"Sliding window for some but all layers is not "
raise
ValueError
(
"Sliding window for some but all layers is not "
"supported. This model uses sliding window "
"supported. This model uses sliding window "
"but `max_window_layers` =
%s
is less than "
"but `max_window_layers` =
{}
is less than "
"`num_hidden_layers` =
%s
. Please open an issue "
"`num_hidden_layers` =
{}
. Please open an issue "
"to discuss this feature."
%
(
"to discuss this feature."
.
format
(
config
.
max_window_layers
,
config
.
max_window_layers
,
config
.
num_hidden_layers
,
config
.
num_hidden_layers
,
))
))
...
...
vllm/model_executor/models/qwen2_moe.py
View file @
21063c11
# coding=utf-8
# Adapted from
# Adapted from
# https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/qwen2_moe/modeling_qwen2_moe.py
# https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/qwen2_moe/modeling_qwen2_moe.py
# Copyright 2024 The Qwen team.
# Copyright 2024 The Qwen team.
...
...
vllm/model_executor/models/qwen2_rm.py
View file @
21063c11
# coding=utf-8
# Adapted from
# Adapted from
# https://huggingface.co/Qwen/Qwen2.5-Math-RM-72B/blob/main/modeling_qwen2_rm.py
# https://huggingface.co/Qwen/Qwen2.5-Math-RM-72B/blob/main/modeling_qwen2_rm.py
# Copyright 2024 The Qwen team.
# Copyright 2024 The Qwen team.
...
@@ -71,9 +70,9 @@ class Qwen2ForRewardModel(nn.Module, SupportsPP):
...
@@ -71,9 +70,9 @@ class Qwen2ForRewardModel(nn.Module, SupportsPP):
and
hasattr
(
config
,
"max_window_layers"
)):
and
hasattr
(
config
,
"max_window_layers"
)):
raise
ValueError
(
"Sliding window for some but all layers is not "
raise
ValueError
(
"Sliding window for some but all layers is not "
"supported. This model uses sliding window "
"supported. This model uses sliding window "
"but `max_window_layers` =
%s
is less than "
"but `max_window_layers` =
{}
is less than "
"`num_hidden_layers` =
%s
. Please open an issue "
"`num_hidden_layers` =
{}
. Please open an issue "
"to discuss this feature."
%
(
"to discuss this feature."
.
format
(
config
.
max_window_layers
,
config
.
max_window_layers
,
config
.
num_hidden_layers
,
config
.
num_hidden_layers
,
))
))
...
...
Prev
1
2
3
4
5
6
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment