[CONTRIBUTION]: Enable NGC model sources through ModelExpress
Type of Change
New feature
Problem Statement
I contributed NGC model download support to ModelExpress in ai-dynamo/modelexpress#232.
I’d like to expose that capability through Dynamo’s model acquisition and backend startup paths. These paths currently assume Hugging Face model sources in places, and vLLM/SGLang cannot directly resolve an ngc:// URI when loading model configuration and tokenizer files.
The goal of this contribution is to let users provide an NGC model URI to Dynamo and have it acquire the model through ModelExpress before initializing the inference engine.
Proposed Solution
- Add NGC provider routing and cache lookup to Dynamo’s shared model-fetching layer.
- Reuse complete cached NGC models without downloading them again.
- Integrate NGC resolution into vLLM and SGLang worker startup, before constructing engine configurations.
- Apply this resolution when ModelExpress weight loaders are enabled as well.
- Add focused regression tests for provider routing, cache handling, and backend argument processing.
Backend scope
NGC provider routing, downloading, and cache handling are shared capabilities that any backend using Dynamo’s model-fetching API can reuse.
This contribution wires that capability into the standard vLLM and SGLang worker startup paths. It does not establish NGC startup support for every backend or specialized entry point.
TensorRT-LLM and other entry points require separate integration and validation to ensure they pass the resolved local directory to their engines. They would reuse the shared NGC fetching implementation.
Existing Hugging Face P2P behavior is preserved
The new full-download and local-path rewrite behavior applies only to ngc:// sources.
For Hugging Face models:
- vLLM’s
mxandmodelexpressloaders continue to skip Dynamo’s full weight prefetch. - SGLang’s
remote_instanceloader with themodelexpressbackend continues to skip full weight prefetch. - Dynamo preserves the HF source identifier rather than replacing it with a local cache path.
- Dynamo’s model registration continues to request metadata only when using ModelExpress.
This preserves the existing HF acquisition and peer-identification paths. The NGC limitations below do not apply to HF sources.
NGC P2P caveat
This contribution covers NGC acquisition and backend startup; it does not provide optimized NGC P2P cold starts.
NGC weights are downloaded or found in the local cache before the ModelExpress weight loader runs. Consequently, P2P cannot avoid that initial download on a cold-cache worker.
P2P is not explicitly disabled: ModelExpress may still attempt peer loading. However, peer identity currently depends on the resolved local model path and other compatibility fields, so different cache paths can prevent peer matching.
A follow-up would need:
- Metadata-only preparation before engine initialization.
- A stable NGC identity independent of the local cache location.
- An NGC-aware download fallback after a peer miss or transfer failure.
- End-to-end validation with two workers.
Estimated PR Size
L (201-500 lines)
Files/Components Affected
- Rust model acquisition/cache handling:
lib/llm/src/hub.rs - Model acquisition comments:
lib/llm/src/local_model.rs - Shared model-fetch helper:
components/src/dynamo/common/model_fetch.py - vLLM argument parsing, startup, and source-path handling:
components/src/dynamo/vllm/args.pycomponents/src/dynamo/vllm/main.pycomponents/src/dynamo/vllm/worker_factory.py
- SGLang argument parsing and NGC resolution:
components/src/dynamo/sglang/args.py - Corresponding Rust, common Python, vLLM, and SGLang tests
Source: ai-dynamo/dynamo