QueryClassifier Parameters

Check the parameters you can specify for QueryClassifier.

YAML Init Parameters

These are the parameters you can specify in pipeline YAML:

ParameterTypePossible ValuesDescription
model_name_or_pathStringDefault: shahrukhx01/bert-mini-finetune-question-detectionSpecifies 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_versionStringTag name
Branch name
Commit hash
The version of the model from Hugging Face.
Optional.
tokenizerStringDefault: NoneThe name of the tokenizer, usually the same as the model name.
Optional.
use_gpuBooleanTrue (default)
False
Specifies if GPU should be used.
Mandatory.
taskStringtext-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.
labelsA list of stringsDefault: NoneIf 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_sizeIntegerDefault: 16The number of queries you want to process at one time.
Mandatory.
progress_barBooleanTrue (default)
False
Shows the progress bar when processing queries.
Mandatory.
use_auth_tokenString or BooleanDefault: NoneSpecifies 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.
devicesString or torch.deviceDefault: NoneA 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.