Check the parameters you can specify for QueryClassifier.
YAML Init Parameters
These are the parameters you can specify in pipeline YAML:
Parameter | Type | Possible Values | Description |
---|---|---|---|
model_name_or_path | String | Default: shahrukhx01/bert-mini-finetune-question-detection | Specifies the model you want to use. You can either type a path to the model stored on your computer or the name of a public model from Hugging Face. The default model was trained on the mini BERT architecture and can distinguish between natural language queries and questions. Mandatory. |
model_version | String | Tag name Branch name Commit hash | The version of the model from Hugging Face. Optional. |
tokenizer | String | Default: None | The name of the tokenizer, usually the same as the model name. Optional. |
use_gpu | Boolean | True (default)False | Specifies if GPU should be used. Mandatory. |
task | String | text-classification (default)zero-shot-classification | Specifies the type of classification the node should perform.text-classification - Choose this task if you have a model trained with a defined list of labels.zero-shot-classification - Choose if you want to define labels at runtime.Mandatory. |
labels | A list of strings | Default: None | If you choose text-classification as task and provide an ordered label, the first label corresponds to output_1, the second label corresponds to output_2, and so on. The labels must match the model labels; only their order can differ.If you selected zero-shot-classification as task , these are the candidate labels.Mandatory. |
batch_size | Integer | Default: 16 | The number of queries you want to process at one time. Mandatory. |
progress_bar | Boolean | True (default)False | Shows the progress bar when processing queries. Mandatory. |
use_auth_token | String or Boolean | Default: None | Specifies the API token used to download private models from Hugging Face. If you set it to True , it uses the token generated when running transformers-cli login .Optional. |
devices | String or torch.device | Default: None | A list of torch devices such as cuda, cpu, mps, to limit inference to specific devices. Example: [torch.device( cuda:0), "mps, "cuda:1" If you set use_gpu to False , this parameter is not used and a single cpu device is used for inference.Optional. |
REST API Runtime Parameters
There are no runtime parameters you can pass to this node when making a request to the Search REST API endpoint.