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.
model_versionStringTag name
Branch name
Commit hash
The version of the model from Hugging Face.
tokenizerStringDefault: NoneThe name of the tokenizer, usually the same as the model name.
use_gpuBooleanTrue (default)
Specifies if GPU should be used.
taskStringtext-classification (default)
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.
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.
batch_sizeIntegerDefault: 16The number of queries you want to process at one time.
progress_barBooleanTrue (default)
Shows the progress bar when processing queries.
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.
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.

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.