Skip to content

Commit

Permalink
Merge branch 'vchen/fix_clip_trtllm' of https://github.com/xuanzic/NeMo
Browse files Browse the repository at this point in the history
… into vchen/fix_clip_trtllm
  • Loading branch information
Vivian Chen committed Aug 7, 2024
2 parents 18da971 + 1773287 commit 81b6584
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions nemo/export/multimodal/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,10 @@ def forward(self, images):
return vision_x

encoder = AutoModel.from_pretrained(
vision_config["from_pretrained"], torch_dtype=torch.bfloat16, trust_remote_code=True, attn_implementation='eager'
vision_config["from_pretrained"],
torch_dtype=torch.bfloat16,
trust_remote_code=True,
attn_implementation='eager',
)
vision_encoder = encoder.vision_model
hf_config = encoder.config
Expand Down Expand Up @@ -326,7 +329,10 @@ def forward(self, images):
return vision_x

encoder = AutoModel.from_pretrained(
vision_config["from_pretrained"], torch_dtype=torch.bfloat16, trust_remote_code=True, attn_implementation='eager'
vision_config["from_pretrained"],
torch_dtype=torch.bfloat16,
trust_remote_code=True,
attn_implementation='eager',
)
vision_encoder = encoder.vision_model
hf_config = encoder.config
Expand Down

0 comments on commit 81b6584

Please sign in to comment.