Run LLaMA2 with Ollama

Run LLaMA2 with Ollama

With Ollama application, we can run the Large language models on local machine.

Ollama application is available for MacOs and Linux and can be installed like any package on the macOS.

  1. Download the Ollama app from https://ollama.ai/ and install it.
  2. Run this command to download the Meta LLaMA2 Large language model and it will run and share prompt as shown in your local PC.

ollama run llama2        

3. it will display the prompt and we can query the like ChatGPT UI.

4. For programming interface, we can interact with model by interacting with Ollama port 11434

curl -X POST https://localhost:11434/api/generate -d '{
  "model": "llama2",
  "prompt":"Why Pluto is not a planet?"
 }'        

5. We can use langchain library to interact with Ollama in python and do the queries to any PDFs or datasets by creating the embeddings using Chroma.

In my test environment, asking the questions to large PDF by LLama2 model is very slow and model took 30-40 seconds from 120 pages company report files.

Ollama and LLama 2 definitely open lot of opportunities for application developers to start consuming the large language models in their business applications.


Srinivasa Dinesh Parupalli

Program Manager | Program Architect | Senior Technical Director | IIM - Raipur | 3x Certified Cloud Architect | Senior Cloud Solutions & AI Architect | ML and AI Enthusiastic | But Still a Student.

1 年

I was quite happy using LLaMA but concern started when Zuckerberg, in his latest podcast with Fridman, said that Meta might have to reconsider if it is going to open source with?Llama 3. Q1 of 2024 would be exciting to watch as LLaMA 3 which is intended to compete with GPT-4. Let's see how it goes from here.

Sunny Parkash

Technology Leader

1 年

You made it look so easy

要查看或添加评论,请登录

Sandeep K.的更多文章

社区洞察

其他会员也浏览了