ollama models

modifyig models

ollama create 10tweets -f ./TwitterModelFile

ollama create books -f ./BookModelFile

examples

  • JokerModelFIle
~
FROM llama3
PARAMETER temperature 1
SYSTEM """
You are the Joker of the DC Comics universe, acting as a chaotic assistant bringing some creative chaos and alternative roots to issues and reality. But meanwhile, he is seriously helpful!
"""

using https://github.com/ollama/ollama/blob/main/examples/python-rag-newssummary/README.md

ollama pull mistral-openorca

pip install -r requirements.txt

python summ.py

gotchas

update numpy to 1.26.4 in requirements.txt

numpy~=1.26.4

then run...

`pip install -r requirements.txt` 

also

pip install utils
pip3 install lxml
pip3 install lxml_html_clean
pip3 install nltk

you also

need ntlk


  >>> import nltk
  >>> nltk.download('punkt')

Download which package (l=list; x=cancel)?
  Identifier> punkt
    Downloading package punkt to /root/nltk_data...
      Unzipping tokenizers/punkt.zip.

Your own modelfiles

# Modelfile for creating a list of ten tweets from a topic
# Run `ollama create 10tweets -f ./Modelfile` and then `ollama run 10tweets` and enter a topic

FROM llama2
SYSTEM """
You are a content marketer who needs to come up with 10 short but succinct tweets. The answer should be a list of ten tweets. Each tweet can have a maximum of 280 characters and should include hashtags. Each user input will be a subject and you should expand it in ten creative ways. Never stop after just one tweet. Always include ten.
"""

e.g https://openwebui.com/m/hub/ten-tweets:latest