diff --git a/examples/arm/image_classification_example_vgf/model_export/README.md b/examples/arm/image_classification_example_vgf/model_export/README.md index 1513a393011..df5fd6e35db 100644 --- a/examples/arm/image_classification_example_vgf/model_export/README.md +++ b/examples/arm/image_classification_example_vgf/model_export/README.md @@ -25,6 +25,9 @@ python examples/arm/image_classification_example_vgf/model_export/train_deit.py ## Export and quantize for VGF +The exporter requires a safetensors checkpoint. The training script saves +this format by default. Legacy PyTorch `.bin` checkpoints are not accepted. + ```bash python examples/arm/image_classification_example_vgf/model_export/export_deit.py \ --model-path ./deit-tiny-oxford-pet/final_model \ diff --git a/examples/arm/image_classification_example_vgf/model_export/export_deit.py b/examples/arm/image_classification_example_vgf/model_export/export_deit.py index a46d157bfa5..76a6b4845a7 100644 --- a/examples/arm/image_classification_example_vgf/model_export/export_deit.py +++ b/examples/arm/image_classification_example_vgf/model_export/export_deit.py @@ -93,7 +93,7 @@ def measure_accuracy(quantized_model, test_set): type=str, default="./deit-tiny-oxford-pet/final_model", required=True, - help="Path to the fine-tuned ViT model.", + help="Path to the fine-tuned ViT model saved in safetensors format.", ) argparser.add_argument( "--output-path", @@ -120,7 +120,7 @@ def measure_accuracy(quantized_model, test_set): num_labels=37, ignore_mismatched_sizes=True, revision="b3428f18dcc7b543470d07f14b4a4157815d1880", - use_safetensors=False, + use_safetensors=True, ).eval() image_preprocessor = AutoImageProcessor.from_pretrained( "facebook/deit-tiny-patch16-224",