###
`transformers.pipeline(task: 'str | None' = None, model: 'str | PreTrainedModel | None' = None, config: 'str | PreTrainedConfig | None' = None, tokenizer: 'str | PreTrainedTokenizer | PreTrainedTokenizerFast | None' = None, feature_extractor: 'str | PreTrainedFeatureExtractor | None' = None, image_processor: 'str | BaseImageProcessor | None' = None, processor: 'str | ProcessorMixin | None' = None, revision: 'str | None' = None, use_fast: 'bool' = True, token: 'str | bool | None' = None, device: 'int | str | torch.device | None' = None, device_map: 'str | dict[str, int | str] | None' = None, dtype: 'str | torch.dtype | None' = 'auto', trust_remote_code: 'bool | None' = None, model_kwargs: 'dict[str, Any] | None' = None, pipeline_class: 'Any | None' = None, **kwargs: 'Any') -> 'Pipeline'`

Utility factory method to build a [`Pipeline`].

A pipeline consists of:

    - One or more components for pre-processing model inputs, such as a [tokenizer](tokenizer),
    [image_processor](image_processor), [feature_extractor](feature_extractor), or [processor](processors).
    - A [model](model) that generates predictions from the inputs.
    - Optional post-processing steps to refine the model's output, which can also be handled by processors.

<Tip>
While there are such optional arguments as `tokenizer`, `feature_extractor`, `image_processor`, and `processor`,
they shouldn't be specified all at once. If these components are not provided, `pipeline` will try to load
required ones automatically. In case you want to provide these components explicitly, please refer to a
specific pipeline in order to get more details regarding what components are required.
</Tip>

