# Exact Mac setup and offline run

This kit uses ONE path: LM Studio desktop + its official `lms` CLI + the exact Qwen GGUF tested on this Mac. No Ollama installation, cloud key, document attachment, company server or extra inference service is required.

## 1. Hardware, application and runtime — while online

Observed: MacBook Air, Apple M5, 24 GB RAM; LM Studio 0.4.29+2; llama.cpp ARM64 Apple Metal/AdvSIMD runtime 2.83.0; context 8192. Those versions identify our installed environment; a fresh installation with them has not been independently repeated. Model storage is 4,683,073,952 bytes (4.68 GB decimal, about4.36 GiB). App, runtime, free working space and memory for other apps are additional.

Get the Apple Silicon Mac installer from https://lmstudio.ai/download . Open the downloaded disk image, copy LM Studio into Applications, eject the installer and open ONLY Applications → LM Studio. Finish the welcome screens yourself; only accept terms you agree to. Keep networking on for required downloads.

Open Terminal. The CLI ships with LM Studio, which must have been run at least once. Try:

```sh
lms --help
```

If it is not on PATH, our Mac installation exposes it here:

```sh
~/.lmstudio/bin/lms --help
```

The commands below use that full path. If neither exists, stop at CLI setup and follow https://lmstudio.ai/docs/cli ; do not install an unrelated npm package or substitute another executable.

List the installed inference runtimes:

```sh
~/.lmstudio/bin/lms runtime ls
```

The observed runtime is llama.cpp for macOS ARM64 / Apple Metal / AdvSIMD, version2.83.0. If it is absent, while online run the official interactive commands and select that platform/runtime when offered:

```sh
~/.lmstudio/bin/lms runtime get
~/.lmstudio/bin/lms runtime select
```

Choose llama.cpp for this GGUF path, not an MLX model/runtime combination. Current availability of the exact historical runtime may differ; record the version actually selected and do not label it our tested version. Official commands: https://lmstudio.ai/docs/cli/runtime/runtime . No runtime was installed or changed during kit repair.

## 2. Obtain the exact tested model — while online

Use this exact-file download/import route. Do not combine a similarly named Model Search result with this checksum and call it the tested artifact. Use the exact weights below or label your variant untested.

This direct immutable model blob is published by Ollama’s registry. You do NOT need to install Ollama. The saved public manifest and the already-existing local model have matching SHA256 values. Source/HEAD checked November29,2026; no new large model download was performed by us.

In Terminal:

```sh
mkdir -p "$HOME/Downloads/offline-ai-model"
curl -fL --retry 0 --output "$HOME/Downloads/offline-ai-model/Qwen2.5-7B-Instruct-Q4_K_M.gguf"   'https://registry.ollama.ai/v2/library/qwen2.5/blobs/sha256:2bada8a7450677000f678be90653b85d364de7db25eb5ea54136ada5f3933730'
shasum -a 256 "$HOME/Downloads/offline-ai-model/Qwen2.5-7B-Instruct-Q4_K_M.gguf"
```

Expected checksum:

```text
2bada8a7450677000f678be90653b85d364de7db25eb5ea54136ada5f3933730
```

Stop if the checksum differs. The download uses your disk space and internet transfer; it is model weights, not a paid inference call. The original upstream model is https://huggingface.co/Qwen/Qwen2.5-7B-Instruct (Apache2.0); model/application licenses remain separate. Do not download every quantization or the full multi-file repository.

Import that single GGUF, keeping the downloaded file and avoiding a second copy:

```sh
~/.lmstudio/bin/lms import "$HOME/Downloads/offline-ai-model/Qwen2.5-7B-Instruct-Q4_K_M.gguf" --user-repo local-existing/qwen2.5-7b --symbolic-link
~/.lmstudio/bin/lms ls
```

Official import flags: https://lmstudio.ai/docs/cli/local-models/import . A symbolic link means the Downloads file remains the source: do not move/delete it afterward without updating the import. Our measured setup also reused an existing file via a symlink; it did not freshly download/import this public URL. The exact proposed import command has not been executed as a fresh setup.

## 3. Load once and confirm the identifier — while online

From `lms ls`, copy the FULL model key for the imported Qwen GGUF. Replace `MODEL_KEY_FROM_LMS_LS` below with that key; do not type the placeholder literally:

