Skip to content
C-Kernel-Engine docs Antshiv Open Source

C-KERNEL-ENGINE · GUIDE

Ask Qwen2 a question

Start with Gemma 3 270M or Qwen3 0.6B for a terminal conversation or an HTTP endpoint. The example below uses Qwen2.

Run a small text model

From the C-Kernel-Engine directory, paste the whole command. The model name identifies an instruction-tuned Qwen2 model in the half-billion-parameter size class. The GGUF file holds a compressed representation of its weights.

Examplebash
version/v8/scripts/cks-v8-run run \
  hf://Qwen/Qwen2-0.5B-Instruct-GGUF/qwen2-0_5b-instruct-q4_k_m.gguf \
  --context-len 1024 \
  --prompt 'What is the capital of France?' \
  --max-tokens 24 \
  --temperature 0.0

What to expect

On a fresh machine, CKE first fetches the model. It prepares the weights, plans memory and compiles a CPU program. A line such as Generated: .../model_v8.c means the build reached code generation. Keep the command running until you see the model’s response.

Read the line beginning with Response:. On our Linux run the response began “The capital of France is Paris.” It continued into another sentence and stopped at the 24-token cap. The terminal printed stop: max_tokens reached. Wording can vary across versions. The short question gives you an easy way to check that text generation worked before asking for anything more involved.

Read the timing lines

After the response, prompt eval measures processing the input. decode measures generating tokens one at a time. A fast prompt-evaluation number and a slower decode number are normal. Build and download time are separate from those two figures.

What the numbers mean

  • --context-len 1024 reserves a context window for tokens from the conversation. Tokens are pieces of text and can be shorter than a word.
  • --max-tokens 24 caps how many new tokens the model may produce. It can stop earlier.
  • --temperature 0.0 selects the most likely next token at each step. This makes it easier to compare two runs.

A 1,024-token window holds the formatted prompt and the reply together. If the formatted prompt uses 900 tokens, at most 124 remain for output. A 24-token allowance fits. Asking the HTTP server for 200 exceeds that budget. Instructions and chat markers count even when you only typed one sentence.

For an application, send the reply limit as max_output_tokens. See server defaults and caps or test the endpoint as an agent.

Once you have an answer, change the prompt.