How to run a local LLM
Here is a simple setup on how to install your local AI,
Here are some example files and processing starting point:
︎︎︎https://drive.google.com/drive/folders/19Qf2AHBZPvhvXidim-d0JhT22STUFJ09?usp=sharing
OLLAMA
︎︎︎
install Ollama. here: https://ollama.com/
︎︎︎![]()
When you see this window you can send a first message, it will then download a model and respond.
Your first local always accesible LLM should be running!
Show all the installed models:
ollama list
( check for more models you can download here: https://ollama.com/search )
Create a new model:![]()
ollama create NameOfModel -f /location/of/your/instruct.txt
(change NameOfModel to the name you want the model to have.
After “-f ” you can drag and drop your instruct.txt into the terminal window to automatically get the location ;)
To create a new model you need a modelfile, this is a simple text file that tells the llm how to act. This can be literaly anything from responding with only emoji’s to being extremely rude and unhelpfull. In the drive link above I added an example Instruct.txt you can open it change what is in the SYSTEM """your instruction goes here""" and run the above command in terminal and you can create new ai’s!
Here is a simple setup on how to install your local AI,
give it its own character (system instruction) and connect it directly into Processing!
Here are some example files and processing starting point:
︎︎︎https://drive.google.com/drive/folders/19Qf2AHBZPvhvXidim-d0JhT22STUFJ09?usp=sharing
OLLAMA
︎︎︎
install Ollama. here: https://ollama.com/
︎︎︎

When you see this window you can send a first message, it will then download a model and respond.
Your first local always accesible LLM should be running!
Making your own LLM character!
Open TERMINAL on your computer
Here are some handy commands:Show all the installed models:
ollama list
( check for more models you can download here: https://ollama.com/search )
Create a new model:

ollama create NameOfModel -f /location/of/your/instruct.txt
(change NameOfModel to the name you want the model to have.
After “-f ” you can drag and drop your instruct.txt into the terminal window to automatically get the location ;)
To create a new model you need a modelfile, this is a simple text file that tells the llm how to act. This can be literaly anything from responding with only emoji’s to being extremely rude and unhelpfull. In the drive link above I added an example Instruct.txt you can open it change what is in the SYSTEM """your instruction goes here""" and run the above command in terminal and you can create new ai’s!
Run the Processing sketch
Run your local llm in your own Processing sketch. In the drive link on the top of the page you have the processing sketch. In the top of the sketch you can see:
String OLLAMA_MODEL = "llama3.1";
change the "llama3.1"; to whatever model you created with the step above.
![]()
String OLLAMA_MODEL = "llama3.1";
change the "llama3.1"; to whatever model you created with the step above.

