shem

Experimental

Your model is a container now.

Run containers and VMs inside a model's weights: a CPU compiled into its layers, memory in its state. The host does the rest.

Install

curl -fsSL https://jgalego.github.io/shem/install.sh | sh

For Linux and Apple Silicon Macs. Read the script, or use brew install jgalego/shem/shem.

FROM hf.co

A Hugging Face checkpoint becomes an OCI image, and a live session commits into a new one.

Linux in the weights

RV32 programs, BusyBox and a booted kernel run one instruction per forward pass.

Speaks containerd

Docker, containerd and Kubernetes start shem images through its shim.

Every bit checked

Tests hold the neural vCPU to a reference interpreter that passes the riscv-tests.

An RV32 program runs on the compiled vCPU, one instruction per forward pass. On ecall, the host handles the system call and resumes the guest.