브렌쏭의 Veritas_Garage

[Continue] 로컬에서 작동하는 AI 본문

[Project_하다]/[TroubleShoot_문제해결]

[Continue] 로컬에서 작동하는 AI

브렌쏭 2024. 8. 6. 15:06

1. Ollama 설치

귀여움

Download Ollama

 

Download Ollama on macOS

Download Ollama on macOS

ollama.com

홈페이지에서 실행파일 형태를 받아서 사용하거나, Github 에서 원하는 형태를 받아서 사용한다. (Docker 등)

ollama/ollama

 

GitHub - ollama/ollama: Get up and running with Llama 3.1, Mistral, Gemma 2, and other large language models.

Get up and running with Llama 3.1, Mistral, Gemma 2, and other large language models. - ollama/ollama

github.com

2. 로컬에서 AI 모델 다운로드, 실행

ollama run llama3.1

 

요즈음 핫한 라마3.1을 써보자. 오픈소스 모델인데 GPT-4o를 밟았다고 소문이 자자함

M1 맥 기준으로도 꽤나 쾌적하다 (8b 모델)

이제 로컬에서 Ollama가 실행되고 있다. 아마 localhost:14434 포트로 작동하고 있을 것이다.

만약 작동하고 있는것 같지 않다면 

ollama serve

Continue 설치

일단 VS code에서 사용할 수 있도록, 범용 클라이언트를 설치한다.

Continue라는 녀석을 사용할 예정이다.

Continue

 

Continue

Amplified developers, automated development · Customize and optimize each component of your AI dev system · Accelerate your development with Continue · Fit

www.continue.dev

VS code 익스텐션을 설치하자

Continue-VS code Extension

 

Continue - Codestral, Claude, and more - Visual Studio Marketplace

Extension for Visual Studio Code - The leading open-source AI code assistant

marketplace.visualstudio.com

Continue 설정

{ 	
    "title": "Llama3.1:8b", 	
    "provider": "ollama", 	
    "model": "Llama3.1"  
}

 

위 정보를 넣어준다.

잘 찾아보면 우측 하단에서 누르는 방법도 있다

VS code에서 Ctrl + Shift + P 를 눌러 Continue: Open config.json 을 선택한다.

  "tabAutocompleteModel": { 	
    "title": "Llama3.1:8b", 	
    "provider": "ollama", 	
    "model": "llama3.1-8b"  
  },

 

위 "tabAutocompleteModel" 아래에 넣어주면 된다.

 

Profit!

상세 영상

 

 

Comments