llamafile can serve a chat interface on your Mac. Safari shows the page, while the local process runs the model.

Install on Mac

Official binary, launched in Terminal. Get the macOS-compatible binary from Mozilla AI’s GitHub releases. The quickstart distinguishes the executable from a separate GGUF. Save both to a working folder. If the binary you downloaded is named llamafile, use the commands below in that folder, with the real GGUF filename. Keep the service on localhost if it is for your Mac only.

chmod +x ./llamafile
./llamafile -m ./your-model.gguf --host 127.0.0.1 --port 8080

Set it up

Get the official build and follow the project’s macOS quickstart, including its requirements for your release. Select a compatible GGUF and start llamafile with that model. Wait for the server to print its listening address, then open that local address in Safari. The quickstart uses http://127.0.0.1:8080/. If a different server is already using 8080, use another port.

Check that it works

For a stop-and-start control, keep the Safari tab on the local address the binary printed. Stop the process and try a new prompt, then restart the same model and try a different prompt. If the old page stays visible but only the restarted process can answer, you have separated the browser display from the generator.

Ask a short new question while disconnected. Then stop the llamafile process and refresh; the page should no longer respond. These checks help distinguish a local browser interface from a hosted chat service.

Understand what the browser and the executable each do

The browser displays the interface served by the process you start. The GGUF supplies model data. The binary, file or package you choose determines how those pieces are brought together. The project’s quickstart has examples of a bundled llamafile and of a standalone executable with a separately specified model. Follow the instructions for the release you actually downloaded. When using a standalone executable, keep its version with the exact GGUF file so you can repeat a successful start.

Decide how you will use the working folder before moving it. The example command uses a relative model path. It expects a shell open in the folder holding the executable and the named model. If you launch from a different directory, use the correct paths for both. A shell that recognizes the executable may still be looking for the model in the wrong place. If a model is in an external or synchronized folder, verify the underlying files are present and readable before going offline.

Compare the paths with the startup result

Check the executable came from the official project and is appropriate for the Mac and release. If the shell reports it cannot execute the file, check the binary, file name and the project’s Mac instructions before changing model settings. If it starts and reports a model-path or parsing problem, focus on the input file. Choose a compatible package and identify the selected model in the log. Keep the first error rather than trying several files until one happens to open.

For a known working launch, record the model label, exact command and printed local address. If another program is using the intended port, identify what actually answers before assuming the existing browser page belongs to llamafile. If you choose another supported local port, update the browser bookmark or client intentionally. A number remembered from a previous example does not establish the current process’s address.

Verify a complete reply in a clean browser session

Open the address printed for the active process. If it serves a screen with model controls, choose the intended configuration. Give it a practice question with two facts you can check. For example, “The field visit uses door A9 at 08:50. Yesterday’s draft used door A6 at 08:30.” Ask for the current door and time only. Verify A9 and 08:50 from the complete reply. A visible page demonstrates the interface loaded. The new factual result establishes that the setup generated a reply in the tested session.

For a text model that continues the prompt instead of answering as chat, check its instruction variant and the input expected by the running model. Keep this behavior separate from a failed launch. A working completion route can produce poor answers if the selected model or conversation format differs from the intended one. Try a small documented chat setup before moving to a long transcript. Keep an independent copy of the source prompt and exact expected output.

Work through a browser page that is blank or cannot generate

If the browser reports a connection error, look first at the terminal process and printed address. If the shell exited, read the last message. If the local page opens but generation has no result while the model is loading, capture that state and wait for the model’s reported readiness. If a test prompt fails after readiness, shorten the example and inspect the process output for a concrete error. Record a model loading error separately from a browser drive or interface issue.

If one browser window displays an older reply after the process stopped, open a new page or use a fresh input to distinguish what is stored in the UI from what is generated now. Stop only the local process you own during this control. Then start it again with the same model and local address and enter a different time and door. The new reply should contain the changed values. If another process answers while the intended one is stopped, verify which listener or configuration the browser is using.

Reopen offline from the same files you plan to carry

Finish first-run preparation while connected, including the required executable and model files. Test the complete known task. Then quit your local runner and repeat the ordinary launch while disconnected, with assets at the expected path. Open the newly printed local address and ask for two facts unrelated to the previous example. Keep the final response and ordinary startup state beside the other result. A warm page and a cold model start exercise different prerequisites.

If you expect to move the files to another Mac, test the handoff using an appropriate folder and the official compatibility notes for that release. The other machine may have a different architecture or less available memory. Give the recipient enough path information to start their own instance without creating a wider network listener. Ask them to record which file the binary read and compare the actual answer with the fixture. Save the prior working package until that route passes.

Choose the next task size using the observed result

If a small prompt finishes, try a realistic local source with the same short answer key. A bigger input or a heavier model can change the startup and memory behavior. Compare the final user-visible answer and the time it took to arrive. If only the larger request fails, keep its exact input size and error while preserving the small setup. A simple prompt can remain useful for fallback even if the intended long workflow needs further tuning.

For a laptop that will also run an editor, test a representative request with the normal editor open. If both the browser and editing work become slow while model output is pending, record that fit issue. Select a smaller supported configuration with the same checked facts if you need to keep both tasks interactive. A model name or parameter number alone cannot tell you how comfortable that session will be.

Keep a reproducible record of the setup and its limits

Record the binary release, actual model package, folder location, printed local address, browser used and the accepted reply. Include whether the process was already running or had been stopped and restarted. If you changed the port or moved the model, repeat the small prompt after reopening the browser and verify both values. A working copy of those details gives you a clear recovery path when a later update changes only one part.

Separate a basic chat test from any additional local API use. An interface that answers in the browser may be all you need. If another program is part of the job, read the release’s documented support and verify that client directly with its own fresh request. Compare the output in the program that will use it. Keep a simple browser session as a working reference while the added route is being prepared.

Work through a process that looks ready in the wrong browser tab

Imagine a Mac with an older local model UI already listening on one port. You launch llamafile and its log reports a different listening address. An old tab may still look like a chat application and can even answer through a separate runner. Open the address printed by the process you just started and compare the displayed model with the expected artifact. Send a unique current-time value in a short question. Record which process and address you observed before assigning the result to llamafile.

Next stop only the new process and enter a second distinct value. The intended route should fail to generate until you restart its server. If it still answers, check which browser address or client it actually used. Restart the known executable with the same model and local address, then make a third request. Confirm the new value in its completed answer. This makes the browser route reproducible even while other local AI tools are available on the same computer.

Choose a known fallback for an unavailable model file

If a higher-quality model lives on an external disk, keep the documented folder and its mounted name in your usual notes. After disconnecting that disk as part of an ordinary handoff test, reopen the default task only if your selected fallback uses assets still on the Mac. Use the same type of answer key to check that fallback. If it cannot preserve the required fields, use local verified source notes instead of treating a shorter answer as equivalent.

When testing another macOS version or package form, start from the same minimal task and verify the official requirements. A working bundled example and a working standalone executable with a different GGUF are separate cases. In the handoff note, say which one you actually verified and retain the paths that case requires. Repeat the launch from a new Terminal window to catch an undocumented working directory. Only then add any more demanding source the recipient will use.

For a changed project folder, keep the model path and local server address separate in the review. Moving the files can break loading without changing the port. Changing the address can break the browser without affecting the model. Verify both boundaries in the next run so fixing one does not make it seem as if the other had passed.

Who built it

Mozilla’s innovation group released llamafile on November 29, 2023. Mozilla credits Justine Tunney, the creator of Cosmopolitan, with developing it. The announcement identifies this as the project’s first release.

References