Created
October 8, 2024 22:08
-
-
Save justinchuby/8b058086615d95e51b88ea1b46c0c99c to your computer and use it in GitHub Desktop.
Olive export of meta-llama/Llama-3.2-11B-Vision
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"input_model": { | |
"type": "PyTorchModel", | |
"model_script": "model_loader.py", | |
"model_loader": "load_model", | |
"model_path": "meta-llama/Llama-3.2-11B-Vision", | |
"io_config": { | |
"input_names": [ | |
"input_ids", | |
"attention_mask", | |
"pixel_values", | |
"aspect_ratio_ids", | |
"aspect_ratio_mask", | |
"cross_attention_mask" | |
], | |
"output_names": [ | |
"logits" | |
], | |
"input_shapes": [ | |
[ | |
1, | |
14 | |
], | |
[ | |
1, | |
14 | |
], | |
[ | |
1, | |
1, | |
4, | |
3, | |
448, | |
448 | |
], | |
[ | |
1, | |
1 | |
], | |
[ | |
1, | |
1, | |
4 | |
], | |
[ | |
1, | |
14, | |
1, | |
4 | |
] | |
], | |
"input_types": [ | |
"int32", | |
"int32", | |
"float32", | |
"int32", | |
"int32", | |
"int32" | |
] | |
} | |
}, | |
"passes": { | |
"onnx_conversion": { | |
"type": "OnnxConversion", | |
"use_dynamo_exporter": true, | |
"target_opset": 18 | |
} | |
}, | |
"engine": { | |
"log_severity_level": 0 | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from transformers import MllamaForConditionalGeneration | |
def load_model(model_path): | |
return MllamaForConditionalGeneration.from_pretrained(model_path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
olive run --config llama.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment