Plugin server arguments
Runtime plugins register typed launch options independently of Hugging Face (HF) model configuration. ServerArgs.extra_server_args is a flat dictionary of JSON scalars. Field ownership is internal to the registry: two plugins cannot register the same field, and unknown fields or invalid values fail before numerical policy resolution. The CLI accepts plugin options only through --extra-server-args; Python callers supply the same flat dictionary. Both entry points share validation and preserve explicit values.
Define the argument schema
register_extra_server_args(namespace, config_type, *, validate) registers a frozen dataclass of scalar types, homogeneous Literal choices, and optional None. Model-derived fields do not belong in this schema. A field tagged with metadata={"native_server_arg": True} binds the matching native ServerArgs value; it is excluded from plugin JSON and public field ownership. Registration does not create individual plugin flags, and JSON has no namespace wrapper. When provided, the validator checks native argument interactions without initializing execution components. Registration participates in the loader's rollback.
Registration lifecycle
Plugins register their schema and numerical policy from their ordinary register() entry point, before parsing. This is the same lifecycle as model profile and reporter registration; execution implementations are resolved when needed. See plugin registration for ownership, lazy references, and activation rollback.
Launch-owned argument lifetime
Numerical-policy resolution works on provisional launch inputs. Once ServerArgs initialization finishes, get_extra_server_args publishes one immutable object per plugin and launch. Target, draft, and their components share that object. A later lookup fails explicitly if the object's input values change after publication. A different launch requires a new ServerArgs. The cache belongs to ServerArgs, not a process-global registry, and is dropped when copying or pickling the launch. Workers rebuild their own shared object from plain values.
Model construction
A model profile can return those shared arguments from create_runtime_config(model_config, server_args). The result is held in ModelConfig.runtime_config and passed explicitly to the model constructor. An optional create_model_kwargs(model_config, load_config) supplies other constructor inputs from the actual model and loading configurations. It cannot replace keywords already supplied by the host. This gives checkpoint loaders and workspace owners their own inputs without storing model state in shared arguments or HF metadata. Models without these hooks keep the existing contract.
Models and components own resolved arithmetic choices, buffers, graph state, and weight-update lifecycles. Their initialization must not mutate shared arguments. Numerical policy continues to constrain capability planning and execution.
Cache producer identity
Plugin execution options enter the cache producer identity. Runtime-config models include an empty options marker even when no values were supplied, isolating their new launch-owned policy from older checkpoint-owned policy. This preserves cache correctness across the configuration migration without changing namespaces for unaffected deployments.