Below is a straightforward, “it-just-works” recipe for getting TinyLlama (≈1.1 B parameters) running LOCALLY on a Chromebook, even if all you have is a Celeron N4000 + 4 GB RAM.
(If you’d rather keep everything in the browser or run the model in the cloud, see the alternatives at the end.)
🧰 What we’ll do
- Turn on ChromeOS Linux (Crostini).
- Compile llama.cpp (a tiny C/C++ inference engine).
- Grab an already-quantised TinyLlama GGUF file (4-bit = fits in <700 MB).
- Run the model from the Linux Terminal.
Total time: ~15–25 min on most Chromebooks.
- Enable / resize the Linux container
Settings ▶ Developers ▶ “Linux development environment” ➜ Turn on.
• Give it at least 6–8 GB of disk (you can resize later).
• 4 GB RAM is fine; we’ll add a 2–4 GB swap file automatically.
Open the Terminal (Ctrl+Alt+T → ‘penguin’).
- Install dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install -y git build-essential cmake pkg-config python3 python3-pip
# optional: htop to watch RAM
sudo apt install -y htop
Add a little swap so OOM-killer doesn’t ruin the party:
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
sudo swapon /swapfile # activate immediately
Verify with free -h.
- Build llama.cpp
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
make -j$(nproc)
(If compilation fails for memory reasons, rerun with just make.)
- Download a quantised TinyLlama GGUF
Quantised = shrunk weights. 4-bit or 5-bit models usually run fine on 4 GB RAM.
mkdir ~/models && cd ~/models
# Chic model with nice prompting style ⬇︎
wget https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v0.3-GGUF/resolve/main/TinyLlama-1.1B-Chat-v0.3.Q4_K_M.gguf \
-O tinyllama-q4.gguf
(Any other Q4_0, Q4_K_M, Q5 file will also work.)
- Chat!
Back inside the llama.cpp folder:
cd ~/llama.cpp
./main \
-m ~/models/tinyllama-q4.gguf \
-n 128 \
--ctx-size 1024 \
--threads 4 \
--temp 0.7 \
-p "### Instruction: Explain why the sky is blue in 3 sentences.\n### Response:"
Expect 4–7 tokens/s on the Celeron—slow, but usable for short answers.
Tips
• If RAM is tight, add --low-vram or drop context size (--ctx-size 512).
• Use fewer threads (--threads 2) if the Chromebook feels laggy.
• For a simple REPL: ./main -m tinyllama-q4.gguf -i.
- Make a desktop shortcut (optional)
Create a script ~/run_tinyllama.sh:
#!/bin/bash
cd ~/llama.cpp
./main -m ~/models/tinyllama-q4.gguf --threads 4 --ctx-size 1024 -i
chmod +x ~/run_tinyllama.sh, then right-click ▸ Create shortcut.
🔄 Keeping the model up-to-date
When TinyLlama releases a new checkpoint, just drop the new .gguf
into ~/models and point -m to it—no recompilation needed.
💡 Alternatives if you hit limits
-
Web-only, no Linux:
• Hugging Face’s Space “🦙 TinyLlama-Chat” (runs in the browser with WebGPU).
• https://huggingface.co/spaces/jbilcke-hf/tiny-llama-web (pure JS).
-
Cloud notebook (zero local load):
• Google Colab / Kaggle → pip install transformers accelerate bitsandbytes
• Load "TinyLlama/TinyLlama-1.1B-Chat-v0.3" with 4-bit quantisation.
-
Android-side apps:
• “LM-Studio” Android preview (if your Chromebook supports Play Store).
• “Alpaca-Offline” (sideloader APK + gguf models).
FAQ
Q: Can I run a 3 B or 7 B model the same way?
A: You’ll quickly exceed RAM. Even 4-bit 3 B ≈ 1.6 GB; 7 B > 4 GB. Stick to ≤2 B on 4 GB machines.
Q: GPU acceleration?
A: Most Chromebooks expose only an Intel iGPU to Linux (no CUDA / ROCm). llama.cpp has OpenCL and Metal paths, but Intel OpenCL on ChromeOS is flaky. CPU is your safest bet.
Q: No space left while compiling?
A: Go to Settings ▶ Developers ▶ Linux ▶ Change disk size and give it more.
That’s it—TinyLlama chatting offline on ChromeOS! 🦙💬