Loading page

Configure model backend

Now that you have all of the monitoring assets in place, you’re ready to capture some real performance data.

On your target device, open PhotoTalk. Confirm that you have at least one non-sensitive image available to use during the benchmark.

Image Alt Text:Screenshot of the chat UI which appears when you first open PhotoTalk with the Image selection and settings buttons highlightedPhotoTalk chat screen

You can access the settings menu by tapping the cog icon in the UI. Open the settings and verify that the application has detected the model that you pushed. You should see the following path under Model File Path (.litertlm): /sdcard/Download/gemma-4-E2B-it.litertlm.

Note

The application will display a warning if it can’t find a model at the specified model path. If the warning appears, double check that you’ve pushed the model and that it’s labelled correctly.

In this menu, you can also select from the CPU, GPU, or NPU hardware backends.

Select CPU for the first run. You can repeat the workflow with the GPU backend if your device supports it. NPU requires compatible hardware, a device-specific model, and additional runtime libraries, so don’t select it for this Learning Path.

Tap Initialize Engine and wait for the status message LiteRT-LM Ready (CPU). Select an image!.

If you chose the GPU backend, check the status message carefully. PhotoTalk falls back to the CPU backend when GPU initialization fails. The message reports the backend that initialized.

Image Alt Text:PhotoTalk settings showing hardware backend choices, the model path field, and the Initialize Engine buttonPhotoTalk settings

Capture performance data

Update the duration inside your Runtime Monitoring notebook section to five minutes:

    

        
        
DURATION_SECONDS = 300

    

Run the cell and carry out the following benchmark manually for the five-minute duration:

  1. Keep PhotoTalk open on your target device.
  2. Tap Select Image and choose a picture. This starts the first inference automatically.
  3. Ask the model a question about the image.
  4. Repeat step 3 or upload a new picture to the chat and continue asking questions.
Note

For longer tests, automate application use with a script or by modifying the application source code.

After five minutes, the script saves the extracted data in $WORK/data/.

Keep the screen brightness, selected backend, network state, and foreground applications unchanged when comparing multiple runs. The power estimate also includes the display, radios, operating system, and other device activity.

What you’ve accomplished and what’s next

You’ve captured performance data from a five-minute manual benchmark. The data describes how the hardware of your target device was performing during the benchmark.

Next, you’ll visualise the data to interpret the results.