Farshid Pirahansiah

Local LLM — Prompts & Keywords Bank (reusable for future models)

Use these to (a) benchmark any new local model fast, and (b) ask for the right optimization tags.

Prompt templates to copy-paste

1. Simple benchmark (any OpenAI-compatible endpoint)

What is 2+2? Reply with just the number.

Expected: 4. If you get a long “Thinking Process…” or an empty reply, the model is a reasoning model that needs thinking suppressed.

2. Suppress thinking — pass as request kwargs

{ "chat_template_kwargs": { "enable_thinking": false } }

Ollama: options = { "num_predict": N } — NOTE: on /api/generate Ollama strips reasoning and can return an EMPTY response; use /api/chat or /v1/chat/completions.

3. Latency / throughput (tok/s), apples-to-apples

Write a haiku about the ocean then explain it in one sentence.

4. Sanity: does it actually answer, or burn tokens thinking?

What is the capital of Japan? Answer in one word only.

Pass max_tokens: 32. Reasoning models WILL come back empty @32 — that is a model/backend problem, not a tuning problem. A non-reasoning or thinking-suppressed model returns Tokyo.

5. Tool-calling (for use inside Hermes / agent loops)

You have a tool get_weather(city). Call it to get the weather in Tokyo, then tell me.

Verify the reply contains a tool call ([{"name":"get_weather",...}]), not prose.

Keywords to include when asking an assistant to set up a local model

Hardware/Apple latest: Apple Silicon, MLX, mlx-lm, Neural Engine, ANE, CPU+GPU+NPU, Metal, precompiled kernels, iogpu.wired_limit_mb

oMLX specifics: oMLX, continuous batching, tiered KV cache, hot/cold cache, paged cache, prefix sharing, Copy-on-Write, LRU multi-model, memory guard, chat_template_kwargs, enable_thinking:false, profiles, speculative decode

llama.cpp tuning: llama-server, -ngl 99, -fa on (flash attention), -ctk q8_0 -ctv q8_0 (quantized KV cache), --cache-reuse, -cb (continuous batching), -t, --alias, GGML_MLX=on, -hf-repo/--hf-file

Context/QoL: 64K context, max_model_len, context caching, KV shift, keep-alive, OLLAMA_CONTEXT_LENGTH, OLLAMA_MAX_LOADED_MODELS, OLLAMA_NUM_PARALLEL, OLLAMA_KEEP_ALIVE, OLLAMA_NO_CLOUD

One-liner prompts for the next model

Pitfalls worth remembering