To some extent the short answer is, you don’t.
The LLM’s people use are generally too big to train on consumer hardware.
You can implement an existing model locally, assuming you have hardware that can run it effectively and that the model is can be downloaded.
On higher end GPU’s it might also be possible to “tune” an existing model.
I’m not that interested in LLM’s, so this is about the extent of my knowledge. But apparently Mistral is a popular option for local implementations.
I don’t think you mentioned what hardware you currently have?
The setup is different depending on hardware and OS.
Most of the stuff I’ve seen or heard of seem to use Ollama to run the model so any instructions they have might be worth a look.
NVidia cards should just work, but I don’t actually know.
AMD cards generally seem to require ROCm, a sort of AI and compute specific driver, which I believe is only avaialble on a few major Linux distros.
I don’t know about AI implemntations on Intel cards or MacOS. I’d expect an Intel GPU on Windows to work if you can find a DirectX implementation.
There are videos of people running some of the smaller LLM’s on Raspberry Pi, although I’m not sure if the AI HAT (sort of an expansion card) is necessary.
It would be a lower cost option at least, but I’m not actually sure how well models would perform on it with normal usage (as opposed to something like a YouTuber trying something out for a day or so and scrapping the project later)