●●●CrowdCode™›User guideversion 1.0.1We the People AI
Enclawed CrowdCode™ user guide · Model servers · version 1.0.1

Model servers

Started and stopped with CrowdCode™

The servers you set up with ccode setup start when CrowdCode™ opens and stop when it closes:

  • Already running? A server that already answers is used as it is. If CrowdCode™ didn't start it, CrowdCode™ never stops it.
  • Several windows: if two CrowdCode™ windows use the same server, it stops when the last one closes.
  • The media model keeps loading in the background. CrowdCode™ waits for it only when you attach something it needs.
  • After a crash, the next start takes over the server that was left running instead of loading the model again.
  • To keep a server running after you quit, use ccode --keep-servers.

Checking on them

ccode servers          # which servers exist, where, and whether they answer
ccode servers stop     # stop the ones CrowdCode™ started and no window uses

Logs are in ~/.local/state/crowdcode/servers/NAME.log. For a server on another computer, they're in ~/.cache/crowdcode/ on that computer.

Sharing a GPU

If other programs use the same GPU, answer "yes" when setup asks. CrowdCode™ then takes about half the GPU's memory instead of nearly all of it.

On WSL, vLLM can't tell its own GPU memory from other programs', so a second model on the same GPU needs a fixed cache size. Setup does this for the media model (KV_CACHE of 4 GB).

The config file

ccode setup writes ~/.config/crowdcode/config.json. For reference, a server entry looks like this:

{ "servers": [
  { "name": "coder", "model": "~/models/Qwen2.5-Coder-32B-Instruct",
    "vllm": "~/crowdcode-vllm/.venv/bin/vllm", "port": 8000,
    "env": { "QUANTIZE": "fp8", "GPU_UTIL": "0.55" } },
  { "name": "media", "role": "media", "ssh": "me@gpu-box",
    "model": "~/models/Qwen2.5-Omni-7B", "port": 8001,
    "env": { "LORA": "0", "KV_CACHE": "4G", "MAX_MODEL_LEN": "12288" } }
] }
KeyMeaning
nameYour name for it (a-z, 0-9, -)
rolecoder (default) or media (pictures, audio, video)
enginevllm (default), llama.cpp, ollama or airllm
modelThe model folder (vLLM, AirLLM), GGUF file (llama.cpp) or model name (Ollama), on that computer
vllm, binThe runtime's program: vLLM, llama-server, ollama, or the Python that has AirLLM (on that computer)
ctxThe context length, for llama.cpp, Ollama and AirLLM (vLLM: env.MAX_MODEL_LEN)
portIts port; localPort is the tunnel's port here, for SSH servers
sshuser@computer: start it there over SSH
urlAn address of a server someone else runs (never started or stopped)
apiKeyEnvThe environment variable holding that server's API key
env, argsSettings passed to the serve script and to vLLM. For AirLLM: env.COMPRESSION (4bit, the default, 8bit or none) and env.AIRLLM_SHARDS (where its per-layer copy goes)

Over the internet

A model on the internet works like one on your network, with two cautions:

  • Prefer SSH (setup option 2): the traffic is encrypted and the model is never exposed. A plain http:// address is not encrypted.
  • Enclawed™ is the gate. CrowdCode™ can reach only the computers in Enclawed™'s policy, so a typo or a changed setting can't send your code somewhere else.