Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
prefix caching in llama.cpp with MLX
#1
Spent some time on this today and wanted to compare notes.

I've gone back and forth between llama.cpp and PyTorch for FLUX. The interesting difference for me has been long context.

Trying to avoid rebuilding the whole thing twice.
Reply
#2
A couple things I'd check first. Start by verifying the driver/runtime combo, then test with a smaller prompt, then look at quant drift. Once you know the plain path works, then add the faster path back in piece by piece.
Reply
#3
What exact setup are you running? What model, what runtime, and roughly what context size?
Reply
#4
I don't think that's the whole story. I wouldn't optimize around that first. On my side the bigger swing came from the runtime and not the model. Worth testing the simpler explanation before adopting the more interesting one.
Reply
#5
Good point. I ended up in about the same place using llama.cpp. I got better results once I stopped chasing one metric and just looked at whether the workflow felt usable. I keep promising myself this is the last rebuild.
Reply
#6
Quote:Good point. I ended up in about the same place using llama.cpp. I got better results once I stopped chasing one metric and just looked at whether the

I'd approach it in a boring order. If you're on PyTorch, I'd confirm the version first and then reduce variables until the behavior is obvious. A lot of these threads end up being one bad config plus a pile of conclusions drawn from it.
2x3090 • llama.cpp • too much VRAM is still not enough
Reply
#7
Maybe, but I had the opposite result. I've seen people blame workstation thermals when the real issue was much more mundane. Worth testing the simpler explanation before adopting the more interesting one.
Mostly CUDA, sometimes wrong, usually measured
Reply
#8
My first guess would be this: Start by verifying the driver/runtime combo, then test with a smaller prompt, then look at INT4. Once you know the plain path works, then add the faster path back in piece by piece.
mostly local
Reply
#9
Ran a quick check on my box. I couldn't reproduce the slowdown until I pushed context much higher.
Reply
#10
Quote:Ran a quick check on my box. I couldn't reproduce the slowdown until I pushed context much higher.

Ran a quick check on my box. The issue went away once I changed one setting and restarted the stack cleanly. I expected the model choice to matter more than it did.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)