NewProject Coding is here — build features and fix bugs in real codebases with an AI assistantSee what's new
Advanced
Securing Model Weights and Inference
30 min readChapter 8Optional

1. Securing model weights and inference

Securing model weights and inference means two jobs. First, keep the files that hold a trained model, its weights, from being copied out of your company. Second, keep one customer's requests from leaking to another customer who shares the same GPUs. Our example throughout is a model provider that trains a proprietary model and serves enterprise customers through one API on shared GPU nodes.

Weights are a few very valuable files, so you cut down the paths they can travel, encrypt each remaining path, and make sure no one person can move them alone. On shared inference, any state reused across requests, such as a cached prompt, is a channel between tenants unless it is scoped to one tenant. You need this when your weights are a competitive asset or you serve several customers from the same GPUs. You mostly do not if you only call a hosted API, where the provider owns this, or serve public open weights unchanged.

Outside labs and model providers, interviews touch this briefly. Mid-level candidates are expected to map where the weights live and apply least privilege, encryption, and egress limits. Senior candidates also explain how a shared cache leaks prompts through timing, pick an isolation level by cost, and name what insider controls miss. The focus is theft and leakage, and tamper checks on your own checkpoints get one sentence. The chapters go in the order an interviewer usually pushes: the asset, then the tenants, then the people.

premium content mask
Upgrade to premium and unlock full chapter
Spot an issue or have a suggestion?

Discussion

Upgrade to premium to read and join the discussion.