Buckets:

|
download
raw
1.96 kB

transformers

Public API of @huggingface/transformers. Everything re-exported from this file is considered stable — other imports are internal and may change.

Start here

Model loading

  • Pipelines — task-specific pipeline classes (TextGenerationPipeline, etc.).
  • ModelsAutoModel* classes (one per task).
  • TokenizersAutoTokenizer, chat templates, Message.
  • ProcessorsAutoProcessor, AutoImageProcessor, AutoFeatureExtractor.
  • ConfigsAutoConfig / PretrainedConfig.

Generation

Data types and I/O

  • TensorsTensor, shape ops, math, I/O.
  • ImagesRawImage, load_image().
  • AudioRawAudio, load_audio().
  • VideoRawVideo, RawVideoFrame, load_video() (experimental).

Utilities

  • Hub options — shared from_pretrained() option shapes.
  • Mathssoftmax, cos_sim, typed-array helpers.
  • Model registry — inspect or clear the model cache.
  • Random — seedable MT19937 PRNG matching Python's random.

Type Definitions

DeviceType

Type: keyof typeof DEVICE_TYPES

DataType

Type: keyof typeof DATA_TYPES

Xet Storage Details

Size:
1.96 kB
·
Xet hash:
5dd5ee6e39f10f1427299ead58234615e9404b618a1dbb7dcf2d98495022c7a0

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.