transformers

Load, run inference on, and fine-tune pre-trained Hugging Face transformer models.

Updated Aug 28, 2026
One-click install
npx skills add https://github.com/listentomi/Orcajack --skill transformers-listentomi
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: transformers
Source: https://github.com/listentomi/Orcajack/tree/main/skills/science/transformers
Command: npx skills add https://github.com/listentomi/Orcajack --skill transformers-listentomi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires torch, transformers, datasets, evaluate, accelerate, timm, pillow, librosa, soundfile, and includes references (resource) components.

What problem does it solve? Working with pre-trained machine learning models across NLP, vision, audio, and multimodal tasks requires navigating complex model loading, tokenization, and training APIs. This Skill provides structured guidance for using the Hugging Face Transformers library to perform inference and fine-tuning without deep framework expertise. ## Core Features & Use Cases - Pipeline-Based Inference: Run text generation, classification, question answering, translation, summarization, image classification, object detection, and speech recognition with minimal code. - Custom Model Loading: Load models and tokenizers with fine-grained control over device placement, precision, and configuration using AutoModel classes. - Fine-Tuning with Trainer API: Adapt pre-trained models to custom datasets with automatic mixed precision, distributed training, and logging. - Use Case: A developer needs to classify customer support tickets by intent. They load a pre-trained text-classification pipeline, test it on sample tickets, then fine-tune the model on their labeled dataset using the Trainer API. ## Quick Start Use the transformers skill to load a pre-trained text classification model and classify the sentiment of a given sentence.

Frequently Asked Questions about transformers

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use Hugging Face transformers for text classification?▼

Use the pipeline API with the text-classification task: call pipeline("text-classification") and pass your text to get predicted labels and scores. For custom labels, fine-tune a pre-trained model on your labeled dataset using the Trainer API.

How to fine-tune a pre-trained transformer model on a custom dataset?▼

Load the model and tokenizer with AutoModel and AutoTokenizer classes, prepare your dataset, then configure TrainingArguments with epochs and batch size. Pass everything to the Trainer class and call trainer.train() to start fine-tuning.

Does transformers support image and audio tasks besides NLP?▼

Yes, the library supports computer vision tasks like image classification and object detection, plus audio tasks like speech recognition. Install timm and pillow for vision, or librosa and soundfile for audio processing.

Why do some Hugging Face models require authentication?▼

Many models on the Hugging Face Hub are gated and require an access token. Authenticate using the login() function from huggingface_hub or set the HUGGINGFACE_TOKEN environment variable with a token from your account settings.

When should I use pipelines versus loading models directly?▼

Use pipelines for quick prototyping and simple inference without custom preprocessing. Load models and tokenizers separately with AutoModel classes when you need control over device placement, precision, generation parameters, or custom input handling.