Ahmadzei's picture
added 3 more tables for large emb model
5fa1a76
To take advantage of these graph optimizations, make sure you have IPEX installed:
pip install intel_extension_for_pytorch
Set the --use_ipex and --jit_mode_eval flags in the [Trainer] class to enable JIT mode with the graph optimizations:
python run_qa.py \
--model_name_or_path csarron/bert-base-uncased-squad-v1 \
--dataset_name squad \
--do_eval \
--max_seq_length 384 \
--doc_stride 128 \
--output_dir /tmp/ \
--no_cuda \
--use_ipex \
--jit_mode_eval
🤗 Optimum
Learn more details about using ORT with 🤗 Optimum in the Optimum Inference with ONNX Runtime guide.