Skip to content

Commit

Permalink
Up
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickvonplaten committed Dec 9, 2024
1 parent 645e03d commit 3aca2cd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions vllm/model_executor/models/pixtral.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from dataclasses import dataclass, fields
from functools import cached_property
from itertools import tee
from typing import Iterable, List, Mapping, Optional, Set, Tuple, Union

import numpy
Expand Down Expand Up @@ -361,7 +360,8 @@ def is_vision_lang_adapter_weights(weight: Tuple[str, torch.Tensor]):

# Get references to parameters for direct loading
vision_encoder_dict = dict(self.vision_encoder.named_parameters())
vision_lang_adapter_dict = dict(self.vision_language_adapter.named_parameters())
vision_lang_adapter_dict = dict(
self.vision_language_adapter.named_parameters())

def llm_weights_generator():
# Single pass over weights
Expand All @@ -379,7 +379,8 @@ def llm_weights_generator():
with torch.no_grad():
default_weight_loader(param, w)
else:
# LLM weights: yield them to be loaded by language_model.load_weights
# LLM weights: yield them to be loaded
# by language_model.load_weights
yield (name, w)

# Now we call the language model load with the generator
Expand Down

0 comments on commit 3aca2cd

Please sign in to comment.