```sh
~/.lmstudio/bin/lms load MODEL_KEY_FROM_LMS_LS --identifier offline-assistant --context-length 8192
~/.lmstudio/bin/lms ps
```

Expected: `offline-assistant`, the Qwen7B model, context8192 and a Local device. GPU offload can stay automatic. The identifier is yours to assign: historical evidence uses `local-pdf-7b`; the clearer reproduction alias `offline-assistant` does not change the weights. No new load or alias was applied to Mike’s machine during kit repair. Official load docs: https://lmstudio.ai/docs/cli/local-models/load . Keep a note of the runtime/model/identifier actually used.

## 4. Run the actual task offline

Unzip this kit locally. In Terminal, type `cd `, drag this kit folder from Finder into Terminal and press Return. Confirm INPUT.txt and PROMPT.txt are present. PROMPT.txt already contains both instructions and the fictional website brief.

Finish all downloads first, then disconnect Wi-Fi when safe. Other network paths must also be disconnected for a meaningful offline check. Our saved test additionally checked network states/default route and failed external IPv4/IPv6 probes before/after; this is not a security audit. You control your network; restore it afterward.

Use your loaded identifier:

```sh
~/.lmstudio/bin/lms chat offline-assistant --dont-fetch-catalog --yes   --system-prompt 'Follow the user request. Use only supplied facts. No tools or external sources.'   --prompt "$(cat PROMPT.txt)" --stats
```

On Mike’s existing setup, substitute `local-pdf-7b` for `offline-assistant` to address the already-loaded identifier. The inference instruction, prompt and model weights match the saved task. For the different store case replace PROMPT.txt with CHANGED-INPUT-PROMPT.txt. No web tools, API key or model server are needed.

Expect six candidate discovery questions. Read them beside INPUT.txt; select useful questions, add missing budget/payment questions and remove awkward assumptions. Compare all three ACTUAL-ANSWER files; wording varies. Our observed task times were10.04,11.44,8.83seconds on the installed machine, not a speed benchmark. No reply is sent and no project is accepted.

Restore Wi-Fi afterward. Stop the CLI with Control-C if needed. If the CLI reports no model/service, reopen the Applications copy of LM Studio and check `lms ps` while online; do not keep retrying blindly. If a runtime download is needed, complete it before the offline trial. If memory is insufficient, close unnecessary apps and use the context setting above; a smaller model would be a different untested variant. Keep any failure/output instead of overwriting it.

## Evidence boundary

Observed: installed local model, exact4.68GB file checksum, local CLI inference with networking disconnected, two repeated website briefs and a different store brief, useful draft preparation with documented wording gaps. Independently fresh app/runtime install, new public-blob download/import and another person’s reproduction were NOT run. Native offlinePDF attachment remains unverified and is not required here. On-prem/shared server deployment, device security and financial savings are not established.

## Stop and return to work

No cloud account or paid inference key is required for the local CLI text route. Download/application terms and model licensing remain separate. Do not enable LM Link or a remote host to reproduce this local-only exercise. Use your own permitted material.

When finished, stop any ongoing chat with Control-C, restore networking and close LM Studio if desired. To release model memory, use the official interactive `~/.lmstudio/bin/lms unload` and select only this model. Unloading does not erase model weights or your saved answer files. No unload command was run during proposal preparation. Official: https://lmstudio.ai/docs/cli/local-models/load .

## Save and judge a fresh result

In the kit directory, copy PROMPT.txt to a new working prompt. Keep an unchanged original. Make one bounded change to your brief, then use the same command with that new file; save the displayed answer to a separately named text file. Do not supply ACTUAL-ANSWER files or a desired answer in the request. Compare against the brief: all six questions should address a live decision, preserve known facts and avoid invented answers/prices. Record omissions and your own additions separately. If the task is complete, keep the answer and stop; a disappointing answer does not justify repeated downloads or a PDF troubleshooting loop.

Documentation rechecked November29,2026: runtime list/get/select, import symlink flag, load identifier/context and local chat command pages. This verifies the documented syntax, not a new installation or local inference run. Official chat reference: https://lmstudio.ai/docs/cli/local-models/chat .
