AI2025년 5월 14일1분 읽기

Ollama로 로컬 LLM 실행하기 — LLaMA, Mistral, Phi

YS
YoungSam
조회 1969

Ollama 시작하기

# 설치 (Linux)
curl -fsSL https://ollama.com/install.sh | sh

# 모델 실행
ollama run llama3.1:8b
ollama run mistral:7b
ollama run phi3:mini

API 활용

// OpenAI 호환 API
const response = await fetch("http://localhost:11434/v1/chat/completions", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    model: "llama3.1:8b",
    messages: [{ role: "user", content: "Hello" }],
  }),
});

GPU 메모리 기준

  • 7B 모델: 8GB VRAM
  • 13B 모델: 16GB VRAM
  • 70B 모델: 48GB+ VRAM
OllamaLocal LLMLLaMA

댓글 0

아직 댓글이 없습니다.