Args:
task (`str`):
The task defining which pipeline will be returned. Currently accepted tasks are:

        - `"audio-classification"`: will return a [`AudioClassificationPipeline`].
        - `"automatic-speech-recognition"`: will return a [`AutomaticSpeechRecognitionPipeline`].
        - `"depth-estimation"`: will return a [`DepthEstimationPipeline`].
        - `"document-question-answering"`: will return a [`DocumentQuestionAnsweringPipeline`].
        - `"feature-extraction"`: will return a [`FeatureExtractionPipeline`].
        - `"fill-mask"`: will return a [`FillMaskPipeline`]:.
        - `"image-classification"`: will return a [`ImageClassificationPipeline`].
        - `"image-feature-extraction"`: will return an [`ImageFeatureExtractionPipeline`].
        - `"image-segmentation"`: will return a [`ImageSegmentationPipeline`].
        - `"image-text-to-text"`: will return a [`ImageTextToTextPipeline`].
        - `"keypoint-matching"`: will return a [`KeypointMatchingPipeline`].
        - `"mask-generation"`: will return a [`MaskGenerationPipeline`].
        - `"object-detection"`: will return a [`ObjectDetectionPipeline`].
        - `"table-question-answering"`: will return a [`TableQuestionAnsweringPipeline`].
        - `"text-classification"` (alias `"sentiment-analysis"` available): will return a
          [`TextClassificationPipeline`].
        - `"text-generation"`: will return a [`TextGenerationPipeline`]:.
        - `"text-to-audio"` (alias `"text-to-speech"` available): will return a [`TextToAudioPipeline`]:.
        - `"token-classification"` (alias `"ner"` available): will return a [`TokenClassificationPipeline`].
        - `"video-classification"`: will return a [`VideoClassificationPipeline`].
        - `"zero-shot-classification"`: will return a [`ZeroShotClassificationPipeline`].
        - `"zero-shot-image-classification"`: will return a [`ZeroShotImageClassificationPipeline`].
        - `"zero-shot-audio-classification"`: will return a [`ZeroShotAudioClassificationPipeline`].
        - `"zero-shot-object-detection"`: will return a [`ZeroShotObjectDetectionPipeline`].

    model (`str` or [`PreTrainedModel`], *optional*):
        The model that will be used by the pipeline to make predictions. This can be a model identifier or an
        actual instance of a pretrained model inheriting from [`PreTrainedModel`].

        If not provided, the default for the `task` will be loaded.
    config (`str` or [`PreTrainedConfig`], *optional*):
        The configuration that will be used by the pipeline to instantiate the model. This can be a model
        identifier or an actual pretrained model configuration inheriting from [`PreTrainedConfig`].

        If not provided, the default configuration file for the requested model will be used. That means that if
        `model` is given, its default configuration will be used. However, if `model` is not supplied, this
        `task`'s default model's config is used instead.
    tokenizer (`str` or [`PreTrainedTokenizer`], *optional*):
        The tokenizer that will be used by the pipeline to encode data for the model. This can be a model
        identifier or an actual pretrained tokenizer inheriting from [`PreTrainedTokenizer`].

        If not provided, the default tokenizer for the given `model` will be loaded (if it is a string). If `model`
        is not specified or not a string, then the default tokenizer for `config` is loaded (if it is a string).
        However, if `config` is also not given or not a string, then the default tokenizer for the given `task`
        will be loaded.
    feature_extractor (`str` or [`PreTrainedFeatureExtractor`], *optional*):
        The feature extractor that will be used by the pipeline to encode data for the model. This can be a model
        identifier or an actual pretrained feature extractor inheriting from [`PreTrainedFeatureExtractor`].

        Feature extractors are used for non-NLP models, such as Speech or Vision models as well as multi-modal
        models. Multi-modal models will also require a tokenizer to be passed.

        If not provided, the default feature extractor for the given `model` will be loaded (if it is a string). If
        `model` is not specified or not a string, then the default feature extractor for `config` is loaded (if it
        is a string). However, if `config` is also not given or not a string, then the default feature extractor
        for the given `task` will be loaded.
    image_processor (`str` or [`BaseImageProcessor`], *optional*):
        The image processor that will be used by the pipeline to preprocess images for the model. This can be a
        model identifier or an actual image processor inheriting from [`BaseImageProcessor`].

        Image processors are used for Vision models and multi-modal models that require image inputs. Multi-modal
        models will also require a tokenizer to be passed.

        If not provided, the default image processor for the given `model` will be loaded (if it is a string). If
        `model` is not specified or not a string, then the default image processor for `config` is loaded (if it is
        a string).
    processor (`str` or [`ProcessorMixin`], *optional*):
        The processor that will be used by the pipeline to preprocess data for the model. This can be a model
        identifier or an actual processor inheriting from [`ProcessorMixin`].

        Processors are used for multi-modal models that require multi-modal inputs, for example, a model that
        requires both text and image inputs.

        If not provided, the default processor for the given `model` will be loaded (if it is a string). If `model`
        is not specified or not a string, then the default processor for `config` is loaded (if it is a string).
    revision (`str`, *optional*, defaults to `"main"`):
        When passing a task name or a string model identifier: The specific model version to use. It can be a
        branch name, a tag name, or a commit id, since we use a git-based system for storing models and other
        artifacts on huggingface.co, so `revision` can be any identifier allowed by git.
    use_fast (`bool`, *optional*, defaults to `True`):
        Whether or not to use a Fast tokenizer if possible (a [`PreTrainedTokenizerFast`]).
    token (`str` or *bool*, *optional*):
        The token to use as HTTP bearer authorization for remote files. If `True`, will use the token generated
        when running `hf auth login`.
    device (`int` or `str` or `torch.device`):
        Defines the device (*e.g.*, `"cpu"`, `"cuda:1"`, `"mps"`, or a GPU ordinal rank like `1`) on which this
        pipeline will be allocated.
    device_map (`str` or `dict[str, Union[int, str, torch.device]`, *optional*):
        Sent directly as `model_kwargs` (just a simpler shortcut). When `accelerate` library is present, set
        `device_map="auto"` to compute the most optimized `device_map` automatically (see
        [here](https://huggingface.co/docs/accelerate/main/en/package_reference/big_modeling#accelerate.cpu_offload)
        for more information).

        <Tip warning={true}>

        Do not use `device_map` AND `device` at the same time as they will conflict

        </Tip>

    dtype (`str` or `torch.dtype`, *optional*):
        Sent directly as `model_kwargs` (just a simpler shortcut) to use the available precision for this model
        (`torch.float16`, `torch.bfloat16`, ... or `"auto"`).
    trust_remote_code (`bool`, *optional*, defaults to `False`):
        Whether or not to allow for custom code defined on the Hub in their own modeling, configuration,
        tokenization or even pipeline files. This option should only be set to `True` for repositories you trust
        and in which you have read the code, as it will execute code present on the Hub on your local machine.
    model_kwargs (`dict[str, Any]`, *optional*):
        Additional dictionary of keyword arguments passed along to the model's `from_pretrained(...,
        **model_kwargs)` function.
    kwargs (`dict[str, Any]`, *optional*):
        Additional keyword arguments passed along to the specific pipeline init (see the documentation for the
        corresponding pipeline class for possible values).

Returns:
[`Pipeline`]: A suitable pipeline for the task.

Examples:

```python
>>> from transformers import pipeline, AutoModelForTokenClassification, AutoTokenizer

