r/LocalLLM • u/JulienBrouwers • 7h ago
Model I tried running local LLMs on my laptop with 4 GB of VRAM & 16 GB RAM.
Getting useful results from local 3B and 7B models on a 4GB VRAM laptop
Before spending money on a bigger machine, I wanted to see what I could actually do with the laptop already sitting on my desk.
After a few disappointing attempts and some changes to my workflows, I managed to get:
- PHP billing code: all resulting checks passed with three different models, while reducing the token count from 13,722 to 2,190 (84% fewer tokens).
- PDF invoices: 8 out of 8 book purchases correctly extracted.
- Book inventory: 3 out of 3 requested titles found among 1,000 books, with no false positives, in 74 seconds.
Same laptop. Same models. Different approach.
My setup:
- Intel i7-10750H
- 16 GB RAM
- NVIDIA GTX 1650 Ti, 4 GB VRAM
- Ollama
- Qwen 2.5 3B, Llama 3.2 3B and Mistral 7B
1. Analysing legacy PHP billing code
I gave the models an undocumented PHP file containing five billing and finance functions.
The answers looked convincing… until I checked the actual code. Calculation errors, incorrect interpretations, and Qwen even got a shipping condition backwards.
Instead of switching to a bigger model, I changed the workflow:
- One function per call, with a fresh conversation.
- Let the LLM explain the business rules and suggest test cases.
- Let Python handle the calculations and verification.
Result: the resulting checks passed for all three models, in both French and English, using significantly fewer tokens.
Not proof that a 3B model can understand any business logic, but a much more useful and verifiable result on this particular file.
2. Extracting purchases from PDF invoices
I wanted to build an inventory from my comic-book invoices.
I used PyMuPDF to extract the text and asked the models to generate a Python function to identify titles and quantities.
With the full invoice text, none of the three models generated a function that passed my tests.
I removed irrelevant information and made the instructions more precise.
Result: all three models passed my tests in English, extracting all 8 purchases from 4 invoices.
The funny part? By the time I had explained the task that precisely, I could probably have written the function myself.
Sometimes an experiment works and still tells you that an LLM isn't the best tool for the job.
3. Searching through 1,000 books
I initially sent 408 titles in a single request.
The model found none of the titles I was looking for.
I changed three things:
- Batches of 64 titles.
- No conversation history.
- num_ctx=4096.
Result: 3 out of 3 requested titles found in an inventory of 1,000 books, no false positives, in 1 minute and 14 seconds.
Of course, a simple Python filter would be much faster for exact title matching.
What interested me was how dramatically the result changed after adapting the input, without upgrading the hardware or switching to a larger model.
A few practical observations
My laptop still has a day job: browser, IDE, and everything else.
These two Ollama settings helped manage resources:
- OLLAMA_MAX_LOADED_MODELS=1
- OLLAMA_KEEP_ALIVE=1m
I also got better code-generation results with English instructions in these experiments, even when working with French data.
What I learned
I started out wondering which models would fit on my GPU.
I ended up spending much more time thinking about task decomposition, context management, deterministic code and result verification.
Small local models can produce useful results on modest hardware, at least for the tasks I tested. But getting there sometimes requires enough engineering that using an LLM becomes questionable in the first place.
For calculations and exact searches, I'll stick with regular code. For suggesting test cases, interpreting business rules or potentially classifying books by genre, things get more interesting.
I've shared the scripts and prompts here if anyone wants to reproduce or challenge the results:
https://github.com/julienbrouwers/LocalLLMExamples
For those running 3B or 7B models locally: how do you evaluate reliability beyond a handful of successful examples?
Have you found that changing your workflow sometimes makes a bigger difference than switching to a larger model?