| name | transformers |
| description | This skill should be used when working with pre-trained transformer models for natural language processing, computer vision, audio, or multimodal tasks. Use for text generation, classification, question answering, translation, summarization, image classification, object detection, speech recognition, and fine-tuning models on custom datasets. |
| category | llm-tools |
| license | Apache-2.0 license |
| compatibility | Some features require an Huggingface token |
| metadata | {"skill-author":"Synthetic Sciences"} |
| version | 1.0.0 |
| author | Synthetic Sciences |
| tags | ["NLP","Deep Learning","Hugging Face","LLM","Fine-Tuning"] |
| dependencies | ["transformers>=4.45.0","torch>=2.0.0","tokenizers>=0.19.0"] |
Transformers
Overview
The Hugging Face Transformers library provides access to thousands of pre-trained models for tasks across NLP, computer vision, audio, and multimodal domains. Use this skill to load models, perform inference, and fine-tune on custom data.
Installation
Install transformers and core dependencies:
uv pip install torch transformers datasets evaluate accelerate
For vision tasks, add:
uv pip install timm pillow
For audio tasks, add:
uv pip install librosa soundfile
Credential Setup
HuggingFace token is auto-injected by openscience when connected via the dashboard.
[ -n "$HF_TOKEN" ] && echo "HF_TOKEN set" || echo "NOT SET"
If not set: add your Hugging Face token in Customize → Tools or export HF_TOKEN locally.
Quick Start
Use the Pipeline API for fast inference without manual configuration:
from transformers import pipeline
generator = pipeline("text-generation", model="gpt2")
result = generator("The future of AI is", max_length=50)
classifier = pipeline("text-classification")
result = classifier("This movie was excellent!")
qa = pipeline("question-answering")
result = qa(question="What is AI?", context="AI is artificial intelligence...")
Core Capabilities
1. Pipelines for Quick Inference
Use for simple, optimized inference across many tasks. Supports text generation, classification, NER, question answering, summarization, translation, image classification, object detection, audio classification, and more.