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.
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.
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.
Technology Leader
1 年You made it look so easy