I tried running Ollama on a Pi. It took so long it gave up trying to connect. Unless you have a good deal of resources, running Ollama on a 4GB RAM Pi isn’t the best idea. I’m not sure if swap would help much.
On a similar but off-topic note, in my experience, running a Discourse dev env on a 4GB RAM Pi with no swap on a SD Card doesn’t work. But that’s neither here nor there.