>>> # Sentiment analysis pipeline
>>> analyzer = pipeline("sentiment-analysis")

>>> # Question answering pipeline, specifying the checkpoint identifier
>>> oracle = pipeline(
...     "question-answering", model="distilbert/distilbert-base-cased-distilled-squad", tokenizer="google-bert/bert-base-cased"
... )

>>> # Named entity recognition pipeline, passing in a specific model and tokenizer
>>> model = AutoModelForTokenClassification.from_pretrained("dbmdz/bert-large-cased-finetuned-conll03-english")
>>> tokenizer = AutoTokenizer.from_pretrained("google-bert/bert-base-cased")
>>> recognizer = pipeline("ner", model=model, tokenizer=tokenizer)
```

---

### `transformers.AutoModel(*args, **kwargs) -> None`

This is a generic model class that will be instantiated as one of the base model classes of the library when created
with the [`~AutoModel.from_pretrained`] class method or the [`~AutoModel.from_config`] class
method.

This class cannot be instantiated directly using `__init__()` (throws an error).

---

### `transformers.AutoTokenizer()`

This is a generic tokenizer class that will be instantiated as one of the tokenizer classes of the library when
created with the [`AutoTokenizer.from_pretrained`] class method.

This class cannot be instantiated directly using `__init__()` (throws an error).

---

###
`transformers.TrainingArguments(output_dir: str | None = None, per_device_train_batch_size: int = 8, num_train_epochs: float = 3.0, max_steps: int = -1, learning_rate: float = 5e-05, lr_scheduler_type: transformers.trainer_utils.SchedulerType | str = 'linear', lr_scheduler_kwargs: dict | str | None = None, warmup_steps: float = 0, optim: transformers.training_args.OptimizerNames | str = 'adamw_torch_fused', optim_args: str | None = None, weight_decay: float = 0.0, adam_beta1: float = 0.9, adam_beta2: float = 0.999, adam_epsilon: float = 1e-08, optim_target_modules: None | str | list[str] = None, gradient_accumulation_steps: int = 1, average_tokens_across_devices: bool = True, max_grad_norm: float = 1.0, label_smoothing_factor: float = 0.0, bf16: bool = False, fp16: bool = False, bf16_full_eval: bool = False, fp16_full_eval: bool = False, tf32: bool | None = None, gradient_checkpointing: bool = False, gradient_checkpointing_kwargs: dict[str, typing.Any] | str | None = None, torch_compile: bool = False, torch_compile_backend: str | None = None, torch_compile_mode: str | None = None, use_liger_kernel: bool = False, liger_kernel_config: dict[str, bool] | None = None, use_cache: bool = False, neftune_noise_alpha: float | None = None, torch_empty_cache_steps: int | None = None, auto_find_batch_size: bool = False, logging_strategy: transformers.trainer_utils.IntervalStrategy | str = 'steps', logging_steps: float = 500, logging_first_step: bool = False, log_on_each_node: bool = True, logging_nan_inf_filter: bool = True, include_num_input_tokens_seen: str | bool = 'no', log_level: str = 'passive', log_level_replica: str = 'warning', disable_tqdm: bool | None = None, report_to: None | str | list[str] = 'none', run_name: str | None = None, project: str = 'huggingface', trackio_space_id: str | None = 'trackio', eval_strategy: transformers.trainer_utils.IntervalStrategy | str = 'no', eval_steps: float | None = None, eval_delay: float = 0, per_device_eval_batch_size: int = 8, prediction_loss_only: bool = False, eval_on_start: bool = False, eval_do_concat_batches: bool = True, eval_use_gather_object: bool = False, eval_accumulation_steps: int | None = None, include_for_metrics: list[str] = <factory>, batch_eval_metrics: bool = False, save_only_model: bool = False, save_strategy: transformers.trainer_utils.SaveStrategy | str = 'steps', save_steps: float = 500, save_on_each_node: bool = False, save_total_limit: int | None = None, enable_jit_checkpoint: bool = False, push_to_hub: bool = False, hub_token: str | None = None, hub_private_repo: bool | None = None, hub_model_id: str | None = None, hub_strategy: transformers.trainer_utils.HubStrategy | str = 'every_save', hub_always_push: bool = False, hub_revision: str | None = None, load_best_model_at_end: bool = False, metric_for_best_model: str | None = None, greater_is_better: bool | None = None, ignore_data_skip: bool = False, restore_callback_states_from_checkpoint: bool = False, full_determinism: bool = False, seed: int = 42, data_seed: int | None = None, use_cpu: bool = False, accelerator_config: dict | str | None = None, parallelism_config: accelerate.parallelism_config.ParallelismConfig | None = None, dataloader_drop_last: bool = False, dataloader_num_workers: int = 0, dataloader_pin_memory: bool = True, dataloader_persistent_workers: bool = False, dataloader_prefetch_factor: int | None = None, remove_unused_columns: bool = True, label_names: list[str] | None = None, train_sampling_strategy: str = 'random', length_column_name: str = 'length', ddp_find_unused_parameters: bool | None = None, ddp_bucket_cap_mb: int | None = None, ddp_broadcast_buffers: bool | None = None, ddp_backend: str | None = None, ddp_timeout: int = 1800, fsdp: list[transformers.trainer_utils.FSDPOption] | str | None = None, fsdp_config: dict[str, typing.Any] | str | None = None, deepspeed: dict | str | None = None, debug: str | list[transformers.debug_utils.DebugOption] = '', skip_memory_metrics: bool = True, do_train: bool = False, do_eval: bool = False, do_predict: bool = False, resume_from_checkpoint: str | None = None, warmup_ratio: float | None = None, logging_dir: str | None = None, local_rank: int = -1) -> None`

Error fetching doc for transformers.TrainingArguments: 'charmap' codec can't encode character '\u03b5' in position 6693:
character maps to <undefined>

###
`transformers.Trainer(model: transformers.modeling_utils.PreTrainedModel | torch.nn.modules.module.Module | None = None, args: transformers.training_args.TrainingArguments | None = None, data_collator: collections.abc.Callable[[list[typing.Any]], dict[str, typing.Any]] | None = None, train_dataset: 'Dataset | IterableDataset | datasets.Dataset | None' = None, eval_dataset: 'Dataset | dict[str, Dataset] | datasets.Dataset | None' = None, processing_class: transformers.tokenization_utils_base.PreTrainedTokenizerBase | transformers.image_processing_utils.BaseImageProcessor | transformers.feature_extraction_utils.FeatureExtractionMixin | transformers.processing_utils.ProcessorMixin | None = None, model_init: collections.abc.Callable[..., transformers.modeling_utils.PreTrainedModel] | None = None, compute_loss_func: collections.abc.Callable | None = None, compute_metrics: collections.abc.Callable[[transformers.trainer_utils.EvalPrediction], dict] | None = None, callbacks: list[transformers.trainer_callback.TrainerCallback] | None = None, optimizers: tuple[torch.optim.optimizer.Optimizer | None, torch.optim.lr_scheduler.LambdaLR | None] = (None, None), optimizer_cls_and_kwargs: tuple[type[torch.optim.optimizer.Optimizer], dict[str, typing.Any]] | None = None, preprocess_logits_for_metrics: collections.abc.Callable[[torch.Tensor, torch.Tensor], torch.Tensor] | None = None)`

Error fetching doc for transformers.Trainer: 'charmap' codec can't encode character '\U0001f917' in position 91:
character maps to <undefined>

###
`datasets.Dataset(arrow_table: datasets.table.Table, info: Optional[datasets.info.DatasetInfo] = None, split: Optional[datasets.splits.NamedSplit] = None, indices_table: Optional[datasets.table.Table] = None, fingerprint: Optional[str] = None)`

A Dataset backed by an Arrow table.

---
