Import Hugging Face Models into ModelKits
KitOps makes it easy to turn any Hugging Face repository into a versioned ModelKit. Just use the kit import
command to:
- Download the model and metadata
- Generate a Kitfile
- Build and store the ModelKit in your local registry
You can then push it to a private OCI registry, or use it in your development and deployment pipelines behind your firewall.
Step 1: Get the Hugging Face Model URL
Visit huggingface.co and copy the model URL you want to import. For example, https://huggingface.co/HuggingFaceTB/SmolLM-135M-Instruct
Step 2: Run kit import
Use the CLI to import the Hugging Face repo and auto-generate a Kitfile:
sh
kit import https://huggingface.co/HuggingFaceTB/SmolLM-135M-Instruct
KitOps will:
- Download the Hugging Face model and files
- Generate a Kitfile
- Launch your text editor for optional edits
- Pack and store the ModelKit locally
If the model requires authentication, use the --token
flag to add your Hugging Face access token.
💡 Customize your Kitfile editor by setting the
EDITOR
environment variable.
Step 3: Verify Your ModelKit
List your local ModelKits:
sh
kit list
You should see a listing for HuggingFaceTB/SmolLM-135M-Instruct:latest
.
Next Steps
- Push the ModelKit to a private registry
- Learn more about the import command
- Customize the Kitfile