A file named like a model is not enough evidence that it is the expected artefact. Verify identity and integrity before loading, then confirm compatibility under the runtime's supported process.
Keep verification distinct from output accuracy. An intact authorised model can still produce an incorrect answer, while a corrupted file can fail before any useful inference occurs.
Establish the trusted reference before transfer
Record the intended model revision, format, expected size where applicable, and integrity information obtained through the trusted distribution path. A checksum supplied by the same untrusted replacement is not independent evidence of the intended file.
Review current runtime documentation and the model publisher's official distribution and licence requirements. Avoid loading arbitrary user-selected files unless that capability has a separately reviewed boundary.
Verify a fictional interrupted installation
Suppose a model transfer resumes after a network interruption. The staged file reaches the expected length but contains incorrect bytes because the source changed or resume was mishandled. Verification should fail before the app reports inference ready.
Test truncated file, changed bytes, wrong artefact with similar name, incompatible format, stale manifest, and valid artefact that fails runtime loading. Use controlled fixtures and the authorised model for final compatibility checks.
Preserve the previous working installation when supported. A failed candidate should not replace it or delete teacher-created materials. Give the user a clear retry, restart, or support path with the failed stage identified.
Activate through an explicit installation state
Only move from staged to ready after the chosen checks complete. Record model identity and verification outcome so support can distinguish transfer, compatibility, and runtime failures later.
Do not copy private source documents into verification diagnostics. Safe metadata such as app version, runtime, artefact reference, and failure category is usually more relevant to an installation problem.
The tradeoff is verification time versus preventable failure and exposure. Reading a large file for integrity can add work, but skipping it can defer corruption into confusing load errors. The appropriate trust and verification design depends on distribution, threat model, and product promise.
The ChalkLens case study documents local inference in a teaching app. This verification matrix is proposed guidance and does not describe its current installer or claim a security audit.
Questions about checking model files
Is matching file size enough?
No. Different or corrupted content can have the same length. Use the trusted verification information appropriate to the artefact.
Does integrity verification prove safe answers?
No. It establishes a file property under the chosen trust model, not factual accuracy, task suitability, or complete application security.
What should be tested first?
Corrupt a harmless staged fixture and verify rejection, preserved prior state, and clear recovery. Bring gaps to a model-installation review.