Expand description
Server configuration loaded from environment variables at startup.
All settings are read once via Config::from_env and then immutable
for the server’s lifetime. See each field’s doc comment for the
corresponding environment variable name and default value.
Structs§
- Config
- Runtime configuration loaded from environment variables.
Enums§
- EpSelection
- ONNX Runtime execution provider selection.
- Model
Variant - ONNX model variant to load.
Constants§
- DEFAULT_
GPU_ 🔒VRAM_ BUDGET_ BYTES - VRAM workspace budget used for GPU EPs when
BGE_M3_GPU_VRAM_BUDGET_BYTESis unset. - DEFAULT_
TRT_ 🔒WARMUP_ SHAPES - Default TRT warmup shapes: a 2D
{1, 2, 4, 8, 16, 32} × {128, 512, 2048, 8192}grid composed in batch-major order. - MODEL_
MAX_ SEQ - Maximum sequence length supported by the model architecture.
BGE-M3’s positional embedding table extends to 8192; this is the hard upper
bound used to validate
BGE_M3_MAX_SEQ_LENGTH. - VRAM_
WARN_ 🔒THRESHOLD_ BYTES - Advisory upper-bound for VRAM byte values (128 GiB).
Functions§
- parse_
trt_ 🔒warmup_ shapes - Parses
BGE_M3_TRT_WARMUP_SHAPESfrom its raw env-var value. - resolve_
cost_ 🔒model_ override - Resolves an optional
CostModelfrom env vars that explicitly override auto-tuning. - warn_
if_ 🔒small_ batch_ coverage_ missing - Emits a startup
WARNwhen the resolved warmup shape grid does not cover the small-batch shapes that real router traffic routinely bin-packs to.