class_docstr: spaCy pipeline component that provides access to a transformer model from
  the Huggingface transformers library. Usually you will connect subsequent
  components to the shared transformer using the TransformerListener layer.
  This works similarly to spaCy's Tok2Vec component and Tok2VecListener
  sublayer.
  
  The activations from the transformer are saved in the doc._.trf_data extension
  attribute. You can also provide a callback to set additional annotations.
  
  vocab (Vocab): The Vocab object for the pipeline.
  model (Model[List[Doc], FullTransformerBatch]): A thinc Model object wrapping
      the transformer. Usually you will want to use the TransformerModel
      layer for this.
  set_extra_annotations (Callable[[List[Doc], FullTransformerBatch], None]): A
      callback to set additional information onto the batch of `Doc` objects.
      The doc._.trf_data attribute is set prior to calling the callback.
      By default, no additional annotations are set.
docstr: Apply the pipe to a stream of documents. This usually happens under
  the hood when the nlp object is called on a text and all components are
  applied to the Doc.
  
  stream (Iterable[Doc]): A stream of documents.
  batch_size (int): The number of documents to buffer.
  YIELDS (Doc): Processed documents in order.
  
  DOCS: https://spacy.io/api/transformer#pipe
docstr_tok: ["Apply","the","pipe","to","a","stream","of","documents",".","This","usually","happens","under","the","hood","when","the","nlp","object","is","called","on","a","text","and","all","components","are","applied","to","the","Doc",".","stream","(","Iterable","[","Doc","]",")",":","A","stream","of","documents",".","batch_size","(","int",")",":","The","number","of","documents","to","buffer",".","YIELDS","(","Doc",")",":","Processed","documents","in","order",".","DOCS",":","https",":","\/\/spacy.io\/api\/transformer","#","pipe"]
code: def pipe(
      self, stream: Iterable[Doc], *, batch_size: int = 128
  ) -> Iterator[Doc]:
      """Apply the pipe to a stream of documents. This usually happens under
      the hood when the nlp object is called on a text and all components are
      applied to the Doc.
  
      stream (Iterable[Doc]): A stream of documents.
      batch_size (int): The number of documents to buffer.
      YIELDS (Doc): Processed documents in order.
  
      DOCS: https://spacy.io/api/transformer#pipe
      """
      install_extensions()
      for outer_batch in minibatch(stream, batch_size):
          outer_batch = list(outer_batch)
          for indices in batch_by_length(
              outer_batch, self.cfg["max_batch_items"]
          ):
              subbatch = [outer_batch[i] for i in indices]
              self.set_annotations(subbatch, self.predict(subbatch))
          yield from outer_batch
  
imports: from typing import List, Callable, Iterable, Iterator, Optional, Dict, Union
  import warnings
  from spacy.language import Language
  from spacy.pipeline.trainable_pipe import TrainablePipe
  from spacy.pipeline.pipe import deserialize_config
  from spacy.tokens import Doc
  from spacy.vocab import Vocab
  from spacy.training import Example, validate_examples
  from spacy import util, Errors
  from spacy.util import minibatch
  from thinc.api import Model, Config, set_dropout_rate, Optimizer
  import srsly
  from pathlib import Path
  from .layers.transformer_model import huggingface_from_pretrained
  from .util import batch_by_length
  from .annotation_setters import null_annotation_setter
  from .data_classes import FullTransformerBatch, TransformerData
  from .layers import TransformerListener
label_desc: Use image node_id 8 for calling the Transformer obj's underlying member method code with example usage: obj.pipe(stream) without return types