Run layout on one GPU#
One GRPO step#
First run, four commands#
docker pull radixark/miles:latestthe tag moves, so record the digest
mkdir -p ~/miles-lab/runs ~/.cache/huggingfacelab folder and model cache
docker run --rm --name miles-plain --gpus allstart the container with the GPUs
grep -o "'rollout/raw_reward': [0-9.]*" runs/plain.logreward of each step
Run and check a step#
| Task | Code |
|---|
| Pull the image | docker pull radixark/miles:latest |
|---|
| Make the lab folder | mkdir -p ~/miles-lab/runs ~/.cache/huggingface |
|---|
| Start a run | docker run --rm --name miles-plain --gpus all |
|---|
| Read the reward | grep -o "'rollout/raw_reward': [0-9.]*" runs/plain.log |
|---|
| Set the step count | -e MILES_NUM_ROLLOUT=<steps> |
|---|
| Name the run | -e MILES_RUN=<name> |
|---|
| Fix the seed | -e MILES_SEED=<seed> |
|---|
| Add Miles flags | -e MILES_EXTRA_ARGS="<flags>" |
|---|
Stop and guard#
| Command | What it does |
|---|
docker stop "$name" | The watchdog stops the run after the strike count is reached. |
|---|
docker pause "$c" | The heat guard pauses the container at 84 C. |
|---|
Defaults that matter#
| Setting | Default | Note |
|---|
MILES_NUM_ROLLOUT | 12 | Steps in one run |
|---|
MILES_MODEL | Qwen3-0.6B | Model the launcher downloads |
|---|
--rollout-batch-size | 32 | Prompts per step |
|---|
--n-samples-per-prompt | 8 | Answers per prompt |
|---|
--sglang-mem-fraction-static | 0.4 | Engine share of GPU memory |
|---|
--update-weight-buffer-size | 536870912 | Bucket size in bytes |
|---|
| Watchdog limit | 100 | Errors in 60 s that count as a strike |
|---|
| Watchdog checks | 10 | Strikes in a row before the stop |
|---|
Signals in the scripts#
- Heat guard
- pauses the container when the GPU reaches 84 C.
- Resume rule
- the guard resumes at 74 C or below after 45 s, or after 120 s at most.
- Strike
- one check that counts more than 100 lines of
503 Service Unavailable. - Errors
- the 503 lines counted in the last 60 s of the container log.
- Done file
- the guard stops when
queue2.done exists.
Questions#
- Why is the limit 100?
- It is the default errors per 60 s. Errors above it count as a strike.
- Why 10 checks?
- Ten strikes in a row stop the run.
- Why 30 s?
- Each watchdog check waits 30 s.
- Why does the guard wait before it resumes?
- It resumes at 74 C after 45 s, or after 120 s at most.