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):
Set GGML_HEXAGON_NDEV to match the number of device IDs in --compute. qairt models coerce a device list to NPU with a warning. See Spreading across multiple HTP cores for MTP performance numbers.
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, image, or audio input:
For text-only, just launch and chat. For image or audio input, provide the absolute path or drag the file into your terminal — image (.jpg, .jpeg, .png, .webp) and audio (.wav, .mp3) paths are auto-detected, and a single prompt can carry both. google/gemma-4-E2B-it-qat-q4_0-gguf ships an audio-capable mmproj (~4.0 GiB total: Q4_0 weights + conformer mmproj, pulled together):
Output (verified on --compute npu, Snapdragon X Elite):
Audio input runs on the llama.cpp backend only and needs an audio-capable model (mmproj with a conformer encoder). Audio also runs on --compute cpu / gpu, but QAIRT models report audio: false and a QAIRT model given audio fails with GenieXError(-201201): Multimodal generation failed.
In an interactive session with an audio-capable model, /mic records a clip instead of loading one from disk — Ctrl-C stops the recording and transcribes it. This needs SoX on your PATH (sudo apt install sox, or winget install --id=ChrisBagwell.SoX -e on Windows); without it GenieX warns SoX is not installed at startup. See the audio input tutorial for the full walkthrough.

geniex model

Inspect and reconfigure cached models.

geniex model set-type

Override the model type recorded in a cached model’s manifest. Omit the type to pick it interactively.
The type decides which path geniex infer takes: vlm loads the mmproj projector alongside the weights and accepts image / audio input, while llm loads the language weights only. Forcing a multimodal GGUF to llm is how you run its text path on a board where weights + projector don’t fit in memory.
geniex pull --model-type llm <model> writes the same field at download time, so a fresh pull needs no set-type afterwards.

geniex model list

List Qualcomm AI Hub Models that have a qairt (NPU) build. Only models compatible with the detected chipset are listed unless you pass --all.

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:

geniex-bench

geniex-bench is a standalone benchmark binary — separate from the geniex CLI — that measures TTFT, prefill speed, and decode speed directly against the GenieX C API. It ships as a pre-built archive for Windows ARM64 and Linux ARM64. See the Benchmarking tutorial for download instructions and a full walkthrough. Quick reference:

Utility commands