# for example, model = transformers.MixtralForCausalLM
curr_model = model(config=model.config_class())
curr_model.eval()
if show_intermediate_result:
print(curr_model)
# generate prompt tokens
tokenizer = AutoTokenizer.from_pretrained(model_config_dict[model][1])
inputs = tokenizer(input_str, return_tensors="pt")
# configure the export setup.
example_args = ()
example_kwargs = {
'input_ids': inputs['input_ids'],
'attention_mask': inputs['attention_mask']}
# export the model
exported_program: torch.export.ExportedProgram = export(
curr_model, args=example_args, kwargs=example_kwargs)
I can see the core ATen ops in exported_program
, but am not sure if the model
has been fully decomposed. What should I be looking for? Thanks.