@@ -100,6 +100,14 @@ test_model() {
100
100
rm " ./${MODEL_NAME} .pte"
101
101
return # Skip running with portable executor runnner since portable doesn't support Qwen's biased linears.
102
102
fi
103
+ if [[ " ${MODEL_NAME} " == " phi4_mini" ]]; then
104
+ # Install requirements for export_llama
105
+ bash examples/models/llama/install_requirements.sh
106
+ # Test export_llama script: python3 -m examples.models.llama.export_llama.
107
+ " ${PYTHON_EXECUTABLE} " -m examples.models.llama.export_llama --model " ${MODEL_NAME} " -c examples/models/llama/params/demo_rand_params.pth -p examples/models/phi-4-mini/config.json
108
+ run_portable_executor_runner
109
+ rm " ./${MODEL_NAME} .pte"
110
+ fi
103
111
104
112
# Export a basic .pte and run the model.
105
113
" ${PYTHON_EXECUTABLE} " -m examples.portable.scripts.export --model_name=" ${MODEL_NAME} " " ${STRICT} "
@@ -164,6 +172,7 @@ test_model_with_qnn() {
164
172
export LD_LIBRARY_PATH=$QNN_SDK_ROOT /lib/x86_64-linux-clang/
165
173
export PYTHONPATH=$EXECUTORCH_ROOT /..
166
174
175
+ EXTRA_FLAGS=" "
167
176
if [[ " ${MODEL_NAME} " == " dl3" ]]; then
168
177
EXPORT_SCRIPT=deeplab_v3
169
178
elif [[ " ${MODEL_NAME} " == " mv3" ]]; then
@@ -176,6 +185,12 @@ test_model_with_qnn() {
176
185
EXPORT_SCRIPT=inception_v3
177
186
elif [[ " ${MODEL_NAME} " == " vit" ]]; then
178
187
EXPORT_SCRIPT=torchvision_vit
188
+ elif [[ " ${MODEL_NAME} " == " mb" ]]; then
189
+ EXPORT_SCRIPT=mobilebert_fine_tune
190
+ EXTRA_FLAGS=" --num_epochs 1"
191
+ pip install scikit-learn
192
+ elif [[ " ${MODEL_NAME} " == " w2l" ]]; then
193
+ EXPORT_SCRIPT=wav2letter
179
194
elif [[ " ${MODEL_NAME} " == " edsr" ]]; then
180
195
EXPORT_SCRIPT=edsr
181
196
# Additional deps for edsr
@@ -189,7 +204,7 @@ test_model_with_qnn() {
189
204
# TODO(guangyang): Make QNN chipset matches the target device
190
205
QNN_CHIPSET=SM8450
191
206
192
- " ${PYTHON_EXECUTABLE} " -m examples.qualcomm.scripts.${EXPORT_SCRIPT} -b ${CMAKE_OUTPUT_DIR} -m ${QNN_CHIPSET} --compile_only
207
+ " ${PYTHON_EXECUTABLE} " -m examples.qualcomm.scripts.${EXPORT_SCRIPT} -b ${CMAKE_OUTPUT_DIR} -m ${QNN_CHIPSET} --compile_only $EXTRA_FLAGS
193
208
EXPORTED_MODEL=$( find " ./${EXPORT_SCRIPT} " -type f -name " ${MODEL_NAME} *.pte" -print -quit)
194
209
}
195
210
0 commit comments