Whether you're here because you're tired of the 9k context window which makes the bot forget a lot or you just don't wanna pay for the providers, you came to the right place!
Local LLMs let you run AI models on your own hardware, meaning you don't have to pay per prompt or rely on an external API provider.
Keep in mind that having a larger context window doesn't automatically mean better performance. Your hardware, model quality, and available memory all matter. Some models can support much larger contexts than 9k, but actually using them may require considerably more RAM or VRAM.
Some chapters contain external links to software and model downloads. I'll do my best to link to official or reputable sources, but always check what you're downloading before running it.
llama.cpp is an open-source C/C++ inference engine designed to run large language models (LLMs) and vision-language models locally across consumer hardware without external runtime dependencies. Of course, you're not gonna understand this, nor do you need to.
To put it simply, llama.cpp is the engine that allows your computer to run an LLM.
An LLM is essentially a collection of learned parameters that can generate text, but it needs software to load those parameters, process your prompts, and generate responses.
That's where llama.cpp comes in. It handles the heavy lifting, allowing you to run models locally without relying on an external AI provider.
This is where you'll actually start now, lads.
First things first, download the official llama.cpp release from here:
https://github.com/ggml-org/llama.cpp/releases
Don't worry about all the files. You won't need to mess around with the source code or compile anything yourself.
Look for the latest Windows release and choose the build that matches your hardware.
Here's a quick explanation of what the different builds mean:
CPU: Runs on your processor. Generally slower than GPU acceleration, but doesn't require a compatible dedicated GPU.
CUDA: For compatible NVIDIA graphics cards. Usually the recommended choice if you have an NVIDIA GPU.
Vulkan: An alternative GPU backend that supports various graphics cards, including supported AMD, Intel, and NVIDIA GPUs.
SYCL: Primarily for supported Intel hardware.
ROCm: For supported AMD hardware.
Not sure what GPU you have?
Press Ctrl + Shift + Esc to open Task Manager.
Navigate to the Performance tab.
Look for GPU to find your graphics card model.
Look for CPU and Memory to check your processor and RAM.
IMPORTANT: Having a dedicated GPU doesn't automatically mean you should download CUDA. CUDA is specifically for compatible NVIDIA GPUs.
If you're unsure which build to download, the CPU version is a reasonable starting point. Just remember that it may be significantly slower.
Done? Unpack your things in a place that you won't forget. Trust me, not forgetting where your llama is very important.
NOTICE! Only use links in this guide. All other links you click in the comments that aren't sent by me is not my responsibility! Please, be careful.
Next, download LlamaProxy from this link.
https://github.com/biggestlargestchud-ux/LlamaProxy
You will get a ZIP file.
Extract the contents.
You will find three bat files and a python file. Install Python if you haven't.
Insert all three bat files into the same folder that you extracted the contents of the llama.cpp zip file too. The python file can be put anywhere you like, just don't forget where it is.
When all .bat files are in the same folder as your llama.cpp extracted folder, run the .bat file that contains setup in its name. This will send the contents of your llama.cpp folder into your USER directory, which will be important.
To remove the USER PATH, use Remove. This is important if you are planning to update your llama.cpp. Please run this first before updating anything.
To update, run the Update. This updates your stuff. If you are certain the updater did nothing, Remove and download the newest release with your hardware specs back at the github release. ( https://github.com/ggml-org/llama.cpp/releases )
Done? Great! Here's where the real fun starts.
This part is completely optional to read, but is important if you are very new to local LLMs. Models that you download from hugging face or any reliable source come mostly in GGUF files.
GGUF files are weights of a model. It is complicated to describe what a weight for a model means, but all you need to know is that a GGUF file is everything that consists of a model, to its intelligence and context.
A personal favorite model of mine to run is L3-8B-Stheno-v3.3-32K. Download an abliterated version for an uncensored bot if you like. Here is the official hugging face link to Stheno 8B 32K in a GGUF format: https://huggingface.co/mradermacher/L3-8B-Stheno-v3.3-32K-GGUF
Choose a quantization, which is basically a different version of the same model that is made to be stronger or a little weaker depending on the quant.
Choose Q4_K_M. It definitely runs smooth for most PCs.
Once you're done with the model, send it to a folder that you'll remember and copy its path (save it in notepad). You'll need it.
Woohoo! It's time to finally run the server and get your model on Janitor.
Go into your file explorer and find this little bar, which is mostly at the top.
Click on it and type cmd.
You will enter Command Prompt.
Type py LlamaProxy.py and you'll see file explorer asking you to select a GGUF file.
Remember the GGUF file I told you to download? Go copy and paste the path file into the little bar of the file explorer.
After selecting, you'll see another window.
This window will ask you to select a slider. Enter in the amount of context you feel comfortable running with. (32K TAKES AROUND 8 TO 16 GB DEPENDING ON HOW YOU OPTIMIZE IT)
You'll see a ton of gibberish, which you won't need to understand yet.
At last, you will finally have a proxy server open!
This is what you will see. Many parts of these are censored for my own privacy.
Test out your model if you wanna.
So.. what about linking the model to Janitor AI?
I'll talk about it next.
In any bot, goto settings and goto Settings, Scroll down and choose Proxy as your Provider. Click on +New.
Change the name to your liking.
For the proxy link, copy the Chat URL into the proxy link.
For your API key, copy and paste the entire API key. No need to follow Auth in the proxy cmd screen.
Model ID? Copy and paste in the model ID you received in the CMD.
Click save.. and you're set!
Don't forget, your API key must not be revealed at ALL costs and will refresh every time you boot up your proxy server. Every time you boot up your proxy server, remember to change your API key in Janitor's settings.
Created 37 minutes ago
Updated 6 minutes ago
Published 37 minutes ago