Given your hardware constraints and the requirement for a fully local LLM (no third-party connections), here's the best approach for your scenario:
Best Option: Pi 4B (4GB) with a Small LLM
Your Raspberry Pi 4B (4GB) is the most capable device here, but even it will struggle with larger models. Here’s how to proceed:
1. Choose a Lightweight LLM
You need a model small enough to run on limited RAM and CPU. Good options:
- TinyLlama (1B or smaller) – A very small Llama variant.
- Phi-2 (2.7B, but may be too big) – Microsoft’s efficient model, but likely too large for 4GB RAM.
- StableLM-3B – A smaller, efficient model.
- GPT4All (e.g.,
ggml-gpt4all-l13b-snoozy-q4_0.gguf) – Optimized for low-end hardware.
2. Use an Efficient Inference Engine
- llama.cpp (Best for ARM devices)
- Ollama (Easier but may not work well on Pi)
3. Optimize for Performance
- Use 4-bit or 3-bit quantization (reduces model size & RAM usage).
- Limit context length (e.g.,
-n 128 in llama.cpp).
- Disable unnecessary features (e.g., no GPU acceleration).
4. Alternative: Use a Smaller Model on Pi Zero 2
If the Pi 4B is still too slow, try:
- A 1B or smaller model (e.g.,
tinyllama-1.1b).
- Text generation only (no complex tasks).
What Won’t Work Well
- Your ThinkPad (single-core): Too weak for any meaningful LLM.
- Pi Zero 2: Only usable for the tiniest models (very slow).
- Larger models (7B+): Will crash due to RAM limits.
Final Recommendation
- Use the Pi 4B (4GB) with llama.cpp and a 1B-3B model.
- Quantize the model to 4-bit or lower.
- Expect slow responses (this is a low-power device).
- Avoid complex tasks (stick to simple Q&A).
Would you like help finding a specific pre-quantized model?