Pinning ML model revisions for compatibility and security
Nov 9, 2023

Summary
This post introduces the concept of pinning ML model revisions to ensure compatibility and security, drawing parallels to package version pinning. It provides code examples for using the `revision` parameter in Hugging Face's `transformers` library and discusses strategies for maintaining private copies of models. The post outlines specific scenarios where pinning model revisions is recommended, such as when using `trust_remote_code` or when strict security requirements are in place.
More from the Baseten AI Model Deployment and Serving Platform trail
- LangChain trains custom models for LangSmith Engine with Baseten Loops
- DeepSeek-V4.1-Flash: more efficient prefill for coding agents
- Blaxel is joining Baseten to build the future of agentic infrastructure
- How Baseten makes pyannote’s diarization models 9.6x faster
- Optimizing delta weight syncs for managed rollouts