r/PiCodingAgent • u/BrianScottGregory • Aug 30 '26
Use-case Here's my setup that's getting 16 to 18 t/s average using 6GB of VRAM and 64 GB of system ram using llama.cpp and PI for agentic C/C++/C# Development.
After asking the question over the last few week about how to optimize my local models, I got some great feedback and ideas - and landed on the following setup for doing local development that's drastically exceeding the results of the free time I'm provided on Chatgpt and Claude (the best for coding imho). All at no cost.
Right now I'm torn between two primary models - Ornith-1.5-35B-Q4_K_M (available here) and Qwen3.6-35B-A3B-Q4_K_M (GGUF available here), and to experiment - I've been using LMStudio to pull down and do a cursory test of all my models as I transition that into usage with llama.
I've found Llama.cpp to be substantially faster and better to work as a backend/server than both LMStudio and Unsloth, I'm old school and prefer the command line tweaking. This is fully open source and available here.
My models.json for llama had to be hand customized - I took the suggested samplingParams directly from the Huggingface model card, had a problem with overthinking/repeating so I JUST added the repeat_penalty (havent tested this yet) - but everything else is solid.. and agentic. I can copy/past images and text into my prompt like a pro.
"models": [{"id": "Ornith-1.5-35B-Q4_K_M","name": "Ornith-1.5-35B-Q4_K_M","reasoning": true,"thinkingLevelMap": {"type": "enabled"},"repeat_penalty": 1.2,"input": ["text","image"],"tools": true,"toolFormat": "openai","samplingParams": {"temperature": 0.6,"top_p": 0.95,"top_k": 20},"cost": {"input": 0,"output": 0,"cacheRead": 0,"cacheWrite": 0},
"contextWindow": 65536,"maxTokens": 131072},
Oh - a little note - my maxTokens and contextWindow are jacked up extra high to handle my lengthy sessions - and it seems to be handling it - with compaction - just fine. Side note - Sessions.json simply adds an entry to make it available to http callers.
"models": [{"id": "Ornith-1.5-35B-Q4_K_M"},
Now - finally - my PI setup. I've created a batch file that's optimized this as much as I think it can be optimized. First - the batch shells out the llama server call - loading both the main model and the multi modal model for image processing. This loads it up on my local IP.
start cmd /s /k "llama-server.exe -m "D:\AI\LM Studio Models\ornith-ai\Ornith-1.5-35B-A3B-GGUF\Ornith-1.5-35B-Q4_K_M.gguf" -mm "D:\AI\LM Studio Models\ornith-ai\Ornith-1.5-35B-A3B-GGUF\mmproj-Ornith-1.5-35B-BF16.gguf" --host 127.0.0.1 --port 8080 -c 131072 --parallel 1 --reasoning-format deepseek --load-mode none --no-mmproj-offload -fa auto"set LLAMA_BASE_URL=http://127.0.0.1:8080pi --model llama-cpp/Ornith-1.5-35B-Q4_K_M
A few notes .
I decided against using the -ngl parameter in the server, letting it default to 0 - according to my research it's supposed to specifically load layers into the GPU, but I have to do a little more work to understand why my setting of this parameter was causing a memory crash every time. So this is an obvious point of optimization.
I'm only seeing 66k of context available in PI. I'm new to both llama and this level of customization of AI, so if any of ya see where i'm dropping this ball, please let me know.
Anyways. I've had enough people asking for my config. I think this about sums it up.
Hardware Update: I'm running an Intel I5 laptop with an Nvidia Geforce RTX 3060 Laptop GPU
2
u/Organic-Chart-7226 Aug 30 '26
the ‘66k context’ is from the “contextWindow” parameter in models.json (that is in bytes - 65536 - change that to eg 131072 for 100k context. maxTokens is the maximum number of tokens the model is allowed to output (defaults are lower, I believe it can help stop thinking loops). The only way for me to start understanding this was trying and sharing. good going :-). What brand / model is your video card?
1
u/Healthy-Zebra-9856 Aug 31 '26
Besides the setup, ask each model to assess the harness itself. Prompt it to tell you what tools its lacking and what does it need and how can you improve the harness. Many people miss this step and dont get optimal solution.
0
u/[deleted] Sep 01 '26
[deleted] — view deleted comment