Command-line reference
The dynalm command line downloads models (pull), chats (run, chat), serves an OpenAI-compatible API (serve), stops a server (stop), inspects models (inspect, models), diagnoses the machine (doctor) and measures performance (benchmark, autotune). Run dynalm help or any command without arguments for its options.
Commands at a glance
| Command | Purpose |
|---|---|
dynalm pull <name|link> | Download a model (registry name, Hugging Face link or any .gguf URL) |
dynalm run <model> [-p TEXT] | One answer with -p; an interactive chat without it |
dynalm chat <model> | Interactive chat (same as run without -p) |
dynalm serve <model> | OpenAI-compatible HTTP server (one model per server) |
dynalm stop | Ask a running server to finish requests and exit |
dynalm models | List local models; --available lists registry names |
dynalm rm <model> | Delete GGUF files, partial downloads or Hugging Face folders |
dynalm inspect <model> | Architecture, size, quantization, RAM estimate and a support check |
dynalm doctor [--json] | System report: CPU features, backends, memory, kernel self-test |
dynalm benchmark <model> | Load test: throughput and P50–P99 latency |
dynalm autotune [--run <model>] | Show kernel selection; tune the CPU thread count |
dynalm config [show|path|init] | Effective configuration and its sources |
dynalm version | Versions, build type, compiler and kernels |
Model references
Wherever a command takes <model>, you can pass a registry name (qwen3:4b, llama3.2:3b), an alias (qwen3, llama:3b), a GGUF file path (./models/qwen3-4b.gguf) or a Hugging Face model folder (./models/st/qwen2.5-0.5b-instruct).
Coming from Ollama
| Ollama | DynaLM |
|---|---|
ollama pull qwen3:4b | dynalm pull qwen3:4b |
ollama run qwen3:4b | dynalm run qwen3:4b |
ollama run qwen3:4b "question" | dynalm run qwen3:4b -p "question" |
ollama list | dynalm models |
ollama rm qwen3:4b | dynalm models rm qwen3:4b |
ollama show qwen3:4b | dynalm inspect qwen3:4b |
ollama serve | dynalm serve qwen3:4b (one model per server) |
ollama stop | dynalm stop |
dynalm run options
| Option | Meaning |
|---|---|
-p, --prompt TEXT | The prompt (without it, run starts a chat) |
-n, --max-tokens N | Tokens to generate (default 128; chat: 2048) |
--system TEXT | System message |
--chat / --raw | Use the model’s chat template (default) / send text as is |
--stop TEXT | Stop when this text appears (repeatable) |
-t, --threads N | Compute threads (default: physical cores) |
-c, --ctx N | Context / KV cache size in tokens (default 4096) |
--gpu / --cpu, --backend ... | Device selection; see backends |
--mode M | auto, performance, exact or safe |
--temp, --top-k, --top-p, --min-p, --seed | Sampling (default for run: greedy) |
--spec ngram / --spec DRAFT.gguf | Speculative decoding; with greedy sampling every kept token is the model’s own choice |
Chat commands
| Command | Effect |
|---|---|
/bye, /exit, /quit | Leave (also Ctrl+D) |
/clear | Forget the conversation |
/system TEXT | Set the system message and start over |
/think on / /think off | Qwen3 reasoning on or off |
/set temp 0.7, /set top_p 0.9, /set seed 42 | Change sampling |
/stats on | Print speed after each reply |
""" | Start and end a multi-line message |
| Ctrl+C | Stop the current reply |
The model stays loaded and earlier turns are reused rather than reprocessed, so follow-up messages start quickly. When the conversation outgrows the context (-c), the oldest exchanges are dropped.
dynalm benchmark options
| Option | Meaning |
|---|---|
--concurrency LIST | For example 1,4,16 (default 1,4) |
--prompt LIST | Prompt lengths in tokens (default 128,512) |
--output LIST | Output lengths (default 128) |
--requests N | Requests per point (default 2 × concurrency, at least 4) |
--url http://HOST:PORT | Benchmark a running server (DynaLM, llama.cpp, vLLM, Ollama…) |
--out FILE | Append results as JSON lines |
Example
dynalm benchmark qwen2.5:1.5b --concurrency 1,4,16
Server options are listed in OpenAI-compatible API.
Global options
-q prints errors only, -v adds debug detail and --log-level L accepts quiet, normal, verbose, debug or trace. To hide [INFO] lines in a chat: dynalm --log-level warn chat ....
Frequently asked questions
Does run download the model automatically?
Yes. run, serve and benchmark download a named model on first use if it is not cached.
How do I download a gated model such as official Llama?
Accept the license on Hugging Face, then set HF_TOKEN before dynalm pull.
Source: docs/cli.md (opens in a new tab)