Skip to content

Getting started

1. Check the host

  • A datacenter Hopper, datacenter Blackwell or Vera Rubin GPU (consumer Blackwell is not supported yet).
  • An NVIDIA driver that supports CUDA 13.5.
  • An x86-64 CPU at x86-64-v3 (AVX2, FMA and BMI2: Intel Haswell, AMD Zen or newer), or an NVIDIA Grace CPU (GH200, GB200, GB300). The image is multi-arch, so both pull the same layerscale/layerscale:latest.
  • Docker with the NVIDIA Container Toolkit, so docker run --gpus all works.

2. Start the server

Name the model by its Hugging Face repo id. The engine downloads the checkpoint into the Hugging Face cache on the first start and loads it from there afterwards, so mount the cache from the host:

Terminal window
docker run --gpus all -p 8080:8080 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
layerscale/layerscale:latest \
serve 0.0.0.0:8080 --model nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-NVFP4

A gated or private model also needs -e HF_TOKEN=hf_.... A local directory works too: mount it and pass its path as --model. See Models.

Everything after the image name is the engine’s command line.

The engine logs one JSON object per line on stdout. It loads the weights, runs a warm-up and only then binds the port. The ready line carries the bound address. Until then the port refuses connections.

3. Send a request

/health needs no key:

Terminal window
curl http://127.0.0.1:8080/health

Without --api-key nothing else does either; started with --api-key <KEY>, the server wants -H "Authorization: Bearer <KEY>" on every other request. A chat completion:

Terminal window
curl http://127.0.0.1:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"messages": [{"role": "user", "content": "What is a KV cache?"}],
"max_tokens": 128
}'

The reply is an OpenAI chat.completion object. A model field in the request is accepted and ignored; the response carries the server’s model name.

Stream tokens with "stream": true:

Terminal window
curl -N http://127.0.0.1:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"messages": [{"role": "user", "content": "Count to ten."}], "stream": true}'

Next steps