ollama-advisor: 내 PC에 맞는 Ollama 모델을 자동 추천해주는 Python 라이브러리
개요
ollama-advisor는 시스템 사양(RAM, GPU VRAM)과 사용 목적(코딩, 추론, 비전, 임베딩 등)에 따라 실행 가능한 Ollama 모델을 자동으로 추천해주는 Python 라이브러리입니다.
Mac, Windows, Linux, Google Colab 모두 지원합니다.
- PyPI: ollama-advisor
- GitHub: dschloe/ollama-advisor
설치
pip install ollama-advisor
사용법
시스템 사양 확인
Ollama가 설치되어 있지 않아도 시스템 사양을 확인할 수 있습니다.
import ollama_advisor as oa
specs = oa.get_system_specs()
for k, v in specs.items():
print(f"{k}: {v}")
ram_gb: 16.0
gpu: {'type': 'apple', 'name': 'Apple Silicon (unified memory)', 'vram_gb': 16.0}
usable_gb: 12.8
platform: mac
Apple Silicon Mac (16GB)에서 실행한 결과입니다. 사용 가능한 메모리가 12.8GB(전체의 80%)로 계산됩니다.
모델 추천 (전체)
import ollama_advisor as oa
df = oa.recommend()
print(df[['tag', 'param_size', 'required_gb', 'usable_gb', 'purposes', 'fits']].head(10).to_string(index=False))
tag param_size required_gb usable_gb purposes fits
llama3.1:8b 8b 5.80 12.8 [general] True
deepseek-r1:1.5b 1.5b 1.90 12.8 [general, reasoning] True
deepseek-r1:7b 7b 5.20 12.8 [general, reasoning] True
deepseek-r1:8b 8b 5.80 12.8 [general, reasoning] True
deepseek-r1:14b 14b 9.40 12.8 [general, reasoning] True
nomic-embed-text default 4.00 12.8 [embedding] True
llama3.2:1b 1b 1.60 12.8 [general] True
llama3.2:3b 3b 2.80 12.8 [general] True
gemma3:1b 1b 1.60 12.8 [general] True
gemma3:4b 4b 3.40 12.8 [general] True
fits 컬럼이 True인 모델은 현재 시스템에서 실행 가능한 모델입니다.
목적별 모델 추천
purpose 파라미터로 용도에 맞는 모델만 필터링할 수 있습니다.
purpose= | 용도 | 대표 모델 |
|---|---|---|
"all" | 전체 모델 (기본값) | — |
"general" | 채팅, 글쓰기, 일반 작업 | llama3.2, gemma3, mistral |
"coding" | 코드 생성, 디버깅 | qwen2.5-coder, gemma4 |
"reasoning" | 수학, 논리, 추론 | deepseek-r1, qwen3 |
"vision" | 이미지 이해, 멀티모달 | llava, llama3.2-vision |
"embedding" | 벡터 검색 / RAG | nomic-embed-text |
"audio" | 음성 인식 | whisper |
코딩 모델 Top 5
df = oa.recommend(purpose="coding", top_n=5)
print(df[['tag', 'param_size', 'required_gb', 'usable_gb', 'purposes', 'fits']].to_string(index=False))
tag param_size required_gb usable_gb purposes fits
gemma4:12b 12b 8.2 12.8 [coding, general, reasoning] True
qwen2.5-coder:0.5b 0.5b 1.3 12.8 [coding, general, reasoning] True
qwen2.5-coder:1.5b 1.5b 1.9 12.8 [coding, general, reasoning] True
qwen2.5-coder:3b 3b 2.8 12.8 [coding, general, reasoning] True
qwen2.5-coder:7b 7b 5.2 12.8 [coding, general, reasoning] True
추론 모델 Top 5
df = oa.recommend(purpose="reasoning", top_n=5)
print(df[['tag', 'param_size', 'required_gb', 'usable_gb', 'purposes', 'fits']].to_string(index=False))
tag param_size required_gb usable_gb purposes fits
deepseek-r1:1.5b 1.5b 1.90 12.8 [general, reasoning] True
deepseek-r1:7b 7b 5.20 12.8 [general, reasoning] True
deepseek-r1:8b 8b 5.80 12.8 [general, reasoning] True
deepseek-r1:14b 14b 9.40 12.8 [general, reasoning] True
qwen3:0.6b 0.6b 1.36 12.8 [general, reasoning] True
설치된 모델 확인
Ollama 서버가 실행 중이어야 합니다.
installed = oa.list_installed()
for m in installed[:5]:
size_gb = m['size'] / (1024**3)
print(f"{m['name']:30s} {size_gb:.1f} GB")
qwen2.5-coder:0.5b 0.4 GB
moondream:latest 1.6 GB
mxbai-embed-large:latest 0.6 GB
phi3:mini 2.0 GB
llama3.2:3b 1.9 GB
모델 다운로드 및 실행
oa.pull_model("qwen2.5-coder:0.5b")
response = oa.run_model("qwen2.5-coder:0.5b", prompt="Write a Python hello world")
print(response)
oa.stop_model("qwen2.5-coder:0.5b")
CLI 사용법
터미널에서도 바로 사용할 수 있습니다.
ollama-advisor recommend --purpose coding
ollama-advisor pull qwen2.5-coder:7b
ollama-advisor run qwen2.5-coder:7b --prompt "hello"
ollama-advisor stop qwen2.5-coder:7b
ollama-advisor list
ollama-advisor specs
Google Colab
Colab 환경에서도 사용 가능합니다. setup_colab_ollama()를 호출하면 Colab VM에 Ollama를 자동으로 설치하고 시작합니다.
!pip install -q ollama-advisor
import ollama_advisor as oa
# Ollama 없이도 추천 가능
oa.recommend(purpose="coding", top_n=5)
# Colab VM에 Ollama 설치 및 시작
oa.setup_colab_ollama()
# 모델 다운로드 및 실행
oa.pull_model("qwen2.5-coder:0.5b")
print(oa.run_model("qwen2.5-coder:0.5b", prompt="hello"))
동작 원리
| 모듈 | 역할 |
|---|---|
system.py | RAM/GPU/플랫폼 감지, 사용 가능 메모리 계산 (전체의 80%) |
catalog.py | ollama.com/library 크롤링, ~/.ollama_advisor_cache.json에 캐시 (6시간 TTL) |
purpose.py | 모델 분류: coding / reasoning / vision / embedding / audio / general |
core.py | recommend() — 사양 + 카탈로그 + 목적 결합 |
colab.py | setup_colab_ollama() — Google Colab 전용 Ollama 설치/시작 |
ctl.py | ollama Python 클라이언트 래퍼 |
메모리 추정 (약 4-bit 양자화 기준): required_gb = 파라미터(B) × 0.6 + 1.0
📦 다운로드 통계
| 구분 | 건수 |
|---|---|
| 오늘 (2026-08-19) | 9 |
| 누적 다운로드 | 1,283 |
pypistats.org/packages/ollama-advisor 기준, GitHub Actions로 매일 자동 업데이트됩니다.
라이선스
MIT — LICENSE
ollama-advisor (English)
Overview
ollama-advisor is a Python library that automatically recommends runnable Ollama models based on your system specs (RAM, GPU VRAM) and use case (coding, reasoning, vision, embedding, etc.).
Supports Mac, Windows, Linux, and Google Colab.
- PyPI: ollama-advisor
- GitHub: dschloe/ollama-advisor
Installation
pip install ollama-advisor
Usage
Check System Specs
Works even without Ollama installed.
import ollama_advisor as oa
specs = oa.get_system_specs()
for k, v in specs.items():
print(f"{k}: {v}")
ram_gb: 16.0
gpu: {'type': 'apple', 'name': 'Apple Silicon (unified memory)', 'vram_gb': 16.0}
usable_gb: 12.8
platform: mac
Results from an Apple Silicon Mac (16 GB). Usable memory is calculated as 80% of total.
Model Recommendations (All)
import ollama_advisor as oa
df = oa.recommend()
print(df[['tag', 'param_size', 'required_gb', 'usable_gb', 'purposes', 'fits']].head(10).to_string(index=False))
tag param_size required_gb usable_gb purposes fits
llama3.1:8b 8b 5.80 12.8 [general] True
deepseek-r1:1.5b 1.5b 1.90 12.8 [general, reasoning] True
deepseek-r1:7b 7b 5.20 12.8 [general, reasoning] True
deepseek-r1:8b 8b 5.80 12.8 [general, reasoning] True
deepseek-r1:14b 14b 9.40 12.8 [general, reasoning] True
nomic-embed-text default 4.00 12.8 [embedding] True
llama3.2:1b 1b 1.60 12.8 [general] True
llama3.2:3b 3b 2.80 12.8 [general] True
gemma3:1b 1b 1.60 12.8 [general] True
gemma3:4b 4b 3.40 12.8 [general] True
Models with fits = True can run on your current system.
Filter by Purpose
Use the purpose parameter to filter models by use case.
purpose= | Use case | Example models |
|---|---|---|
"all" | All models (default) | — |
"general" | Chat, writing, general tasks | llama3.2, gemma3, mistral |
"coding" | Code generation, debugging | qwen2.5-coder, gemma4 |
"reasoning" | Math, logic, reasoning | deepseek-r1, qwen3 |
"vision" | Image understanding, multimodal | llava, llama3.2-vision |
"embedding" | Vector search / RAG | nomic-embed-text |
"audio" | Speech recognition | whisper |
Top 5 Coding Models
df = oa.recommend(purpose="coding", top_n=5)
print(df[['tag', 'param_size', 'required_gb', 'usable_gb', 'purposes', 'fits']].to_string(index=False))
tag param_size required_gb usable_gb purposes fits
gemma4:12b 12b 8.2 12.8 [coding, general, reasoning] True
qwen2.5-coder:0.5b 0.5b 1.3 12.8 [coding, general, reasoning] True
qwen2.5-coder:1.5b 1.5b 1.9 12.8 [coding, general, reasoning] True
qwen2.5-coder:3b 3b 2.8 12.8 [coding, general, reasoning] True
qwen2.5-coder:7b 7b 5.2 12.8 [coding, general, reasoning] True
Top 5 Reasoning Models
df = oa.recommend(purpose="reasoning", top_n=5)
print(df[['tag', 'param_size', 'required_gb', 'usable_gb', 'purposes', 'fits']].to_string(index=False))
tag param_size required_gb usable_gb purposes fits
deepseek-r1:1.5b 1.5b 1.90 12.8 [general, reasoning] True
deepseek-r1:7b 7b 5.20 12.8 [general, reasoning] True
deepseek-r1:8b 8b 5.80 12.8 [general, reasoning] True
deepseek-r1:14b 14b 9.40 12.8 [general, reasoning] True
qwen3:0.6b 0.6b 1.36 12.8 [general, reasoning] True
List Installed Models
Requires a running Ollama server.
installed = oa.list_installed()
for m in installed[:5]:
size_gb = m['size'] / (1024**3)
print(f"{m['name']:30s} {size_gb:.1f} GB")
qwen2.5-coder:0.5b 0.4 GB
moondream:latest 1.6 GB
mxbai-embed-large:latest 0.6 GB
phi3:mini 2.0 GB
llama3.2:3b 1.9 GB
Download and Run Models
oa.pull_model("qwen2.5-coder:0.5b")
response = oa.run_model("qwen2.5-coder:0.5b", prompt="Write a Python hello world")
print(response)
oa.stop_model("qwen2.5-coder:0.5b")
CLI
ollama-advisor recommend --purpose coding
ollama-advisor pull qwen2.5-coder:7b
ollama-advisor run qwen2.5-coder:7b --prompt "hello"
ollama-advisor stop qwen2.5-coder:7b
ollama-advisor list
ollama-advisor specs
Google Colab
Works in Colab too. Call setup_colab_ollama() to automatically install and start Ollama on the Colab VM.
!pip install -q ollama-advisor
import ollama_advisor as oa
# Recommendations work without Ollama
oa.recommend(purpose="coding", top_n=5)
# Install and start Ollama on Colab VM
oa.setup_colab_ollama()
# Download and run a model
oa.pull_model("qwen2.5-coder:0.5b")
print(oa.run_model("qwen2.5-coder:0.5b", prompt="hello"))
How It Works
| Module | Role |
|---|---|
system.py | Detect RAM/GPU/platform; compute usable memory (80% of total) |
catalog.py | Crawl ollama.com/library; cache at ~/.ollama_advisor_cache.json (6h TTL) |
purpose.py | Classify models: coding / reasoning / vision / embedding / audio / general |
core.py | recommend() — combine specs, catalog, and purpose |
colab.py | setup_colab_ollama() — install/start Ollama on Google Colab |
ctl.py | Wrapper around the ollama Python client |
Memory estimate (approx. 4-bit quantization): required_gb = params(B) × 0.6 + 1.0
📦 Download Stats
| Metric | Count |
|---|---|
| Today (2026-08-19) | 9 |
| Total (cumulative) | 1,283 |
Based on pypistats.org/packages/ollama-advisor, updated daily via GitHub Actions.
License
MIT — LICENSE