Pipelines¶
The pipelines are a great and easy way to use models for inference. These pipelines are objects that abstract most of the complex code from the library, offering a simple API dedicated to several tasks, including Named Entity Recognition, Masked Language Modeling, Sentiment Analysis, Feature Extraction and Question Answering. See the task summary for examples of use.
There are two categories of pipeline abstractions to be aware about:
The
pipeline()
which is the most powerful object encapsulating all other pipelines.The other task-specific pipelines:
ConversationalPipeline
FeatureExtractionPipeline
FillMaskPipeline
QuestionAnsweringPipeline
SummarizationPipeline
TextClassificationPipeline
TextGenerationPipeline
TokenClassificationPipeline
TranslationPipeline
ZeroShotClassificationPipeline
Text2TextGenerationPipeline
TableQuestionAnsweringPipeline
The pipeline abstraction¶
The pipeline abstraction is a wrapper around all the other available pipelines. It is instantiated as any other pipeline but requires an additional argument which is the task.
The task specific pipelines¶
ConversationalPipeline¶
FeatureExtractionPipeline¶
FillMaskPipeline¶
NerPipeline¶
See TokenClassificationPipeline
for all details.