Run an open-weight model on your computer 00:00:01 An offline tutor on a workbench Milo unplugs the network cable and asks his bench computer a question. Before a single letter appears, four things need to agree: the downloaded weights, the tokenizer, the chat template and the runner. A green power light proves just one of them. A model download supplies learned parameters and configuration. It still needs a tokenizer to turn input into IDs, a chat template to serialize roles and turns, and an inference runtime with kernels for the model architecture and weight format. The runtime allocates buffers, processes the prompt, chooses a next token and repeats until a stop condition is met. After the complete artifact is local, this example performs inference on your own machine. The measured file in this example is four hundred ninety-one million four hundred thousand thirty-two bytes. A matching length is useful, but a trusted digest and pinned revision give the download a much stronger identity. 00:01:03 From file to first reply Download the Q4_K_M file at the pinned revision, compare its SHA-256 digest and retain the license alongside the artifact. Start llama-server bound to loopback with the local file, explicit alias and a 2048-token context. Check readiness before sending a request. The chat endpoint applies the loaded model’s template, tokenizes the input and sends the IDs to prefill. Decode a bounded response and inspect its finish reason. Stop the server when finished to release the model and key and value memory. 00:01:41 Inspect the boundaries of the runner Availability of model weights, availability of training data information, availability of training code and the license are distinct questions. Read the particular checkpoint’s model card and license before deciding whether it can be redistributed or modified. The OSI definition describes additional freedoms and materials for open-source AI. The pinned quantized Qwen file in this example lists the Apache two point zero license. Record that artifact license separately from llama C plus plus’s runtime license and the provenance of any adapter. The chat template encodes boundaries that the instruction-tuned model saw during training. Mismatched special tokens, extra role delimiters or the wrong end token can change behavior even when weight loading succeeds. Keep the template and tokenizer matched to the model revision. First send structured messages to the chat endpoint. If the assistant echoes role labels, inspect the rendered template before changing temperature or retraining. Kernels perform matrix operations on supported hardware. llama C plus plus can run on C P Us and offload supported work to accelerators. Apple Silicon shares physical memory across C P U and G P U. M L X L M is another Apple-focused runtime. Device choice, unsupported kernels and partial offload affect speed and peak memory. A model can fit partly in video memory and partly in system RAM yet decode slowly because layers or activations cross a slower boundary. Start with an instruction-tuned checkpoint small enough to leave room for the runtime and context cache. Identify the exact revision, license and file digest. G G U F is a container for model metadata and tensors. it can hold several different numeric representations. A safetensors checkpoint uses a different packaging convention and normally ships alongside configuration and tokenizer files. Choose a compatible runtime before choosing a download purely by size. 00:03:39 Why is it printing role markers? A model starts but prints role markers and continues the user’s message. What should be checked first? A serialization mismatch can change the meaning of an otherwise valid prompt. Check the boundary before comparing model quality. When a local chat continues writing as the user, inspect the rendered input and stop handling first. A running model is only the middle of the path from a verified file to a usable answer.