
Day 7/100: Set Up Local AI on a Laptop for Offline Writing and Coding
Set up local models for offline writing and small coding tasks on a 16 GB Mac or Windows laptop, using Ollama or Unsloth Studio.
Day 7/100: Set Up Local AI on a Laptop for Offline Writing and Coding
I want to keep writing and coding when I am on a flight or somewhere with unreliable internet. A small local model can help me outline a blog, edit a paragraph, explain a function, or work through notes already on my laptop.
I recently tried Gemma 4 E4B on my 16 GB MacBook Pro M5. Ollama showed 9.4 GB for the loaded model. I also had a lot of browser and development apps open, so the model left little room for the rest of my work. That was a useful reminder: choose a model for the memory you have available while working, not only the space on your SSD.
This guide covers two ways to get started. Ollama is a simple option if you are comfortable copying a few commands. Unsloth Studio offers a visual model browser and chat interface through Unsloth Desktop.
What does it mean to run a model locally?
A local language model is downloaded to your computer and runs its inference there. You need internet to install the app and download model files. After that, local chat can work without an internet connection.
Offline does have a limit: the model cannot search for new facts, open websites, or fetch documentation unless you provide an online service. Before a flight, save the documents and references you want to use, and test the model with Wi-Fi turned off.
How much memory does a small model need?
The file you download is not the whole memory requirement. The computer also needs memory for the conversation context, inference runtime, operating system, and other open apps. Long contexts can use more memory. Apple silicon shares system memory between the CPU and GPU, so model inference draws from the same pool as macOS and your other apps. Windows laptops with integrated graphics also share system memory; laptops with a dedicated GPU have separate video memory, while Windows and apps still need system RAM. Apple's Apple silicon documentation
Unsloth's current Qwen3.5 guide estimates about 3.5 GB of total memory for a 4-bit 0.8B or 2B model, and about 5.5 GB for a 4-bit 4B model. Those are estimates for inference, not a promise that the same amount will be free on your laptop. Leave room for the operating system and apps, and start with the smaller model when memory is tight. Unsloth's Qwen3.5 memory guide
%% alt: A laptop's system memory is shared by its operating system and apps, the model, its conversation context, and the inference runtime.
flowchart TB
RAM["16 GB system memory"] --> Apps["macOS or Windows and open apps"]
RAM --> Weights["Model weights"]
RAM --> Context["Conversation context"]
RAM --> Runtime["Inference runtime"]
GPU["Integrated GPU"] -. "shares system memory" .-> RAM
The context-window number shown on a model page is its supported maximum. It is not a sensible starting setting for a 16 GB laptop. Keep conversations focused, avoid loading multiple models at once, and close memory-heavy apps if the model feels slow.
How to set up Ollama
Ollama provides a command-line workflow that works on macOS and Windows. Download and install the current app from ollama.com/download, then open Terminal on Mac or PowerShell on Windows.
Check that the command is available:
ollama --version
If the terminal cannot find Ollama, close and reopen it after installation. If the version does not match the app you installed, check which executable your terminal is using:
# macOS
which -a ollama
# Windows PowerShell
where.exe ollama
An older command-line installation earlier in your PATH can take precedence over the newer app.
Download one specific model
For a 16 GB laptop, start with the smaller Qwen3.5 2B model:
ollama pull qwen3.5:2b
If you have enough memory available and want to compare, download the 4B model:
ollama pull qwen3.5:4b
Use the size tag explicitly. The unqualified qwen3.5 tag currently points to a larger model than the 2B or 4B versions. Check the model's current tag and download size before pulling, since model listings can change. Ollama's Qwen3.5 library
Run a prompt and check what is loaded
Start a chat with the model you downloaded:
ollama run qwen3.5:2b
Try a small real task: ask it to outline a post from your notes, clarify a paragraph, or explain one function. In another terminal, see which models Ollama has loaded:
ollama ps
Ollama keeps a model loaded for five minutes after use by default. Stop it immediately when you want to free its working memory:
ollama stop qwen3.5:2b
The downloaded model stays on disk after you stop it. Ollama's memory and model FAQ
How to use Unsloth Studio without a command-line workflow
If you prefer a visual interface, install Unsloth Desktop. Unsloth Desktop provides the easiest way to install and open Unsloth Studio, an open-source interface for finding, downloading, and running models. It is available for Mac, Windows, and Linux. You can use Studio to chat with a pretrained model without training or fine-tuning anything. Unsloth Studio quickstart
- Download Unsloth Desktop for your operating system and open it.
- Open the model browser and search for Qwen3.5 2B or 4B.
- Choose a 4-bit model and check its memory estimate before downloading.
- Load the model and try the same writing or coding prompt you used with Ollama.
- Turn off Wi-Fi and test local chat before you travel.
Unsloth Studio can run models locally and offline after you download them. Its web search and other connected features need an internet connection, so they will not be available in airplane mode. Studio also includes training and advanced tools, but you do not need those for ordinary writing and coding. Unsloth Studio features and offline use
The published memory estimates are useful when choosing a model, but leave extra capacity for the operating system, context, and the apps you keep open. On a laptop below 16 GB, begin with the smallest supported model and close browsers, video apps, and development tools you do not need. CPU inference can work without a dedicated GPU, though generation may be slower.
How to use a local model for writing and coding
For blog writing, give the model your own notes and ask it to do one step at a time: group the ideas, suggest an outline, point out unclear sentences, or list claims that need sources. Keep your notes and check factual claims yourself before publishing.
For technical writing, ask it to explain an error message, edit a short section, or summarize documentation you saved locally. For coding, keep the task narrow: explain a function, draft a small helper, or review a focused change. Small models can lose track of a large repository and may make incorrect edits, so review generated code and run the checks for your project.
If you use OpenCode, Ollama also documents a direct launch path for a downloaded model:
ollama launch opencode --model qwen3.5:4b
Start with a small, clearly scoped change. A local coding agent can read and edit project files, but the model may be less reliable with long tasks or large codebases. Ollama's OpenCode integration
Why use local AI?
Local models give you a writing and coding assistant when the network is unavailable. During local inference, your prompt can be processed on your own device, and you do not need a cloud model subscription for each request. You trade some model capability and speed for a workflow that can travel with you.
My practical setup for a 16 GB laptop is simple: install one local runtime, download one small 4-bit model, test it with real work, and check what remains loaded. Use Qwen3.5 2B as a lighter starting point, then try 4B if the laptop has memory to spare. Unsloth Studio gives you a visual way to make that choice; Ollama gives you a compact terminal workflow.
Before leaving home, download the model, save the files you will need, and test the whole workflow offline. Then you can use the flight to outline the article, polish the writing, or make progress on a small coding task without depending on the cabin Wi-Fi.


