pydantic-settings with some custom functionality for configuring runs. We support the following sources, in this order of precedence:
-
Command-line arguments: Pass (nested) arguments as
--key.subkey valueto the script. For example, to set the model name, set--model.name <model-name> -
Config files: You can pass TOML config files using the
@prefix. For example, to set a config, runuv run inference @ path/to/config.toml. (You have to leave a space between the@and the config file) -
Environment variables: You can set environment variables to override the config values. All environment variables must be prefixed with
PRIME_and use the__delimiter to nest the keys. For example, to set the model name you can runexport PRIME_MODEL__NAME=Qwen/Qwen3-0.6B. - Defaults: For almost all config arguments, we have a default value which will be used if no other source is provided.
--model.name Qwen/Qwen3-32B will take precendence and the script will use Qwen/Qwen3-32B as the model name. If the CLI argument wasn’t set, then the second config file would take precedence and the script would use Qwen/Qwen-14B as the model name. If the second config file wasn’t set, then the first config file would take precedence and the script would use Qwen/Qwen3-8B as the model name. Finally, if the first config file wasn’t set, then the environment variable would take precedence and the script would use Qwen/Qwen-4B as the model name. If the environment variable wasn’t set, then the default value would be used and the script would use Qwen/Qwen3-0.6B as the model name.