Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

shem

Run containers and VMs inside a model’s weights.

shem treats the host as a hypervisor and a model as the machine. The model supplies a CPU, compiled into its weights, and RAM, which is its recurrent state. The host supplies everything else: system calls, devices, scheduling and storage. Images are standard OCI images, built from Shemfiles with shem build or docker build, and they can carry a running guest, a booted kernel or a primed language model session.

Quick start

curl -fsSL https://jgalego.github.io/shem/install.sh | sh
shem run ghcr.io/jgalego/shem/hello:latest

From a repository checkout, with uv installed:

shem build -t qwen3 examples/qwen3
shem run qwen3 "What is a golem?"

Programs use the reference interpreter by default. --vcpu neural selects a standalone RV32IM network with compiled weights; it needs a neural server. Language-model sessions use PyTorch, not the vCPU.

Guides

TaskGuide
Import a model, save a session or add toolsModel images
Build, push and pull imagesShemfile
Run with Docker or containerdcontainerd and Docker
Configure nodes or mount model imagesKubernetes
Run on Windows without WSLWindows
Boot Linux or save a booted VMVM mode
Run and benchmark the compiled CPUNeural vCPU
Understand the runtime and its limitsArchitecture

shem is experimental, and not fast: the project README says when to use it, and when not to, against Ollama, Docker Model Runner, RamaLama and KitOps.

The source is at github.com/JGalego/shem.