We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d113fbd commit 3ac3c83Copy full SHA for 3ac3c83
vllm/model_executor/models/adapters.py
@@ -439,9 +439,9 @@ def load_weights_using_from_2_way_softmax(
439
440
# ModelForPooling is dynamically defined inside the _create_pooling_model_cls
441
# function, so we need use this hacky method to obtain it.
442
- pooling_model_cls = [
+ pooling_model_cls = next(
443
x for x in type(model).__mro__ if x.__name__ == "ModelForPooling"
444
- ][0]
+ )
445
loaded_weights = pooling_model_cls.load_weights(model, weights, load_lm_head=True)
446
447
from vllm.transformers_utils.tokenizer import get_tokenizer
0 commit comments