• Graham King's avatar
    feat(dynamo-run): Allow setting context-length (#1157) · 6d5da821
    Graham King authored
    Llama 4 has a very large context length (aka n_ctx, model_max_length, max_model_len), and vllm won't start unless it can allocate enough KV cache for the entire context.
    
    Allow passing `--context-length <N>` to `dynamo-run` to limit it so long-context models will fit.
    
    Future todo:
    - Restrict every request's `max_tokens` to below the context length. Our pre-processor should do this by setting stop_conditions.max_tokens. mistralrs engine wrapper must do it itself because it does not use the pre-processor.
    - mistralrs and llamacpp currently have a hard-coded max context length if one is not provided on the command line. Change those to be the model's built-in max, read from the GGUF or tokenizer_config.json.
    6d5da821
flags.rs 7.88 KB