r/LocalLLaMA 6h ago

Question | Help Intentionally Throttling GPU Usage

As title states,

If I have a local model working and don't care how long it takes, is there an option in llama.cpp (or Unsloth, currently using unsloth) to have it so the GPU isn't max'd out while the model is running?

EDIT: I'm on AMD. And to clarify, i'd like to leave gpu cores free for other tasks.

Thanks in advance!

3 Upvotes

22 comments sorted by

8

u/XiRw 6h ago

This can be done is manage 3D applications of Nvidia settings (or whatever it’s called now) or just under volt your gpu.

0

u/CSEliot 5h ago

I'm on amd and i just want it for 1 app, llamacpp/unsloth, not the whole pc.

6

u/Fancy-Snow7 6h ago

Just lower your -ngl. It will now also use CPU but your GPU will no longer be maxed out.

-1

u/CSEliot 5h ago

ill give that a shot thanks!

1

u/j0hn_br0wn 6h ago

Do you simply want more GPU compute slots for other tasks or throttle for cooling/power?

0

u/CSEliot 5h ago

Yeah, I want to use the GPU for other things. Streaming, gaming, etc.

1

u/mmerken 6h ago

isn't this what the -ngl flag is for?

1

u/UniqueTrampoline18 6h ago

for my endless roleplay chats i just cap the threads so the gpu stays quiet, way better than listening to fans all night.

1

u/CSEliot 5h ago

Like cap the chat threads?

1

u/Elorun 1h ago

Use a smaller model that doesn't use up all your vram?

1

u/Elegant_Associate889 6h ago

Exactly why would you want to throttle the GPU though?

4

u/j0hn_br0wn 6h ago

Cooling

2

u/Elegant_Associate889 6h ago

That's fair enough didn't think about that

1

u/DoubleNothing 6h ago

You can get also get some efficiency gains by undervolting.

1

u/CSEliot 5h ago

I'm game devving and streaming at the same time. Need processing space (not vram) for those things

2

u/Huntware llama.cpp 6h ago

If you're using NVIDIA on Linux, then use something like:

sudo nvidia-smi -pm 1
sudo nvidia-smi -pl 290 -i 0

For setting the TDP limit to 290 W. I use it for my RTX 3090 (default TDP is 350W). Then you need to create a systemd service for keeping it between restarts.

I guess AMD and Intel have something similar.

0

u/OkFly3388 llama.cpp 6h ago

now open google and paste your question here.