Update loader.py
This commit is contained in:
parent
fdabdc6b58
commit
1864b4b21e
1 changed files with 2 additions and 3 deletions
|
|
@ -622,11 +622,10 @@ class FastModel(FastBaseModel):
|
|||
pass
|
||||
|
||||
# Check if VLM
|
||||
is_vlm = (x.endswith("ForConditionalGeneration") for x in model_config.architectures)
|
||||
is_vlm = any(x.endswith("ForConditionalGeneration") for x in model_config.architectures)
|
||||
is_vlm = is_vlm or hasattr(model_config, "vision_config")
|
||||
auto_model = AutoModelForVision2Seq if is_vlm else AutoModelForCausalLM
|
||||
print(auto_model)
|
||||
print(is_vlm)
|
||||
|
||||
model, tokenizer = FastBaseModel.from_pretrained(
|
||||
model_name = model_name,
|
||||
max_seq_length = max_seq_length,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue