Snapshot GPU memory to speed up cold starts

This example demonstrates how to use GPU memory snapshots to speed up model loading. Note that GPU memory snapshotting is an experimental feature, so test carefully before using in production! You can read more about GPU memory snapshotting, and its caveats, here.

GPU snapshots can only be used with deployed Functions, so first deploy the App:

Next, invoke the Function:

The full code is below: