#!/usr/bin/env bash # Pull additional AI models into Ollama # Run after install: bash models/pull-models.sh --tier=starter # ───────────────────────────────────────────── TIER="basic" # default tier for arg in "$@"; do case $arg in --tier=*) TIER="${arg#*=}" ;; *) TIER="$arg" ;; # allow positional: pull-models.sh pro esac done # Normalise legacy names case "$TIER" in entry) TIER="basic" ;; mid) TIER="pro" ;; advanced) TIER="max" ;; esac # ── Model lists ─────────────────────────────── starter_models=( "phi3:mini" # 3.8B — fits in 32 GB GDDR7 at full precision "nomic-embed-text" # Embedding model for RAG ) basic_models=( "llama3.1:8b" # General purpose, good baseline "mistral:7b" # Fast, good for APIs "nomic-embed-text" # Embedding model for RAG "codellama:13b" # Code generation ) pro_models=( "${basic_models[@]}" "llama3.1:70b" # Large general purpose (needs 64+ GB VRAM at 4-bit) "mixtral:8x7b" # MoE model, strong reasoning "deepseek-coder-v2:16b" # Code specialist ) max_models=( "${pro_models[@]}" "llama3.1:405b" # Flagship — needs 320+ GB VRAM or multi-node "mixtral:8x22b" # Large MoE ) case $TIER in starter) models=("${starter_models[@]}") ;; basic) models=("${basic_models[@]}") ;; pro) models=("${pro_models[@]}") ;; max) models=("${max_models[@]}") ;; *) echo "Unknown tier: $TIER" echo "Usage: bash pull-models.sh --tier=starter|basic|pro|max" exit 1 ;; esac echo "Pulling models for tier: $TIER" echo "" for model in "${models[@]}"; do echo "→ Pulling $model..." ollama pull "$model" echo "" done echo "✓ Done. List installed models with: ollama list"