Use llama.cpp directly when you want a local endpoint for an existing GGUF and prefer to see the server settings yourself.
Install on Mac
Terminal route. If you already use Homebrew, run brew install llama.cpp, then llama-server --help to check the command is available. Alternatively, choose the build for your chip from the official release assets, unpack it and use the included server binary. Both routes still require a separate compatible GGUF file.
Set it up
Get the Mac build from the official project and choose a compatible GGUF already on disk. Run the server command below from the folder containing your binary, or use its installed command name. Replace the file path. Keep the binding on 127.0.0.1 if only this Mac will connect. Use another port if 8080 is already occupied.
llama-server -m /path/to/model.gguf --host 127.0.0.1 --port 8080
Check that it works
After the model loads, open http://127.0.0.1:8080 and send a short prompt. If it fails, check the terminal for model-loading errors before troubleshooting the browser. To check local operation, disconnect and send a fresh message.
Is the local server ready?
Treat a reachable web page and a working model as separate checks. Send a fresh prompt with a predictable short answer using the local client. If the page opens but that request never returns generated text, compare the client endpoint and model selection with the running server log before changing the GGUF.
Keep the server running in its original Terminal window. In a second window, check the same loopback address and port. If you changed the port above, change it in both checks below.
curl -sS -i --max-time 10 http://127.0.0.1:8080/health
- Connection refused: nothing accepted the connection on that address and port. Check the first window for a startup error or a different port before changing the model.
- HTTP 503 with a loading message: the server answered but the model is still loading. Wait and retry. If it stays there, look for the first loading error in the server window.
- HTTP 200 with an OK status: the server reports that the model is ready. This checks readiness, not an actual generated reply.
To check generation as well, send a short, harmless prompt to the native llama.cpp completion endpoint:
curl -sS --max-time 60 http://127.0.0.1:8080/completion \
-H 'Content-Type: application/json' \
-d '{"prompt":"Complete this phrase: The sky is","n_predict":16,"stream":false}'
Look for non-empty generated text in the JSON content field. A timeout on a slow Mac is an inconclusive result; check the server log before deciding that the endpoint is broken. This is a smoke test, not a speed benchmark. The upstream server reference documents both routes. For clients that expect the OpenAI-compatible API, use their configured compatibility endpoint; the native /completion route has a different response format. Keep the server on loopback for this test.
Track the model file, server state and API route
Before starting, record the GGUF filename, quantization and where it came from. A readable GGUF and the particular architecture supported by your llama.cpp build determine whether the server can open the file. A chat model can also depend on a compatible chat template so it sees system, user and assistant roles with the intended boundaries. If loading fails, keep the first useful error from the server terminal. Check the file path and supported architecture before changing ports or client settings.
Once the server is listening, run the readiness check shown above and wait for a ready response. Use the same host and port in the browser. If the server is loading a large model, a client trying too early can fail even though the address is correct. If the readiness check works but the model never answers a short prompt, inspect the server terminal for the request and any error. Use a small prompt and a small output allowance so the test can finish and be inspected quickly.
Compare native completion and chat on one known task
The llama.cpp server guide documents the native completion and OpenAI-compatible routes. The native test above sends a prompt to the completion route. If your client needs an OpenAI-compatible conversation, use the documented chat route with a messages array and the model identifier the server exposes. A native reply demonstrates that the model can run and gives you a useful control. Verify that a chat-formatted request also preserves its role boundaries before you rely on the client.
For a checkable task, ask it to return the date from “Pine inspection is due on June 12.” Require only a date so the answer is easy to inspect. Repeat it through the other route using the same model. A reply that echoes the instruction or returns a long unrelated answer warrants a look at the template and request, even if the earlier health check passed. Compare the two saved outputs before downloading a different GGUF.
If the direct request succeeds but a GUI fails, record its base URL and the completed path, model ID and protocol. If two processes listen on different ports, use the server log to verify which one received the failed request. Leave the working setup in place while you test the client separately. If you change the template or runtime version, repeat the same known-answer check to see whether the client now has the behavior you need.
Record the exact GGUF and server build together
A usable local configuration includes the executable, the model file and the arguments used to start it. Save the upstream release or build identification and the exact GGUF path with the file name. A similarly named model may be a different instruction variant or quantization. If the package uses several files, verify that the complete set is present according to the maintainer’s instructions before changing server options. If the publisher gives hashes, compare them on a known local copy.
Keep the terminal output from startup. It helps distinguish a missing path from an unsupported package or a model that takes time to load. Open the existing health route after the process starts and record the response. If it shows that a model is still loading, wait for the ready state or read the reported load failure. A browser tab can reach the active HTTP process while the model is still unavailable. The transition to readiness is a useful point to capture before testing clients.
Keep your known address separate from any client configuration
For this single-Mac setup, use the listener and port you started locally. Record the server address and the exact client request route on separate lines. If a client uses an OpenAI-style base address, verify whether it appends the operation path itself. A duplicated suffix or wrong prefix can return a route error despite a ready model. When another program already uses the port, compare the actual process and available models before treating the response as coming from the llama.cpp instance.
If the process exits, check that terminal session rather than refreshing an older browser tab. Diagnose the first concrete failure, such as a file path or a port conflict. If the same executable can start a known small GGUF from a clear local path with its ordinary configuration, preserve that working command for comparison. When the smaller model works and the target fails, compare the target’s format, size, architecture and supported options in the installed release.
Choose a route that matches the application’s prompt
The native completion route and the OpenAI-compatible chat route serve distinct input patterns. A completion test is useful when you already have a plain text prompt formatted for the model. A chat client sends role-based messages and may rely on the model’s conversation template. Start with the route used by the client you intend to keep, then use the other route as an independent check where it helps locate formatting problems. Use the current server documentation for the supported fields.
For a practice task, give two short, confusable messages: “Draft locker V-17 is for Monday” and “Approved locker V-71 is for Friday.” Ask for the approved locker and day only. Save the raw text and compare both values. If a plain continuation echoes a heading or extends the source, check how the prompt was formatted. If chat repeats role markers or responds from the wrong field, examine the selected checkpoint, supported template and actual request before deciding that the model cannot answer the task.
When comparing routes, keep the model, answer criteria and purpose fixed. The formatted prompt or message representation can differ across routes, and that difference is part of what you are evaluating. Record which route was used and whether the reply remained complete. A route that supports a readable answer may still need client-side parsing before it can produce a downstream file. Confirm that on harmless inputs before relying on the client.
Test response handling in the order it can fail
First check the health response and then a complete short request without streaming if supported by your route. Read the status and the body. A valid transport answer with the wrong locker is an answer failure. A route-level error belongs to the endpoint or request until the server reports successful generation. Keep enough of the reply to compare the model and exact given values, and store any failed request separately from accepted outputs.
If your application needs streaming, run the same basic case through its streaming mode after the complete response works. Confirm the client displays the expected answer at the end. Record whether any interim text appeared and whether the client accepted the final content. Some problems only show up in an incomplete client display, while the direct request completes normally. Use the evidence you have before changing template, model files or memory settings.
Verify the model under the capacity and context you need
To review a large GGUF, start with a short task and moderate context. If startup fails, retain the specific allocation or compatibility error and check the model requirements. If loading succeeds, use a small source file with a known answer. Then use a representative context with the same required fields. A longer prompt can increase memory and latency even though startup appeared stable. Record the model file, available memory and requested context with each result.
If a short reply works and the long input loses the important value, move the relevant source into a smaller verified excerpt as a controlled comparison. Check whether the model can still give the expected response with the excerpt, particularly if it failed to find facts in a long conversation. If the large request cannot complete with a manageable local configuration, keep the exact reproducible example and choose whether a smaller context or smaller compatible quantization fits the intended job.
Establish a handoff that survives a restart
Write a dated record with executable and model paths, full version, listen address, route, expected answer and the observed response. Verify a fresh start after stopping only the process you own. If the weights sit on a removable drive, document that dependency; a working process with the model already loaded cannot establish that a later restart will find the file. If another person will use the setup, have them check the exact model package and supported options for their machine.
Keep the last working settings before changing the executable or package. After an update, rerun the direct readiness and answer checks, then repeat the client test. If only one route changed, record that outcome specifically. An app that loads the old model but cannot find the new file needs a different remedy from a client that points at the wrong path.
Locate a repeatable failure using a small incident record
Here is a sample review. The health route reports ready, the native route returns the correct locker, and the chat client reads the same model list but repeats the input. Capture the actual chat request representation and inspect which supported template or saved settings apply. Try the same task in a fresh short chat before downloading a different model. If the formatted chat now works, the earlier setup’s active context or client fields are worth inspecting.
For another case, the client displays a JSON parsing error immediately and the known direct chat route succeeds. Capture the requested path and compare the returned body with the expected response shape. A different service might answer on the client’s configured port. If the port and route are correct and the returned response is complete, inspect the client’s parsing and version compatibility. Preserve the functioning direct run while diagnosing the separate consumer.
Check which work a local client can actually complete
For a read-only lookup workflow, make a three-line source with a title, a draft record and an approved record. Use one mode to request the approved identifier and a second mode to request the exact sentence from which it came. Check the ID and source against the input in each response. Then give the app a version containing only the draft. The expected output should indicate that the approved value is absent. A server that finishes requests can still return a convincing guess for the missing value. Record the behavior you actually need before declaring the client ready.
Use the same model and input sequence when evaluating a second GGUF or different chat template. If only the template changes, preserve the original startup command and compare the final displayed content. For a version that already knows how to format its prompt, do not add a second conversation formatting layer without verifying the actual prompt path. A duplicated wrapper can be diagnosed on the small example before you try long source material. Use the upstream server documentation for the installed release.
Test a model switch while preserving a working route
Suppose the first model works through the native endpoint and a second GGUF is supposed to work through a chosen client. Start by keeping the known model and changing only the client route to confirm the request form. Once it works, start the new model using its verified package and keep the short known test. Compare the health state, relevant server response and the client’s complete displayed answer. If you change the model and route together, a failure leaves both areas open.
If the new model needs substantially more memory, observe the conditions under which it loads and completes the answer. Record a short run and a more realistic one, with the same required values. A model can finish the first run and stop or return fewer fields on the larger task. Where another user will operate the server, carry the known small working command and example as a recovery reference. Keeping the previous model available makes a later model switch test reversible.
If readiness failed after you moved the model files, resolve the actual path first. A client can remain configured correctly even when the process has nothing to serve. After recovering startup, rerun the readiness check and the compatibility test that mattered before the move. Then read the client result from a clean conversation so an earlier cache or displayed history cannot stand in for the new response.
Who built it
Georgi Gerganov started llama.cpp; his public project roadmap is dated March 24, 2023. The project is maintained under ggml-org with community contributions. The dated roadmap is evidence of early public development, not a legal founding date.