Skip to content

Module redlite.model.hf_model

Classes

HFModel

class HFModel(
    hf_name: str,
    task='text-generation',
    remove_thinking_trace=False,
    **pipeline_params
)

Model loaded from HuggingFace hub.

  • hf_name (str): name of the model on HuggingFace hub.
  • task (str): Pipeline task. Default is text-generation. If using multimodal models, you may need to change it to image-text-to-text. Refer to model documentation on HuggingFace.
  • pipeline_params (dict[str,Any]): Other pipeline params, will be passed as-is to the HF pipeline constructor.

Ancestors (in MRO)

  • redlite._core.NamedModel