Bought a coral TPU to run LLMs quicker on my pi5 8gb. Found out that won’t work. What now?

As it says in title, I purchased a coral TPU a little too hastily, and now I’m stuck with something that won’t work for my intended use case.

I’m not interested in Frigate, what are some other cool uses/projects for a coral TPU and a pi5? I’m just using the pi5 as a desktop replacement ATM. Like it a lot. Thought it would be cool to try some local LLMs but it’s pretty slow on its own.

So, two questions I guess:

  1. Anything cool to do with a coral TPU?
  2. Any tricks to speed up Ollama on a pi5?

Posted Jan 25, 2024, 12:39 PM UTC

17
ElectricSpock•

Wait, what do you mean by it won't work? I have a Dual Edge TPU in my drawer, and Pineberry Pi is supposed to be delivered literally today! What's the problem here?

Do we need r/raspberrypi_ml? :)

3
ElectricSpock•

On the side of "what can I do with the TPU": I actually met a TL Lite developer, and apparently one of the most popular use cases is image/video processing. Pairing it with a relatively powerful image and video unit in RPi I'm tempted to try out some computer vision exercises.

3
tyrandan2•

That subreddit does not exist, dangit

1
al_nz•

I have a Pi5 and a USB Coral. I've managed to get it working with Frigate.

Be warned that the native version of Python is too new for the Coral runtime to run. You need to run a venv for it to work. This isn't the case when using Frigate in a Docker container, the right version is baked into the container.

I haven't got to the point of fully configuring it beyond basic setup yet.

3
Bakedsoda•

What’s the best way to run frigate rocket on pi 5 using coral usb..

Please share any insight 

1
al_nz•

Run Frigate in a Docker container. I use Portainer.

1
Johnson_2022•

Why wont it work?

I saw a guy on YT having a Coral hat with Pi5 and using Llama (I believe). He tried like 5 different language models.

2

I think that video was speed up

1
BadBoy17Ge•

Try using smaller models like phi 2 it might work

1
MordAFokaJonnes•

I also bought the RPi 5 and a Coral Dual TPU + Pi M2 adapter to realize it won't work for that intended use case because the models are too memory intensive and somehow the way it works doesn't take advantage of the TPU device... I might migrate my Frigate NVR into the RPi5 but then I have also a USB Coral TPU that I am using currently that won't have use later on...

1
EdPike365•

Be aware that most of the m.2 pi hats only support the single sided coral tpu. The only double edge tpu support i know of is by pineboards. It just recently came out and I could only buy it directly from the maker, in Poland. Mine are in the mail and should get here this week https://pineboards.io/products/hat-ai-dual-edge-coral-tpu-bundle-for-raspberry-pi-5 . I bought 2 because shipping was so high. I'm hoping to get one working on rpi5 and one on an orange pi. As for what to do with it? Blog about it :-)

1
Hector_Pulido•

I'm creating a software to super resolution videogame frames using the Coral TPU, render the game in 800x600 and super sample to 1920x1080 🤔

1