{"slug": "run-a-4b-llm-model-locally-on-your-mac", "title": "Run a 4B LLM model locally on your mac", "summary": "A developer has published a step-by-step guide for running a 4B parameter LLM locally on a Mac, using Mozilla's llamafile and a fine-tuned Qwen3 model from Hugging Face. The process involves downloading llamafile v0.10.5 and the Qwen3-4B GGUF file, creating a shell script, and removing macOS quarantine attributes to run the model as a local server on port 8080.", "body_md": "| Run a 4B LLM model locally on your mac, this has been tested on MacOS Tahoe | |\n| Step 1: | |\n| Lookup \"llamafile github\" or go to https://github.com/mozilla-ai/llamafile | |\n| Download the latest release, as of this it is llamafile v0.10.5 | |\n| Step 2: | |\n| Go to https://huggingface.co/models | |\n| Search for qween3 | |\n| Click on pramodlohra/Qween3_4B_thinking_finetune | |\n| Go to Files and versions | |\n| Download qwen3-4b-thinking-2507.Q4_K_M.gguf | |\n| Step 3: | |\n| Create a folder called qwen | |\n| Copy llamafile v0.10.5 and qwen3-4b-thinking-2507.Q4_K_M.gguf into the folder | |\n| Step 4: | |\n| In this folder, create a file called run_qwen.command | |\n| Write the following lines in it | |\n| #!/bin/bash | |\n| cd \"$(dirname \"$0\")\" | |\n| ./llamafile-0.10.5 --server --model ./qwen3-4b-thinking-2507.Q4_K_M.gguf | |\n| Save the run_qwen.command file | |\n| Step 5: | |\n| Run chmod for llamafile llamafile-0.10.5 and run_qwen.command | |\n| chmod 755 llamafile-0.10.5 | |\n| chmod 755 run_qwen.command | |\n| Step 6: | |\n| Remove the quarantine flag from running this in the terminal | |\n| xattr -d com.apple.quarantine run_qwen.command | |\n| xattr -d com.apple.quarantine llamafile-0.10.5 | |\n| You can check whether quarantine is still present with: | |\n| xattr -l run_qwen.command | |\n| xattr -l llamafile-0.10.5 | |\n| If com.apple.quarantine doesn't appear, you're good. | |\n| NOTE: Don't disable Gatekeeper globally with commands such as sudo spctl --master-disable. | |\n| There's absolutely no need for that here; removing the quarantine attribute from these specific files is much safer. | |\n| Now you are ready to click on the run_qwen.command file and run the model locally | |\n| If everything is done correctly, this is what would show up in the terminal. | |\n| % /Users/santa/Downloads/qwen/run_qwen.command ; exit; | |\n| 0.00.000.673 I cmn common_param: common_params_print_info: verbosity = 3 (adjust with the `-lv N` CLI arg) | |\n| 0.00.000.921 W srv llama_server: ----------------- | |\n| 0.00.000.926 W srv llama_server: CORS is set to allow all origins ('*') and no API key is set | |\n| 0.00.000.926 W srv llama_server: this can be a security risk (cross-origin attacks) | |\n| 0.00.000.927 W srv llama_server: more info: https://github.com/ggml-org/llama.cpp/pull/25655 | |\n| 0.00.000.927 W srv llama_server: ----------------- | |\n| 0.00.001.045 W srv llama_server: sandbox: disabled in GPU mode | |\n| 0.00.002.429 I srv load_model: loading model './qwen3-4b-thinking-2507.Q4_K_M.gguf' | |\n| 0.00.429.537 W load: control-looking token: 128247 '</s>' was not control-type; this is probably a bug in the model. its type will be overridden | |\n| 0.04.590.135 I srv load_model: initializing, n_slots = 4, n_ctx_slot = 14080, kv_unified = 'true' | |\n| 0.04.600.756 I srv llama_server: model loaded | |\n| 0.04.600.778 I srv llama_server: listening on http://127.0.0.1:8080 | |\n| You can start using the model on 127.0.0.1:8080, Enjoy! |", "url": "https://wpnews.pro/news/run-a-4b-llm-model-locally-on-your-mac", "canonical_source": "https://gist.github.com/santakd/a2ccfeb612d3bc168c7ba8af946da65c", "published_at": "2026-08-12 09:39:32+00:00", "updated_at": "2026-08-12 09:49:54.097795+00:00", "lang": "en", "topics": ["large-language-models", "developer-tools", "ai-infrastructure"], "entities": ["Mozilla", "Hugging Face", "Qwen3", "llamafile", "pramodlohra"], "alternates": {"html": "https://wpnews.pro/news/run-a-4b-llm-model-locally-on-your-mac", "markdown": "https://wpnews.pro/news/run-a-4b-llm-model-locally-on-your-mac.md", "text": "https://wpnews.pro/news/run-a-4b-llm-model-locally-on-your-mac.txt", "jsonld": "https://wpnews.pro/news/run-a-4b-llm-model-locally-on-your-mac.jsonld"}}