Ollama

Ollama is aweome! I can now download and run AI models on my computer.

I first installed Ollama. Then I downloaded the Llama 2 model.

1
ollama pull llama2

Kinda reminds me of Docker.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
rohan@polaris ~> ollama run llama2
>>> What is BPE (Byte Pair Encoding)?
Byte Pair Encoding (BPE) is a text representation technique used in natural language processing (NLP)
and machine learning (ML) to reduce the dimensionality of text data. It involves replacing sequences
of consecutive letters with a single symbol, called a "byte pair," to create a more compact and dense
representation of the text.

The process of BPE works as follows:

1. Tokenize the text into individual words or subwords.
2. For each word or subword, find the most frequent sequence of consecutive letters in that word or^C

No OpenAI key, no Internet connection, no problem. I can now run AI models on my computer.

I played around with codellama for a while, as it’s more focused for code completion. Next is to use this from Emacs as I’m currently using GitHub Copilot, and I want to see how they compare.

With the use of llamaindex, I can now use RAG (Retrieval-Augmented Generation) to train models on my own data. RAG is preferred over fine-tuning.