Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
eyadsibai avatar

Transformers

  • 56 installs
  • 7 repo stars
  • Updated January 15, 2026
  • eyadsibai/ltk

Helps with ai & agent building tasks.

About

transformers is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.

  • transformers
  • AI & Agent Building
  • AI-coding skill

Transformers by the numbers

  • 56 all-time installs (skills.sh)
  • Ranked #6,668 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Jul 30, 2026 (Skillselion catalog sync)
npx skills add https://github.com/eyadsibai/ltk --skill transformers

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs56
repo stars7
Last updatedJanuary 15, 2026
Repositoryeyadsibai/ltk

What it does

Helps with ai & agent building tasks.

Files

SKILL.mdMarkdownGitHub ↗

HuggingFace Transformers

Access thousands of pre-trained models for NLP, vision, audio, and multimodal tasks.

When to Use

  • Quick inference with pipelines
  • Text generation, classification, QA, NER
  • Image classification, object detection
  • Fine-tuning on custom datasets
  • Loading pre-trained models from HuggingFace Hub

---

Pipeline Tasks

NLP Tasks

TaskPipeline NameOutput
Text Generationtext-generationCompleted text
Classificationtext-classificationLabel + confidence
Question Answeringquestion-answeringAnswer span
SummarizationsummarizationShorter text
Translationtranslation_en_to_frTranslated text
NERnerEntity spans + types
Fill Maskfill-maskPredicted tokens

Vision Tasks

TaskPipeline NameOutput
Image Classificationimage-classificationLabel + confidence
Object Detectionobject-detectionBounding boxes
Image Segmentationimage-segmentationPixel masks

Audio Tasks

TaskPipeline NameOutput
Speech Recognitionautomatic-speech-recognitionTranscribed text
Audio Classificationaudio-classificationLabel + confidence

---

Model Loading Patterns

Auto Classes

ClassUse Case
AutoModelBase model (embeddings)
AutoModelForCausalLMText generation (GPT-style)
AutoModelForSeq2SeqLMEncoder-decoder (T5, BART)
AutoModelForSequenceClassificationClassification head
AutoModelForTokenClassificationNER, POS tagging
AutoModelForQuestionAnsweringExtractive QA

Key concept: Always use Auto classes unless you need a specific architecture—they handle model detection automatically.

---

Generation Parameters

ParameterEffectTypical Values
max_new_tokensOutput length50-500
temperatureRandomness (0=deterministic)0.1-1.0
top_pNucleus sampling threshold0.9-0.95
top_kLimit vocabulary per step50
num_beamsBeam search (disable sampling)4-8
repetition_penaltyDiscourage repetition1.1-1.3

Key concept: Higher temperature = more creative but less coherent. For factual tasks, use low temperature (0.1-0.3).

---

Memory Management

Device Placement Options

OptionWhen to Use
device_map="auto"Let library decide GPU allocation
device_map="cuda:0"Specific GPU
device_map="cpu"CPU only

Quantization Options

MethodMemory ReductionQuality Impact
8-bit~50%Minimal
4-bit~75%Small for most tasks
GPTQ~75%Requires calibration
AWQ~75%Activation-aware

Key concept: Use torch_dtype="auto" to automatically use the model's native precision (often bfloat16).

---

Fine-Tuning Concepts

Trainer Arguments

ArgumentPurposeTypical Value
num_train_epochsTraining passes3-5
per_device_train_batch_sizeSamples per GPU8-32
learning_rateStep size2e-5 for fine-tuning
weight_decayRegularization0.01
warmup_ratioLR warmup0.1
evaluation_strategyWhen to eval"epoch" or "steps"

Fine-Tuning Strategies

StrategyMemoryQualityUse Case
Full fine-tuningHighBestSmall models, enough data
LoRALowGoodLarge models, limited GPU
QLoRAVery LowGood7B+ models on consumer GPU
Prefix tuningLowModerateWhen you can't modify weights

---

Tokenization Concepts

ParameterPurpose
paddingMake sequences same length
truncationCut sequences to max_length
max_lengthMaximum tokens (model-specific)
return_tensorsOutput format ("pt", "tf", "np")

Key concept: Always use the tokenizer that matches the model—different models use different vocabularies.

---

Best Practices

PracticeWhy
Use pipelines for inferenceHandles preprocessing automatically
Use device_map="auto"Optimal GPU memory distribution
Batch inputsBetter throughput
Use quantization for large modelsRun 7B+ on consumer GPUs
Match tokenizer to modelVocabularies differ between models
Use Trainer for fine-tuningBuilt-in best practices

Resources

  • Docs: <https://huggingface.co/docs/transformers>
  • Model Hub: <https://huggingface.co/models>
  • Course: <https://huggingface.co/course>

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.