TensorRTProvider#
- class openstef_foundation_models.inference.TensorRTProvider(*, kind: Literal['tensorrt'] = 'tensorrt', device_id: int = 0, fp16: bool = True, engine_cache_dir: Path | None = None)[source]#
Bases:
BaseConfigThe TensorRT execution provider (NVIDIA, ahead-of-time engine build).
FP16 with a persistent engine cache is the recommended production path on NVIDIA hardware: the first run pays the engine-build cost, subsequent runs load the cached engine.
- engine_cache_dir: Path | None#
Directory to persist built TensorRT engines. When set, engine caching is enabled.