Perform RL and neuron steering for LLMs to be used in Chock
  • Python 86.6%
  • Nix 13.4%
Find a file
2026-10-31 16:18:27 -07:00
.github/workflows feat: init 2026-10-31 14:35:56 -07:00
docs feat: collect trainable skill datasets 2026-10-31 15:23:11 -07:00
pkgs/chock-surgeon feat: init 2026-10-31 14:35:56 -07:00
src/chock_surgeon feat: collect trainable skill datasets 2026-10-31 15:23:11 -07:00
tests feat: collect trainable skill datasets 2026-10-31 15:23:11 -07:00
.envrc feat: init 2026-10-31 14:35:56 -07:00
.gitignore feat: init 2026-10-31 14:35:56 -07:00
flake.lock feat: init 2026-10-31 14:35:56 -07:00
flake.nix fix: expose cusparselt on arm 2026-10-31 16:18:27 -07:00
LICENSE Initial commit 2026-10-31 18:58:01 +00:00
pyproject.toml feat: init 2026-10-31 14:35:56 -07:00
README.md feat: collect trainable skill datasets 2026-10-31 15:23:11 -07:00
treefmt.nix feat: init 2026-10-31 14:35:56 -07:00

chock-surgeon

Perform RL and neuron steering for LLMs used in Chock.

Surgeon is the training-side companion to Chock. Chock owns reproducible workspaces, microVMs, policy enforcement, tool execution, evaluation rewards, and lossless rollout artifacts. Surgeon verifies those artifacts and connects them to trainers and inference engines such as veRL and SGLang.

chock-surgeon validate rollouts/run-001/dataset.json --split train
chock-surgeon inspect rollouts/run-001/case-0-rollout-0.trajectory.json
chock-surgeon export-verl rollouts/run-001/dataset.json train.jsonl
chock-surgeon skill inspect skills/review-a-diff
chock-surgeon skill collect skills/review-a-diff --split train --output rollouts/review-train

The base package has no third-party runtime dependencies. Install the train extra in a veRL environment or the steer extra for the local PyTorch/Transformers steering adapter.

On Linux, the repository also provides the complete pinned veRL environment:

nix develop .#train

It is generated from veRL's uv lock with uv2nix and includes the CUDA-enabled PyTorch and vLLM stack. Model weights and experiment outputs remain external to the repository.

See docs/ for the artifact contract, trainable skills, training integration, neuron steering, weight transforms, and reproducible experiment design, one page per subject.

The implementation is still being assembled. Local Transformers steering is implemented, while SGLang/vLLM steering requires an engine-side hook before it can be used for high-throughput online training.