If you want to run an artificial-intelligence model on a CPU and inspect the generated program rather than hiding it behind a large framework, this guide shows how to get started with C-Kernel-Engine (CKE) on Linux. We will clone the source, prepare the development environment, download a small Gemma model, generate a C runtime, run one prompt, and open the intermediate-representation visualizer.
If this is your first encounter with the project, begin with What Is the C-Kernel-Engine? for the motivation and architectural overview. This article is the practical companion: it moves from concepts to a reproducible first CPU inference run.
CKE is still an emerging research system. It is gaining model coverage and practical workflows quickly, but it is not yet a polished package that promises every model, operating system, quantization, context length, or processor. The commands below follow the repository at commit ac63d4ffa on September 13, 2026. If the project changes later, the CKE v8 inference runbook is the source of truth.
If you want to skip the manual walkthrough, jump to the local coding-agent prompt. Give it to an agent with terminal access and let it inspect, install, run, and document the first CKE model for you. You should still review privileged commands and the final evidence report.
What Is C-Kernel-Engine?
CKE is a C-first compiler, CPU-kernel library, and runtime for transformer inference and training research. It accepts model metadata and weights, combines them with an explicit circuit and kernel capability maps, lowers that program through intermediate representations, and emits readable C for the selected model.
The distinction matters. A conventional model runtime often contains one large central implementation with model-specific branches. CKE is trying to make the ownership boundaries explicit:
- Circuits describe model topology, dimensions, state, and required mathematical semantics.
- Kernel maps bind operations to implementations with explicit data type, layout, reduction, threading, and processor capabilities.
- C kernels implement numerical operations such as matrix multiplication, normalization, attention, convolution, and recurrent state updates.
- The domain-specific language (DSL) validates and lowers the declared program. Missing or ambiguous capabilities should fail instead of being guessed from a model name.
- Evidence fixtures compare kernels, layers, logits, state, and token trajectories with independent implementations such as PyTorch or llama.cpp.
For the architecture before the commands, read CKE concepts, the architecture guide, and my earlier explanation of why templates are circuit maps.
System Requirements
Use a Linux computer with a working C compiler, Git, Make, Python 3, and enough memory and storage for the model you choose. CKE auto-detects available processor instruction-set capabilities, but hardware coverage varies by kernel and model lane. Start with a small model before attempting a 27-billion-parameter or mixture-of-experts artifact.
sudo apt update
sudo apt install build-essential git make python3 python3-venv python3-pipLinux is the supported development and profiling environment. Windows, Windows Subsystem for Linux, and macOS may run portions of the project, but they are currently best-effort rather than supported operator paths.
1. Clone CKE And Its Submodules
git clone --recurse-submodules \
https://github.com/C-Kernel-Engine/C-Kernel-Engine.git
cd C-Kernel-EngineThe --recurse-submodules option matters because CKE integrates external components at pinned revisions. If you already cloned without it, initialize them explicitly:
git submodule update --init --recursive2. Prepare The Development Environment
./scripts/setup-dev-env.shThe supported setup path creates or prepares the repository-local Python environment and installs the dependencies needed by conversion and orchestration. Python helps download, convert, validate, and compile a model; the generated native model runtime is C.
If you prefer to prepare the v8 environment manually:
python3 -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r version/v8/requirements.txt3. Run A Small Model First
The safest first model is Gemma 3 270M Instruct. It is small enough to make setup failures easier to diagnose and is listed in CKE's current starter path.
version/v8/scripts/cks-v8-run run \
hf://unsloth/gemma-3-270m-it-GGUF/gemma-3-270m-it-Q5_K_M.gguf \
--context-len 1024 \
--prompt 'Explain why numerical reduction order matters.' \
--max-tokens 256 \
--generate-visualizerOn the first run, CKE downloads the named GGUF model artifact, converts its weights into CKE's BUMP representation, resolves its circuit and kernel maps, plans memory, generates C, compiles a shared model library, formats the prompt, and runs inference. Later runs can reuse those artifacts.
The model reference is explicit. Q5_K_M is the quantization format of this particular GGUF artifact. --context-len 1024 compiles and allocates the requested context boundary; it is not a claim that every supported model has been certified at its vendor-advertised maximum context. --generate-visualizer produces an inspectable view of the lowered program and memory plan.
4. Know What A Successful Run Proves
A coherent answer proves that model download, conversion, compilation, loading, tokenization, prompt formatting, and basic inference connected successfully for that artifact. It does not by itself prove numerical parity, maximum context, production safety, or competitive speed.
CKE separates three evidence levels:
- Bring-up: real weights convert, compile, and produce coherent output.
- Full-model numerical certification: declared inputs, executed layer kinds, state transitions, logits, and a bounded decode trajectory agree with an independent oracle under an explicit contract.
- Production certification: numerical evidence is extended with the advertised workload envelope, repeatability, memory safety, processor coverage, application fixtures, and measured performance.
Check the model and kernel evidence matrix before turning one successful prompt into a broad support claim.
5. Rebuild Intentionally
CKE caches downloaded, converted, and compiled artifacts. When the model file, converter, circuit, kernel map, or generated runtime has changed, use explicit rebuild options instead of accidentally testing stale output:
version/v8/scripts/cks-v8-run run \
hf://unsloth/gemma-3-270m-it-GGUF/gemma-3-270m-it-Q5_K_M.gguf \
--context-len 1024 \
--force-convert \
--force-compile \
--prompt 'Write a safe C function that sums an array.' \
--max-tokens 256This matters because a cached runtime built from an older artifact can make a repair look ineffective or make a regression appear to pass. CKE's Qwen3.8 regression work reinforced that conversion provenance and generated-runtime identity are part of correctness.
6. Try Text, Vision, Or Audio
The same project now has bounded paths across three modalities, but they do not all use identical commands or carry identical evidence.
Text
Text model families use the run subcommand. Gemma3, Qwen2, Qwen3, Qwen3.5, Llama-family artifacts, GLM4, Nemotron, Cohere, Laguna, Instella, Kimi, and larger experimental families have different tested boundaries. Copy the exact command from the v8 runbook rather than assuming one set of flags fits every tokenizer and circuit.
Audio
ffmpeg -i recording.mp3 \
-ac 1 -ar 16000 -c:a pcm_s16le \
/tmp/recording-16k.wav
version/v8/scripts/cks-v8-run audio \
hf://openai/whisper-base \
--wav /tmp/recording-16k.wav \
--output build/whisper-transcript.jsonWhisper is the most mature practical CKE audio path today. Parakeet and Cohere Transcribe also have complete long-recording evidence, but use different orchestration and retain open performance, voice-activity, timestamp, and generated-circuit boundaries. The measurements are documented in Beyond Whisper: CKE Runs Parakeet and Cohere Across 42 Minutes on CPUs.
Vision
Vision requires a matching model projection artifact, an image, and model-specific options. Qwen3-VL is the promoted baseline, while other vision families remain at narrower smoke or numerical boundaries. Follow the canonical Qwen3-VL run; text support for a model family does not automatically certify its vision encoder.
7. Compile Once And Use The Native Boundary
CKE's Python command is the build orchestrator, not the intended permanent token loop. After generating a model, advanced integrations can build ck-cli-v8 or use the versioned native session interface:
make ck-cli-v8
make ck-session-v8
make test-native-session-v8The session library exposes model loading, native chat formatting, encoding, generation, streaming token callbacks, cancellation, reset, timings, and capability discovery. External C, Python, or Rust applications can bind this boundary without reproducing model-specific behavior.
Common First-Run Problems
- Submodule or symbol errors: run
git submodule update --init --recursive, then rebuild. - Python import errors: activate
.venvor run scripts with.venv/bin/python. - Out-of-memory failure: start with Gemma3 270M or Qwen2 0.5B and reduce context length.
- Prompt markers appear in the answer: use the documented chat-template setting for that model rather than guessing.
- A source repair appears unchanged: use a fresh run directory or
--force-convert --force-compile. - A model compiles but quality is wrong: record the exact artifact hash, prompt, quantization, context, CKE commit, processor, and generated report before filing an issue.
Optional: Ask A Local Coding Agent To Guide The Setup
You do not have to diagnose every installation step manually. If you already use a coding agent with terminal and repository access, open it from the parent directory where you want CKE installed and give it the prompt below. This means an agent running on your computer and operating your development tools; it does not mean the agent itself is running through CKE.
I want to install and verify C-Kernel-Engine (CKE) on this Linux computer.
Repository:
https://github.com/C-Kernel-Engine/C-Kernel-Engine
Work methodically and use the repository's current documentation as the source
of truth. Do not guess commands from memory.
1. Inspect the operating system, compiler, Python, Git, Make, available memory,
free disk, and CPU instruction-set capabilities.
2. Clone CKE with its submodules, or inspect the existing checkout if present.
Preserve unrelated files and changes. Do not reset or delete existing work.
3. Read the current quickstart, v8 runbook, LICENSING.md, and repository setup
scripts before installing or changing anything.
4. Explain any required system packages. Ask me to run privileged commands if
administrator access is required; do not weaken permissions or security.
5. Prepare the supported development environment using the repository's setup
path.
6. Start with the documented small Gemma 3 270M GGUF example at a conservative
context length. Do not begin with a large model.
7. Record the exact CKE commit, model repository and filename, artifact revision
or hash when available, quantization, context length, compiler, CPU, command,
wall time, peak memory if measurable, and output location.
8. If the run fails, identify the first actual cause from logs. Do not hide a
missing dependency, unsupported tensor type, skipped test, stale artifact,
or out-of-memory condition behind repeated retries.
9. If the run succeeds, explain what the result proves and what it does not.
A coherent answer is not automatically numerical parity or production
certification.
10. Generate the visualizer if the documented command supports it, and tell me
where the generated C, model library, logs, reports, and visualizer live.
11. Run only the focused checks needed to validate this first setup. Do not
publish, deploy, purchase anything, expose a network service, or modify CKE
source code without my explicit approval.
Finish with a concise setup report containing:
- environment and hardware
- commands executed
- files downloaded or generated
- tests and evidence that passed
- failures, skips, and unsupported boundaries
- exact reproduction command
- recommended next stepAn agent can remove much of the setup friction, but it cannot turn an untested configuration into supported evidence. Review its commands, keep credentials out of prompts and logs, and require it to report skipped or missing checks explicitly. If it proposes modifying the compiler merely to make the first example run, stop and reduce the problem to a reproducible issue before accepting a patch.
How To Start Contributing
You do not need to begin by changing the compiler. A useful first contribution can reproduce one Linux workflow, add an independent numerical fixture, profile one kernel, improve a processor-specific implementation, or document a failure with enough evidence to repeat it.
Read the CKE contributor path, choose a bounded task, and preserve the evidence. Before opening a pull request, install the repository hooks:
./scripts/setup-hooks.shOne legal boundary also matters: CKE currently publishes its source but does not yet publish a broad root software licence. Read LICENSING.md before copying, redistributing, or building commercial work on the code.
Where To Go Next
- C-Kernel-Engine source repository
- Official getting-started documentation
- v8 inference runbook
- Model and kernel evidence matrix
- Kernel catalogue
- CKE X-Ray numerical debugging