Syntax
Arguments
The name of the source model to copy
The name for the copied model
Examples
Copy a model
my-gemma3 that is an exact copy of gemma3.
Create a backup before customization
Rename a model
How it works
Thecp command creates a new model by copying all the layers and configuration from the source model. This operation:
- Copies model manifests and configuration
- References the same blob files (no duplication of model weights)
- Creates an independent model that can be modified or deleted separately
- Is fast because it doesn’t duplicate large model files
Exit codes
0- Model copied successfully1- Copy failed (source model not found, destination already exists, or server error)
Notes
The copy operation uses references to the same underlying blobs, so it doesn’t duplicate storage space for the model weights.
Related commands
ollama create
Create custom models
ollama rm
Remove models
ollama list
List all models
ollama show
Show model information