A resumed download should continue the same model artefact, not merely continue a percentage. Preserve enough transfer state to verify the remote file and explain what remains after interruption.
Keep download progress separate from verification and installation. Reaching all expected bytes is an important milestone, but it does not establish a usable model.
Record the transfer contract
Store model identity, expected size where known, trusted integrity information, source metadata relevant to resume, staged path, and confirmed local progress. Follow the server's actual supported transfer semantics.
The HTTP semantics standard defines range and conditional request concepts. Your implementation must still validate the concrete server responses and model identity rather than assuming every host supports resume correctly.
Recover a fictional interrupted model install
Suppose a laptop downloads part of a model, loses connectivity, and the app restarts. The interface should restore the known staged state and offer the supported resume or restart path without claiming progress from an unverified file length alone.
Test valid resume, server ignoring the requested range, changed artefact, missing staged file, inconsistent size, failed integrity check, and storage exhaustion. If the source changed, do not append new bytes to the previous artefact.
Use harmless controlled files for transfer tests and the authorised model artefact for final compatibility checks. No download speed or successful installation measurement is claimed here.
Explain stages and estimates honestly
Show downloading, paused, resuming, verifying, installing, ready, and failed only where those states have defined meaning. If total size is unknown, use an indeterminate state rather than inventing a precise percentage.
Treat remaining-time estimates as estimates that depend on current conditions. Avoid repeatedly resetting apparent progress without explanation when a restart is required. Tell the user why previous data cannot safely be reused.
The tradeoff is bandwidth savings versus transfer-state complexity. Resume can help low-bandwidth users, but incorrect resume is worse than a clear restart because it can produce a corrupt artefact that fails later. Verification remains essential even after a technically successful transfer.
The Google AI Edge documentation provides runtime context, and the ChalkLens case study documents an on-device teaching workflow. This progress design is proposed guidance and does not state its current downloader behaviour.
Questions about model-download progress
Can the app restore progress from file size alone?
Only if it also establishes the staged file belongs to the expected artefact and the resume protocol remains valid. Size alone is insufficient identity.
Should verification count as download progress?
Label it as a separate stage so users understand why the model is not ready after transfer completes.
What should be tested first?
Interrupt, restart, change the remote fixture, and verify safe rejection or restart. Bring corrupt or misleading states to a model-delivery review.