Adding more models
This commit is contained in:
+8
-3
@@ -3,10 +3,15 @@
|
|||||||
# cpu_ok: yes = usable speed without a GPU (small dense or MoE with few active params).
|
# cpu_ok: yes = usable speed without a GPU (small dense or MoE with few active params).
|
||||||
# rank: higher = better quality for coding; the recommender picks the highest rank that fits.
|
# rank: higher = better quality for coding; the recommender picks the highest rank that fits.
|
||||||
qwen2.5-coder:1.5b 1.0 2.0 yes 10 Tiny; very fast, weak edits. For very small machines.
|
qwen2.5-coder:1.5b 1.0 2.0 yes 10 Tiny; very fast, weak edits. For very small machines.
|
||||||
|
granite-code:3b 2.0 3.0 yes 15 IBM, Apache-2.0 (fully permissive); a bit weaker than Qwen at this size.
|
||||||
qwen2.5-coder:3b 1.9 3.0 yes 20 Small and fast; OK for simple edits.
|
qwen2.5-coder:3b 1.9 3.0 yes 20 Small and fast; OK for simple edits.
|
||||||
|
granite-code:8b 4.6 6.2 yes 27 IBM, Apache-2.0 (fully permissive); solid mid-size coder.
|
||||||
qwen2.5-coder:7b 4.7 6.5 yes 30 Best all-round choice for laptops / CPU-only.
|
qwen2.5-coder:7b 4.7 6.5 yes 30 Best all-round choice for laptops / CPU-only.
|
||||||
deepseek-coder-v2:16b 8.9 11.5 yes 35 MoE (2.4B active): fast on CPU, needs ~12 GB RAM.
|
granite-code:20b 12 15 no 33 IBM, Apache-2.0 (fully permissive); dense, wants a GPU (~15 GB).
|
||||||
|
deepseek-coder-v2:16b 8.9 11.5 yes 35 MoE (Mixture of Experts, 2.4B active): fast on CPU, needs ~12 GB RAM.
|
||||||
qwen2.5-coder:14b 9.0 11.5 no 40 Noticeably smarter than 7B; wants a GPU (~12 GB VRAM).
|
qwen2.5-coder:14b 9.0 11.5 no 40 Noticeably smarter than 7B; wants a GPU (~12 GB VRAM).
|
||||||
gpt-oss:20b 14 17 yes 50 MoE reasoning model; needs ~17 GB RAM or VRAM.
|
gpt-oss:20b 14 17 yes 50 MoE (Mixture of Experts) reasoning model; needs ~17 GB RAM or VRAM.
|
||||||
qwen3-coder:30b 19 23 yes 60 MoE (3B active): strong coder, fast on CPU with 24+ GB RAM.
|
granite-code:34b 19 23 no 55 IBM, Apache-2.0 (fully permissive); dense, needs a 24 GB GPU.
|
||||||
|
devstral:24b 14 17 no 58 Mistral+All Hands, Apache-2.0; built for agentic multi-file edits, needs ~17 GB RAM or VRAM.
|
||||||
|
qwen3-coder:30b 19 23 yes 60 MoE (Mixture of Experts, 3B active): strong coder, fast on CPU with 24+ GB RAM.
|
||||||
qwen2.5-coder:32b 20 24 no 70 Top-quality dense coder; needs a 24 GB GPU.
|
qwen2.5-coder:32b 20 24 no 70 Top-quality dense coder; needs a 24 GB GPU.
|
||||||
|
|||||||
|
@@ -132,9 +132,12 @@ echo
|
|||||||
|
|
||||||
# ------------------------------------------------ memory budget / context
|
# ------------------------------------------------ memory budget / context
|
||||||
# What a model must fit into: VRAM when a GPU is used, else RAM minus headroom
|
# What a model must fit into: VRAM when a GPU is used, else RAM minus headroom
|
||||||
# for the OS, aider and the editor.
|
# for the OS, aider and the editor. hard_budget/gpu_hard have almost no headroom -
|
||||||
|
# a model only fitting there is "tight" (usable, but close other apps first).
|
||||||
budget=$(awk -v r="$ram_gb" 'BEGIN {b=r-4; if (b<1) b=1; printf "%.1f", b}')
|
budget=$(awk -v r="$ram_gb" 'BEGIN {b=r-4; if (b<1) b=1; printf "%.1f", b}')
|
||||||
|
hard_budget=$(awk -v r="$ram_gb" 'BEGIN {b=r-1; if (b<1) b=1; printf "%.1f", b}')
|
||||||
gpu_budget=$(awk -v v="$vram_gb" 'BEGIN {printf "%.1f", v*0.9}')
|
gpu_budget=$(awk -v v="$vram_gb" 'BEGIN {printf "%.1f", v*0.9}')
|
||||||
|
gpu_hard=$(awk -v v="$vram_gb" 'BEGIN {printf "%.1f", v*0.98}')
|
||||||
|
|
||||||
if awk -v b="$budget" 'BEGIN{exit !(b<6)}'; then CONTEXT=4096
|
if awk -v b="$budget" 'BEGIN{exit !(b<6)}'; then CONTEXT=4096
|
||||||
elif awk -v b="$budget" 'BEGIN{exit !(b>=40)}'; then CONTEXT=32768
|
elif awk -v b="$budget" 'BEGIN{exit !(b>=40)}'; then CONTEXT=32768
|
||||||
@@ -148,10 +151,14 @@ for i in "${!rows[@]}"; do
|
|||||||
IFS=$'\t' read -r tag disk mem cpu_ok rank desc <<<"${rows[$i]}"
|
IFS=$'\t' read -r tag disk mem cpu_ok rank desc <<<"${rows[$i]}"
|
||||||
tags[i]=$tag
|
tags[i]=$tag
|
||||||
fits_ram=$(awk -v m="$mem" -v b="$budget" 'BEGIN{print (m<=b)}')
|
fits_ram=$(awk -v m="$mem" -v b="$budget" 'BEGIN{print (m<=b)}')
|
||||||
|
fits_hard_ram=$(awk -v m="$mem" -v b="$hard_budget" 'BEGIN{print (m<=b)}')
|
||||||
fits_gpu=$(awk -v m="$mem" -v b="$gpu_budget" -v u="$gpu_usable" 'BEGIN{print (u && m<=b)}')
|
fits_gpu=$(awk -v m="$mem" -v b="$gpu_budget" -v u="$gpu_usable" 'BEGIN{print (u && m<=b)}')
|
||||||
|
fits_hard_gpu=$(awk -v m="$mem" -v b="$gpu_hard" -v u="$gpu_usable" 'BEGIN{print (u && m<=b)}')
|
||||||
if [ "$fits_gpu" = 1 ]; then status[i]="fits"; speed[i]="fast (GPU)"
|
if [ "$fits_gpu" = 1 ]; then status[i]="fits"; speed[i]="fast (GPU)"
|
||||||
|
elif [ "$fits_hard_gpu" = 1 ]; then status[i]="tight"; speed[i]="tight (GPU)"
|
||||||
elif [ "$fits_ram" = 1 ] && [ "$cpu_ok" = yes ]; then status[i]="fits"; speed[i]="ok (CPU)"
|
elif [ "$fits_ram" = 1 ] && [ "$cpu_ok" = yes ]; then status[i]="fits"; speed[i]="ok (CPU)"
|
||||||
elif [ "$fits_ram" = 1 ]; then status[i]="slow"; speed[i]="slow (CPU)"
|
elif [ "$fits_ram" = 1 ]; then status[i]="slow"; speed[i]="slow (CPU)"
|
||||||
|
elif [ "$fits_hard_ram" = 1 ]; then status[i]="tight"; speed[i]="tight (CPU)"
|
||||||
else status[i]="too big"; speed[i]="-"; fi
|
else status[i]="too big"; speed[i]="-"; fi
|
||||||
[ "${status[$i]}" = fits ] && rec=$i # sorted by rank, so last "fits" wins
|
[ "${status[$i]}" = fits ] && rec=$i # sorted by rank, so last "fits" wins
|
||||||
done
|
done
|
||||||
@@ -211,7 +218,10 @@ if [ -z "$FORCE_MODEL" ]; then
|
|||||||
[[ "$choice" =~ ^[0-9]+$ ]] && [ "$choice" -ge 1 ] && [ "$choice" -le "${#rows[@]}" ] || { echo "Invalid choice." >&2; exit 1; }
|
[[ "$choice" =~ ^[0-9]+$ ]] && [ "$choice" -ge 1 ] && [ "$choice" -le "${#rows[@]}" ] || { echo "Invalid choice." >&2; exit 1; }
|
||||||
sel=$((choice-1))
|
sel=$((choice-1))
|
||||||
MODEL=${tags[$sel]}
|
MODEL=${tags[$sel]}
|
||||||
if [ "${status[$sel]}" = "too big" ] || [ "${status[$sel]}" = "slow" ]; then
|
if [ "${status[$sel]}" = "tight" ]; then
|
||||||
|
echo "Warning: $MODEL is 'tight' on this machine (fits, but leaves little headroom - close other apps first)."
|
||||||
|
if [ "$ASSUME_YES" != 1 ]; then read -r -p "Continue anyway? [y/N] " a; [[ "$a" =~ ^[Yy] ]] || exit 1; fi
|
||||||
|
elif [ "${status[$sel]}" = "too big" ] || [ "${status[$sel]}" = "slow" ]; then
|
||||||
echo "Warning: $MODEL is '${status[$sel]}' on this machine (may swap, crawl, or crash)."
|
echo "Warning: $MODEL is '${status[$sel]}' on this machine (may swap, crawl, or crash)."
|
||||||
if [ "$ASSUME_YES" != 1 ]; then read -r -p "Continue anyway? [y/N] " a; [[ "$a" =~ ^[Yy] ]] || exit 1; fi
|
if [ "$ASSUME_YES" != 1 ]; then read -r -p "Continue anyway? [y/N] " a; [[ "$a" =~ ^[Yy] ]] || exit 1; fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user