Skip to content

Commit 3ac3c83

Browse files
committed
using next
Signed-off-by: wang.yuqi <[email protected]>
1 parent d113fbd commit 3ac3c83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vllm/model_executor/models/adapters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,9 @@ def load_weights_using_from_2_way_softmax(
439439

440440
# ModelForPooling is dynamically defined inside the _create_pooling_model_cls
441441
# function, so we need use this hacky method to obtain it.
442-
pooling_model_cls = [
442+
pooling_model_cls = next(
443443
x for x in type(model).__mro__ if x.__name__ == "ModelForPooling"
444-
][0]
444+
)
445445
loaded_weights = pooling_model_cls.load_weights(model, weights, load_lm_head=True)
446446

447447
from vllm.transformers_utils.tokenizer import get_tokenizer

0 commit comments

Comments
 (0)