본문 바로가기
C.W.K.
Stream
Lesson 02 of 05 · published

Pull과 Run

~22 min · ollama, models

Level 0Downloader
0 XP0/41 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

model:tag 네임스페이스

모든 Ollama 모델은 name:tag 형태로 주소를 받아. Default tag (예를 들어 ollama pull qwen2.5가 resolve하는 그거)는 모델 maintainer가 골라둔 무난한 quantization이야. 특정 quant이나 size로 고정하고 싶으면 tag를 명시해서 써.

예: qwen2.5:7b-instruct-q5_K_M는 이렇게 읽혀:

  • qwen2.5 — model family
  • 7b — parameter size
  • instruct — variant (instruction-tuned, base 아님)
  • q5_K_M — quantization

Pull과 run

ollama pull이 모델 blob들을 다운로드 (Docker layer처럼 layered — 같은 blob이 여러 tag에 공유되면 한 번만 다운). ollama run이 interactive chat REPL 띄우고 모델 없으면 먼저 pull해. 둘 다 중간에 끊긴 다운로드를 이어받아.

모델 저장 위치

macOS: ~/.ollama/models/. Linux: /usr/share/ollama/.ollama/models/. OLLAMA_MODELS 환경변수로 외장 드라이브에 옮길 수 있어. 부팅 디스크가 빠듯할 때 유용해.

Code

Pull, run, list, inspect·bash
# Default tag pull
ollama pull qwen2.5

# 특정 quant pull
ollama pull qwen2.5:7b-instruct-q5_K_M

# Interactive 실행 (없으면 pull)
ollama run qwen2.5
# /bye로 종료, /?로 도움말

# 설치된 모델 list (크기 포함)
ollama list

# 특정 모델 inspect
ollama show qwen2.5:7b
ollama show qwen2.5:7b --modelfile

# 현재 로드된 모델 + 메모리 사용량
ollama ps
외장 저장소로 모델 옮기기·bash
# daemon이 이걸 시작할 때 읽어. 그래서 순서가 중요해.
# 설정하고, Ollama를 재시작하고, 그다음에 pull.

# 1. daemon이 보는 자리에 persist (macOS / launchd)
launchctl setenv OLLAMA_MODELS /Volumes/ExternalSSD/ollama-models
#    Linux (systemd):
#      sudo systemctl edit ollama.service
#      Environment="OLLAMA_MODELS=/mnt/ssd/ollama-models"

# 2. daemon 재시작해서 새 저장소를 집게 해. 어떻게 깔았는지에 맞는 줄을 써.
#    install 레슨의 macOS 경로는 Homebrew고, osascript 쪽은 데스크톱 앱에서만 돼.
brew services restart ollama                    # Homebrew (macOS)
# osascript -e 'tell application "Ollama" to quit'; open -a Ollama   # 앱
# sudo systemctl daemon-reload && sudo systemctl restart ollama       # Linux

# 3. 저장소가 옮겨졌는지 확인하고, 그다음에 다시 pull
ollama list                 # 새 위치라 목록이 비어 있어야 정상
ollama pull qwen2.5:7b

# `export`만 치면 그건 네가 친 셸에만 걸려. daemon은 이미 따로 떠 있는
# 프로세스라서 그 값을 영영 못 봐.

External links

Exercise

같은 모델을 두 가지 flavor로 pull해 — default tag랑 explicit larger quantization. ollama list랑 ollama show 둘 다 확인. 크기 차이랑 각각이 찍는 context length를 메모해. 그 숫자는 아키텍처의 최대치지 요청 하나가 받는 창이 아니야. Ollama 런타임 기본값은 그보다 훨씬 작고 모델이나 네 options가 올려줘야 커져. num_ctx가 API 트랙에 자기 레슨을 따로 갖고 있는 이유야.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인 — 댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.