bridge.models.hf_pretrained.token_classification#

Module Contents#

Classes#

PreTrainedTokenClassification

Lazy Hugging Face token-classification model wrapper with VLM artifacts.

Data#

API#

bridge.models.hf_pretrained.token_classification.TokenClassificationType#

‘TypeVar(…)’

class bridge.models.hf_pretrained.token_classification.PreTrainedTokenClassification#

Bases: megatron.bridge.models.hf_pretrained.masked_lm.PreTrainedMaskedLM[bridge.models.hf_pretrained.token_classification.TokenClassificationType], typing.Generic[bridge.models.hf_pretrained.token_classification.TokenClassificationType]

Lazy Hugging Face token-classification model wrapper with VLM artifacts.

OPTIONAL_ARTIFACTS#

[‘processor’, ‘image_processor’]

_load_model() bridge.models.hf_pretrained.token_classification.TokenClassificationType#
_load_processor() transformers.ProcessorMixin | None#

Load the optional multimodal processor.

_load_image_processor() transformers.image_processing_utils.BaseImageProcessor | None#

Load the optional image processor, preferring the main processor.

property processor: transformers.ProcessorMixin | None#

Lazy-load and return the optional multimodal processor.

property image_processor: transformers.image_processing_utils.BaseImageProcessor | None#

Lazy-load and return the optional image processor.