Project Jo

Llama 3.1 on Mac 본문

Developer/LLM

Llama 3.1 on Mac

Project Jo 2024. 9. 8. 07:13

Llama 3.1 설치 및 테스트를 진행한다.

1. Llama 홈페이지를 참고해 설치를 진행한다.

https://llama.meta.com/docs/llama-everywhere/running-meta-llama-on-mac/

 

Running Meta Llama on Mac | Llama Everywhere

For this demo, we are using a Macbook Pro running Sonoma 14.4.1 with 64GB memory. Since we will be using Ollamap, this setup can also be used on other operating systems that are supported such as Linux or Windows using similar steps as the ones shown here.

llama.meta.com

 

2. Ollama 설치

홈페이지에 접속해서 다운도르를 진행한다. https://ollama.com/

 

Ollama

Get up and running with large language models.

ollama.com

다운로드 버튼을 선택한다.
자신에 맞는 OS 를 선택한다.

3. Llama 3.1 설치

Ollama 설명을 참고해서 3.1을 설치 한다. https://ollama.com/library

 

library

Get up and running with large language models.

ollama.com

 

모델 목록 화면에서 llama3.1 을 선택
개인 PC 에 설치하기에 가장 가벼운 8b 를 선택
설치 및 테스트 화면

모두 설치가 끝나면 한글로 질문을해도 잘 대답해 주는걸 볼수 있다.

 

4. HTTP 프로토콜 요청

프로토콜 문서를 확인해서 진행해 본다.

https://github.com/ollama/ollama/blob/main/docs/api.md

 

ollama/docs/api.md at main · ollama/ollama

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

github.com

 

우리는 서비스 개발을 목적으로 진행하고 있기에 프로토콜을 이용해 정상적으로 동작하는지 확인 한다.

예제를 통한 질문시 응답 (한번에 받기)
예제를 통한 질문시 응답 (스트림으로 받기)

 

이제 간단한 서비스를 만들어 나만의 GPT 를 만들어 보자!

'Developer > LLM' 카테고리의 다른 글

Python 서버 만들기  (0) 2025.04.15
페르소나(Persona)  (0) 2025.04.14
FineTuning  (0) 2025.04.14
Role과 Content의 개념  (0) 2025.04.08
Ollama 외부 접근 on Mac  (0) 2025.04.04