Hugging Face

RIME now support an API that downloads Huggingface models by providing the Huggingface Model’s URI. Currently, RIME supports Huggingface NLP Classification Models.

Huggingface Classification Model

{
    "model_info": {
        # In order to specify a Huggingface classification model you need to specify a `model_info` with `"type": "huggingface_classification"`
        "type": "huggingface_classification",      (REQUIRED)
        # Specify the Huggingface Model's URI.
        "model_uri": "path",                      (REQUIRED)
        "tokenizer_uri": null,
        "model_max_length": null,

    },
    ...
}

Arguments

  • model_uri: string, required

    The pretrained model name or path used to load a pretrained Huggingface model from disk or from the model hub.

  • tokenizer_uri: string or null, default = null

    The pretrained tokenizer name or path used to load a the tokenizer from disk or from the model hub. If null, RIME defaults to loading from the provided model_uri.

  • model_max_length: int or null, default = null

    The maximum sequence length (in tokens) supported by the model. If null, RIME infers the maximum length from the pretrained model and tokenizer.