nemo_export.vllm.model_converters
#
Module Contents#
Classes#
Abstract class that defines the interface for a converter that implements model-specific conversion functions for deploying NeMo checkpoints on vLLM. |
|
Functions#
Establishes a mapping from short model type to a class that converts the model from Nemo format to a vLLM compatible format. |
|
Returns an instance of the the model conversion class for the given model type, or None. |
Data#
API#
- class nemo_export.vllm.model_converters.ModelConverter(model_type: str)[source]#
Bases:
abc.ABC
Abstract class that defines the interface for a converter that implements model-specific conversion functions for deploying NeMo checkpoints on vLLM.
Initialization
- abstractmethod get_architecture() Optional[str] [source]#
Returns the HF architecture name for the current model, such as āLlamaForCausalLMā.
- convert_config(nemo_model_config: dict, hf_config: dict) None [source]#
Implements any custom HF configuration adjustments in the āhf_configā dict that are necessary for this model after the common translation takes place in NemoModelConfigās constructor.
- nemo_export.vllm.model_converters._MODEL_CONVERTERS = None#
- nemo_export.vllm.model_converters.register_model_converter(model_type, cls)[source]#
Establishes a mapping from short model type to a class that converts the model from Nemo format to a vLLM compatible format.
- nemo_export.vllm.model_converters.get_model_converter(
- model_type,
Returns an instance of the the model conversion class for the given model type, or None.