Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ Running this script achieves a test set accuracy of 86.10% in FP32.

## Export and quantize

The exporter requires a safetensors checkpoint. The training script saves
this format by default. Legacy PyTorch `.bin` checkpoints are not accepted.

The `export_deit.py` script can be run as follows:

```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,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",
Expand All @@ -123,6 +123,7 @@ def measure_accuracy(quantized_model, test_set):
num_labels=37,
ignore_mismatched_sizes=True,
revision="b3428f18dcc7b543470d07f14b4a4157815d1880",
use_safetensors=True,
).eval()
image_preprocessor = AutoImageProcessor.from_pretrained(
"facebook/deit-tiny-patch16-224",
Expand Down
Loading