Skip to content

feat: add build-models and publish-models skills#7

Merged
zeke merged 2 commits into
mainfrom
add-build-and-publish-skills
May 5, 2026
Merged

feat: add build-models and publish-models skills#7
zeke merged 2 commits into
mainfrom
add-build-and-publish-skills

Conversation

@zeke
Copy link
Copy Markdown
Member

@zeke zeke commented Apr 27, 2026

This PR adds two new skills covering the model-creation lifecycle on Replicate:

  • build-models — packaging custom models with Cog: cog.yaml, predict.py, weights loading with pget, cold-boot tricks, async predictors with continuous batching, multi-LoRA composition, and a weights cache helper.
  • publish-modelscog push, cog-safe-push with the full config schema, GitHub Actions patterns (DIY and the model-ci-template reusable workflow), multi-model matrix pushes, two-pass official-model pushes, deployments, and a post-publish monitoring pattern.

Descriptions are written for high triggerability: they list specific commands (cog push, cog-safe-push), file names (cog.yaml, predict.py), URLs (r8.im, cog.run), and natural trigger phrases.

Patterns are distilled from a survey of production Replicate model repos: cog-flux, cog-flux-kontext, cog-vllm, cog-comfyui, flux-fine-tuner, vibevoice, cog-yue, cog-official-nightmareai-real-esrgan, plus the cog-template, cog-official-template, and model-ci-template scaffolding repos. Each skill ends with a "Production references" section linking to the real examples on GitHub.

Both skills validate with script/lint, and the existing five skills still validate after the marketplace and AGENTS.md updates.

Two new skills covering the model-creation lifecycle:

- build-models: packaging custom models with Cog (cog.yaml, predict.py,
  weights loading with pget, cold-boot tricks, async predictors).
- publish-models: cog push, cog-safe-push, GitHub Actions patterns,
  multi-model matrix pushes, and post-publish monitoring.

Descriptions are written to be easy for agents to trigger on, with
specific file names, commands, and trigger phrases.

Patterns are distilled from production Replicate model repos including
cog-flux, cog-flux-kontext, cog-vllm, cog-comfyui, flux-fine-tuner,
vibevoice, cog-template, and model-ci-template.
@andreasjansson
Copy link
Copy Markdown
Member

Is this compatible with the new Cog weights setup?

@zeke
Copy link
Copy Markdown
Member Author

zeke commented Apr 28, 2026

Is this compatible with the new Cog weights setup?

The skill covers what's stable in Cog today (--separate-weights, pget, baked-in weights, HF Hub) but doesn't yet cover the new declarative flow you've been landing, weights: in cog.yaml, cog weights build/push, weights.lock, and the OCI bundle format from replicate/cog#2683, replicate/cog#2676, replicate/cog#2695.

Two questions before I add a section on it:

  1. Is weights: ready to document for end users, or still hidden/experimental?
  2. Should weights: become the recommended default for >1GB models with --separate-weights demoted to legacy, or coexist for now?

@zeke
Copy link
Copy Markdown
Member Author

zeke commented Apr 30, 2026

@andreasjansson ☝🏼

@zeke zeke merged commit f3e5b75 into main May 5, 2026
2 checks passed
@michaeldwan
Copy link
Copy Markdown
Member

Managed weights aren't yet ready, but close! Here's a working example for reference. It's released in 0.19.3 so we can start testing -- under the hidden cog weights command. It's "experimental" since I expect things to change a bit as we get real models into prod.

I'll add docs and examples before we release properly.

Should weights: become the recommended default for >1GB models with --separate-weights demoted to legacy, or coexist for now?

Not sure yet. I think managed weights are the right tool for files that don't live in the repo, regardless of size. --separate-weights only applies to local files, but those should migrate to managed weights when released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants