Ollama 사용기

in GPT COMMUNITY6 months ago (edited)

Ollama에 대한 더 자세한 정보는 아래 링크를 방문해 주세요.

https://anpigon.tistory.com/434




Ollama는 현재 맥과 리눅스에서만 사용 가능하다.

https://ollama.ai/

위 사이트에서 다운로드 받아서 설치해도 되고, 맥 사용자라면 homebrew를 사용해서 설치 할 수 있다.

brew install ollama

ollama 도커 이미지도 제공하고 있어서, 윈도우 사용자라면 도커에서 실행하면 될 것 같다.

ollama에서 제공하는 AI모델 중에서 다음 3개가 가장 인기 있다.


출처: https://ollama.ai/library?sort=popular

llama2는 7b, 13b, 70b 모델을 제공하고 있으며, 각각 실행하기 위해서는 8G, 16GB, 64GB RAM이 필요하다.

내가 가진 맥북의 RAM이 32GB라서 사용가능한 모델을 다운로드 했다.

# Meta에서 출시한 AI모델
ollama run llama2:13b

# 오픈 라이센스 중에서 가장 인기 많은 AI모델 
ollama run mistral

# 코드 생성을 위한 모델
ollama run codellama:34b

# 멀티모달 모델
ollama run llava

멀티모달 테스트

Mistral

This is a picture of a bird, possibly a sparrow or a finch. The bird appears to be perched on a branch with its wings
folded neatly behind it. Its feathers are a mix of shades of brown and white, giving it a warm and earthy appearance.
The background is blurred, suggesting that the camera was focused on the bird itself. Overall, the picture captures a
moment of stillness and tranquility in nature.

LLaVA

1. A small green bird perched on a white bowl.
2. The bird's wings are closed while it is perched on the bowl.
3. The scene appears to be set in a forest.

프롬프트 테스트

큰따옴표 세 개로 구분된 텍스트가 제공됩니다. 
다음 형식으로 해당 지침을 다시 작성합니다:

1 단계 - ...
2 단계 - …
…
N 단계 - …

"""
차 한 잔을 만드는 것은 쉽습니다! 
먼저 물을 끓여야 합니다. 
끓는 동안 컵을 들고 티백을 넣으세요. 
물이 충분히 뜨거워지면 티백 위에 붓기만 하면 됩니다. 
차가 우러날 수 있도록 잠시 기다리세요. 
몇 분 후 티백을 꺼내세요. 
원한다면 설탕이나 우유를 넣어 맛을 더할 수 있습니다. 
그게 다입니다! 
맛있는 차 한 잔이 완성되었습니다.
"""

llama2:13b

Sure! Here are the instructions for making a simple tea, following the format you provided:

1. Step - Gather ingredients and equipment

* Tea leaves (black tea or green tea)
* Water
* Kettle
* Cup
* Teaspoon (optional)

2. Step - Boil water

* Place kettle on stove and turn on heat
* Wait for water to boil

3. Step - Add tea leaves

* Pour hot water over tea leaves in cup
* Wait for tea to steep for 1-3 minutes, depending on the type of tea and desired strength

4. Step - Strain and serve

* Use a teaspoon or strainer to remove tea leaves from the liquid
* Serve hot or iced, with optional sweeteners such as sugar, honey, or milk

N. Step - Enjoy your delicious tea!

Note: You can adjust the amount of tea leaves and steeping time to suit your personal taste preferences. Additionally,
you can add other ingredients such as lemon or herbs to create different flavors.

mistral

1 단계 - 물을 끓여야 합니다.
2 단계 - 물이 충분히 뜨거워지면 티백 위에 붓기만 하면 됩니다.
3 단계 - 차가 우러나는 시간을 기다립니다.
4 단계 - 티백을 꺼내세요.
5 단계 - 설탕이나 우유를 넣어 맛을 더할 수 있습니다.
그래서 차 한 잔이 완성되었습니다.

요약하기

당신의 임무는 전자상거래 웹사이트의 제품 리뷰에 대해 짧은 요약을 생성하는 것입니다. 
큰따옴표 세 개로 구분된 리뷰를 **최대 30단어 이내로 요약하세요**.

"""
딸의 생일 선물로 이 팬더 봉제 인형을 받았는데, 
딸이 좋아해서 어디든 가지고 다닙니다. 
부드럽고 매우 귀엽고 얼굴이 친근한 표정입니다. 
하지만 제가 지불한 금액에 비해 조금 작아요. 
같은 가격에 더 큰 다른 옵션이 있을 것 같아요. 
예상보다 하루 일찍 도착해서 아이에게 주기 전에 제가 직접 가지고 놀 수 있었어요.
"""

llama2:13b

Sure, here's a summary of the review in 30 words or less:

"Received a cute and soft Pander plush toy as a birthday gift for my daughter. It's well-made and has a friendly
expression, but the price is a bit steep compared to other options."

mistral

이 팬더 인형은 딸의 생일 선물로, 부드럽고 매우 귀엽하며 얼굴이 친근한 표정입니다. 그러나 제가 지불한 금액에 비해 조금 작아요. 같은 가격에 더 큰 다른 옵션이 있을 것 같어요.

다음에 계속...

Coin Marketplace

STEEM 0.20
TRX 0.12
JST 0.028
BTC 64294.64
ETH 3491.72
USDT 1.00
SBD 2.53