Live data from Hacker News

An LLM playground you can run on your laptop

github.com

41–50 of 58 posts

Re: An LLM playground you can run on your laptop

#41

This is very neat, thanks for sharing. I was wondering about a related thing — is there a way to query a llama.cpp (or other such local model) via an API from Python? In other words, I see a lot of cool applications being built with langchain + ClosedAPI, so I’m wondering if an API call to a local model could be a drop-in replacement for the ClosedAPI call?

There's a llama.cpp fork (I think?) with a build in HTTP server for an API.

I'm on mobile and can't find it right now though.

Re: An LLM playground you can run on your laptop

#42

This is very neat, thanks for sharing. I was wondering about a related thing — is there a way to query a llama.cpp (or other such local model) via an API from Python? In other words, I see a lot of cool applications being built with langchain + ClosedAPI, so I’m wondering if an API call to a local model could be a drop-in replacement for the ClosedAPI call?

I have a short example in my recently published book [1] on downloading a HuggingFace model and using it locally with LangChain.

[1] https://leanpub.com/langchain

EDIT: GitHub repo https://github.com/mark-watson/langchain-book-examples

Re: An LLM playground you can run on your laptop

#43

This is very neat, thanks for sharing. I was wondering about a related thing — is there a way to query a llama.cpp (or other such local model) via an API from Python? In other words, I see a lot of cool applications being built with langchain + ClosedAPI, so I’m wondering if an API call to a local model could be a drop-in replacement for the ClosedAPI call?

Maybe TextSynth server? It has a REST JSON API to pretty much every major LLM running locally with minimal dependencies (no python/pytorch/CUDA). (And I see that since last week it now has an HTML GUI too.) https://bellard.org/ts_server/ However, the GPU version is only available commercially. I'd like to see someone compare the speed of the CPU version against PyTorch or llama.cpp. (Edit: llama.cpp's author wrote "I…

Textsynth is awesome, if you don’t want to use a fine tuned version of the models…far as I can tell, there’s no documentation on how to convert a fine tuned version of a model (like alpaca) to work with textsynth.

Re: An LLM playground you can run on your laptop

#44

This is very neat, thanks for sharing. I was wondering about a related thing — is there a way to query a llama.cpp (or other such local model) via an API from Python? In other words, I see a lot of cool applications being built with langchain + ClosedAPI, so I’m wondering if an API call to a local model could be a drop-in replacement for the ClosedAPI call?

Maybe TextSynth server? It has a REST JSON API to pretty much every major LLM running locally with minimal dependencies (no python/pytorch/CUDA). (And I see that since last week it now has an HTML GUI too.) https://bellard.org/ts_server/ However, the GPU version is only available commercially. I'd like to see someone compare the speed of the CPU version against PyTorch or llama.cpp. (Edit: llama.cpp's author wrote "I…

I did try llama 30b Q4 on textsynth/CPU. I did not measure, but TextSynth seemed faster than llama.cpp

Re: An LLM playground you can run on your laptop

#46
post #6

Earlier quoted context omitted.

I wonder how people that don't read properly before doing something will fare in a world of text interfaces/ai.

Better? Because the AI will help them?

Does it matter who generated the text people don't bother to read? And how will lack of attention to detail affect prompt generation?

Re: An LLM playground you can run on your laptop

#47
post #27

Dang, I don't have a laptop, can I also run it on my desktop...? ;-)

Can it run Crysis?

Text only, it probably can and almost certainly could - it was tried on other scenarios (e.g. DnD).

...It is a good AGI test - trying the consistency in the "spacial" and temporal development of the construed world.

Re: An LLM playground you can run on your laptop

#48
post #12

Earlier quoted context omitted.

I don’t know about out of the box, but I’ve been having a great time training my own domain-specific models from scratch and utilizing them locally. It does seem that the more domain specific a task is, far fewer params are needed. Having fun right now trying to build a model in GDELT, not much luck so far, but I’ve pushed less than 5% of the data through so far. I’ve also been experimenting on fine-tuning Llama on m…

What is the ballpark cost of this hobby, if I may ask? Do you train exclusively in the cloud?

Really depends. I’ve pretty much almost burned through all the cloud credits I’ve been able to find at this point. Probably spent 20 grand over a year in credits? Never more than a couple hundred of my own money. Still trying to find a better solution. I have some 2080 TIs that I use locally. I tend to prototype architectures locally then rent out some A100s for a few hours to see how it goes, continue training when I can spare the cash.

I do a lot of CPU and sharded training too. I really wish there were better options for hobbyists to play around with this stuff.

Re: An LLM playground you can run on your laptop

#49
post #12

Earlier quoted context omitted.

I don’t know about out of the box, but I’ve been having a great time training my own domain-specific models from scratch and utilizing them locally. It does seem that the more domain specific a task is, far fewer params are needed. Having fun right now trying to build a model in GDELT, not much luck so far, but I’ve pushed less than 5% of the data through so far. I’ve also been experimenting on fine-tuning Llama on m…

Training domain-specific models from scratch is both very difficult and also not possible in some cases. Sometimes we want to generate some niche content where there isn't enough training data to create a domain-specific model. We would have to somehow find a model that can produce the niche content through understanding what we're asking rather than through actually being trained on it. Producing "understanding" is…

Totally agree there. Even people that have years of ML under their belt may have a hard time there. And the cost (and scarcity) of those GPUs really are a major barrier to entry.

Re: An LLM playground you can run on your laptop

#50
post #8

An LLM playground whose UI you can run on your laptop.

No, this is running LLMs on your laptop, although it can also connect to remote ones. Eg: "Automatically detects local models in your HuggingFace cache, and lets you install new ones." Llamma.cpp and HuggingFace models are all local.

My bad, I was wrong to miss the huggingface support.
Post reply on HN