Skip to main content

Model inference

geniex pull

Download a model and store it locally.
Pulling from a local path:
pull copies files into the GenieX cache. After a successful pull you can safely delete the source to avoid keeping two copies.
Precision (Quantization) (llama.cpp only) For GGUF models the CLI prompts you to pick a precision:
Q4_0 has the best Hexagon NPU support. See Precisions (Quantizations) Supported.
Qualcomm AI Hub Models are pre-quantized — no choice needed.

geniex infer — LLM

Launch an interactive chat session with a language model.
Thinking mode — control whether the model shows reasoning before responding:
Compute unit selection (via --compute) — pick which compute unit runs the model (default: npu):
Qualcomm AI Hub Models run on NPU only. Using --compute cpu or --compute gpu returns an error.

geniex infer — VLM

Run vision-language inference with text-only or image input:
For text-only, just launch and chat. For image input, provide the absolute path or drag the file into your terminal:

geniex serve

Start the OpenAI-compatible local server. See Local server for the API.
To move a thinking model’s chain-of-thought out of message.content into message.reasoning_content, set the per-request reasoning_format field — see Separating reasoning.

Logging

--log is a global flag controlling the CLI’s log output. It is equivalent to the GENIEX_LOG environment variable and takes precedence over it when both are set.

Configuration flags

These flags can be passed to geniex infer to control model loading and generation.

Sampler flags

Control how the model selects tokens during generation.

Model flags

Control model loading, context, and generation limits.

Increasing the context length

The context window (--nctx) is how much the model can hold at once. When a conversation grows past it you get a context length exceeded error. How to raise it depends on the runtime:
  • llama.cpp (GGUF): --nctx <N> raises the window at runtime, up to the model’s trained maximum. A larger window uses more KV-cache memory.
  • Qualcomm AI Engine Direct (NPU): the context length is baked into the compiled bundle and cannot be raised at runtime — --nctx has no effect. Instead:

Utility commands