Tree: Format
This commit is contained in:
parent
1c9891bf04
commit
21c5af48e1
2 changed files with 7 additions and 9 deletions
|
|
@ -435,7 +435,7 @@ class ExllamaV3Container(BaseModelContainer):
|
|||
if self.use_vision:
|
||||
for value in self.vision_model.load_gen(
|
||||
reserve_per_device=self.autosplit_reserve,
|
||||
callback=progress_callback
|
||||
callback=progress_callback,
|
||||
):
|
||||
if value:
|
||||
yield value
|
||||
|
|
@ -559,7 +559,7 @@ class ExllamaV3Container(BaseModelContainer):
|
|||
kwargs.get("add_bos_token"), self.hf_model.add_bos_token()
|
||||
),
|
||||
encode_special_tokens=unwrap(kwargs.get("encode_special_tokens"), True),
|
||||
embeddings=mm_embeddings_content
|
||||
embeddings=mm_embeddings_content,
|
||||
)
|
||||
.flatten()
|
||||
.tolist()
|
||||
|
|
|
|||
|
|
@ -22,14 +22,12 @@ class MultimodalEmbeddingWrapper(BaseModel):
|
|||
async def add(self, url: str):
|
||||
# Determine the type of vision embedding to use
|
||||
if not self.type:
|
||||
if (
|
||||
dependencies.exllamav2 and
|
||||
isinstance(model.container.vision_model, ExLlamaV2VisionTower)
|
||||
if dependencies.exllamav2 and isinstance(
|
||||
model.container.vision_model, ExLlamaV2VisionTower
|
||||
):
|
||||
self.type = "ExLlamaV2MMEmbedding"
|
||||
elif (
|
||||
dependencies.exllamav3 and
|
||||
isinstance(model.container.vision_model, Model)
|
||||
elif dependencies.exllamav3 and isinstance(
|
||||
model.container.vision_model, Model
|
||||
):
|
||||
self.type = "MMEmbedding"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue