Commit Graph
3 Commits
Author SHA1 Message Date
opencode 41144b9a3b CPU stack: do not reserve a core by default
The stand's log showed core ids=[1] and 'Reducing Torch threads from 2 to 1'
because the container only sees ~2 cores: VLLM_CPU_NUM_OF_RESERVED_CPU=1 left
a single OpenMP thread for inference. Default is now 0 (16 vs 15 threads on a
24 vCPU host, no latency change); document setting it back to 1 for large hosts
and how to check nproc / core ids= after a deploy.
2026-10-07 08:52:16 +07:00
opencode ff6b9f8b25 Speed up CPU stack startup, fix empty OMP_NUM_THREADS
The CPU stand reached 'Application startup complete' but needed ~11 minutes:
the warmup/profiling run took 604 s and the model was recompiled twice.

- drop OMP_NUM_THREADS: it resolved to an empty string, which makes libgomp
  warn and vLLM bind a single thread
- default to --enforce-eager (ENFORCE_EAGER=1): inductor compilation is minutes
  of work on CPU, eager is measurably no slower (0.18 s vs 0.18 s per ~30 word
  text) and engine init drops to 0.00 s
- lower CPU defaults to MAX_MODEL_LEN_CPU=2048 with
  MAX_NUM_BATCHED_TOKENS_CPU=2048 (batched tokens must be >= max model len),
  which is plenty for indexing
- README: what each noisy log line means and that DTYPE_CPU=float32 buys
  nothing but memory
2026-10-07 08:41:50 +07:00
opencode 4dc15869d1 Add CPU stack for hosts without a GPU
docker-compose.cpu.yml: same self-contained plugin heredoc and the same
/pooling API, but on vllm/vllm-openai-cpu:v0.30.0-x86_64 (9 GB vs 31 GB),
without the nvidia device reservation, with fp32 head + bfloat16 dtype
(fp16 is unstable on CPU) and the seccomp/SYS_NICE settings vLLM recommends.

Measured on 24 vCPU: 0.24 s for a ~30 word text, 0.92 s for a batch of 4,
versus 0.030/0.011 s on the GPU stand.
2026-10-05 09:16:55 +07:00