@@ -100,6 +100,15 @@ 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} " == " phi-4-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
+ return
111
+ fi
103
112
104
113
# Export a basic .pte and run the model.
105
114
" ${PYTHON_EXECUTABLE} " -m examples.portable.scripts.export --model_name=" ${MODEL_NAME} " " ${STRICT} "
@@ -164,6 +173,7 @@ test_model_with_qnn() {
164
173
export LD_LIBRARY_PATH=$QNN_SDK_ROOT /lib/x86_64-linux-clang/
165
174
export PYTHONPATH=$EXECUTORCH_ROOT /..
166
175
176
+ EXTRA_FLAGS=" "
167
177
if [[ " ${MODEL_NAME} " == " dl3" ]]; then
168
178
EXPORT_SCRIPT=deeplab_v3
169
179
elif [[ " ${MODEL_NAME} " == " mv3" ]]; then
@@ -176,6 +186,12 @@ test_model_with_qnn() {
176
186
EXPORT_SCRIPT=inception_v3
177
187
elif [[ " ${MODEL_NAME} " == " vit" ]]; then
178
188
EXPORT_SCRIPT=torchvision_vit
189
+ elif [[ " ${MODEL_NAME} " == " mb" ]]; then
190
+ EXPORT_SCRIPT=mobilebert_fine_tune
191
+ EXTRA_FLAGS=" --num_epochs 1"
192
+ pip install scikit-learn
193
+ elif [[ " ${MODEL_NAME} " == " w2l" ]]; then
194
+ EXPORT_SCRIPT=wav2letter
179
195
elif [[ " ${MODEL_NAME} " == " edsr" ]]; then
180
196
EXPORT_SCRIPT=edsr
181
197
# Additional deps for edsr
@@ -189,7 +205,7 @@ test_model_with_qnn() {
189
205
# TODO(guangyang): Make QNN chipset matches the target device
190
206
QNN_CHIPSET=SM8450
191
207
192
- " ${PYTHON_EXECUTABLE} " -m examples.qualcomm.scripts.${EXPORT_SCRIPT} -b ${CMAKE_OUTPUT_DIR} -m ${QNN_CHIPSET} --compile_only
208
+ " ${PYTHON_EXECUTABLE} " -m examples.qualcomm.scripts.${EXPORT_SCRIPT} -b ${CMAKE_OUTPUT_DIR} -m ${QNN_CHIPSET} --compile_only $EXTRA_FLAGS
193
209
EXPORTED_MODEL=$( find " ./${EXPORT_SCRIPT} " -type f -name " ${MODEL_NAME} *.pte" -print -quit)
194
210
}
195
211
0 commit comments