Replicate Ships Cog v0.20.0 Making ML Model Deployment Faster and Cleaner
Replicate's Cog v0.20.0 renames cog predict to cog run, adds model refs, multi-source weights, and drops legacy schema generation entirely
Takeaways
- Cog v0.20.0 released: Replicate ships a new version of its open-source ML containerization tool with CLI, weights, and build improvements.
cog predictrenamed tocog run: The main prediction command is nowcog run;cog predictstill works as a deprecated alias.- Model refs for push: You can now push with short names like
r8.im/user/modelinstead of full image URLs. - Multi-source and HTTPS weights: Weights can now be fetched from multiple sources, including direct HTTPS URLs.
- Legacy schema generation removed: The old Python-import-at-build-time schema path is gone; static schema generation from type annotations is now the only mode.
- uv replaces pip in Dockerfiles: Generated Dockerfiles now use
uvfor faster, more reliable dependency installation. Release notes
Cog, Replicate's open-source tool for packaging ML models into production-ready containers, has shipped v0.20.0. The release lands a handful of developer-experience improvements that have been building across several minor versions: a cleaner CLI surface, smarter weight management, and the final removal of a legacy code path that was slowing down builds.
The problem Cog solves
Shipping ML models to production is genuinely hard. Docker is part of the solution, but getting it right involves Dockerfiles, pre- and post-processing, Flask servers, and CUDA version hell. More often than not a researcher has to sit down with an engineer just to get a model deployed. Cog is an open-source tool that packages ML models into standard, production-ready containers that can be deployed to your own infrastructure or to Replicate.
With Cog, you define your environment with a simple configuration file and it generates a Docker image with all the best practices: Nvidia base images, efficient dependency caching, specific Python versions, and sensible environment variable defaults. The whole thing reduces to two files: a cog.yaml for environment config and a run.py for prediction logic.
What's new in v0.20.0
The headline change is a rename. cog run is now the primary command for running predictions.