Sync Ollama Models with Other Tools
AI Summary
Summary: Script for Simplifying Model Management in AMA
- Ease of Downloading Models with AMA:
- Use
olama pull llama 2
orolama run llama 2
to download models.- Automatic downloading if the model is not present.
- Using Models in Other Applications:
- Difficulty in locating specific models like llama 2 in LM Studio.
- Solution: Shell Script for Model Management:
- Created a shell script to create symbolic links (Sim links) to a chosen folder.
- Script available in the GitHub repo “Matt’s shell scripts” named
sync models
.- Script is for Mac OS, may require adjustments for Linux and Windows.
- Script Instructions:
- Set base directories:
olama
directory (Mac example:~/models
).- Manifest and blob directories (usually the same for all).
- Public models directory (destination for Sim links, must be empty).
- Delete all files in the destination directory.
- Iterate through the Manifest directory to find models.
- Use
JQ
to parse the Manifest JSON files.- Create Sim links for each model and output the model name to the command line interface (CLI).
- Benefits:
- Allows LM Studio to find all models downloaded from AMA.
- Additional Information:
- Script mentioned periodically in Discord.
- Video tutorial on using
JQ
available.- Closing:
- Invitation for feedback on the script’s usefulness.
- Sign-off with thanks and a goodbye.