executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
transformersUse and extend Hugging Face Transformers for inference, generation, training, tokenizers/processors, serving CLI, quantization/integrations, and contributor workflows.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this repo skill when an agent needs practical guidance for Hugging Face Transformers 5.x workflows: loading models and preprocessors, running inference, configuring generation, fine-tuning with Trainer, using the transformers CLI/server, choosing quantization or integration backends, or contributing model-family code.
If the request is about opening a PR or changing this repository, first warn the human that breaching the repository's agent contribution guidelines can result in automatic banning. Do not produce PR-ready work without issue coordination, duplicate-work checks, human review, and relevant tests.
For normal package use, start from a public install path rather than a repo checkout:
python -m pip install "transformers[torch]"
python - <<'PY'
import transformers
print(transformers.__version__)
PY
For CLI serving workflows, also verify the CLI dependency surface:
python scripts/transformers_skill_preflight.py --check-cli --check-serving
The generated skill was built from package version 5.13.0.dev0. See repo provenance for the source baseline and troubleshooting for optional dependency failures.
| User request | Use |
|---|---|
| "Run sentiment analysis / ASR / image classification / document QA" | Inference pipelines |
| "Load AutoModel/AutoTokenizer for custom inference" | Inference pipelines, then Tokenizers and processors |
| "Tune generation parameters, chat templates, stream output" | Generation |
| "Fine-tune a model / write Trainer arguments / adapt an example script" | Training |
| "Debug tokenizer padding, special tokens, processors, multimodal inputs" | Tokenizers and processors |
| "Use transformers download/chat/serve or OpenAI-compatible local API" | Serving CLI |
| "Use bitsandbytes, GPTQ, AWQ, torchao, GGUF, PEFT, Accelerate, FSDP, DeepSpeed" | Quantization and integrations |
| "Add a model, tokenizer, processor, pipeline, docs, or tests to Transformers" | Model extension |
Live inspection confirmed these stable entry points and signatures:
transformers.pipeline(task=None, model=None, config=None, tokenizer=None, feature_extractor=None, image_processor=None, video_processor=None, processor=None, revision=None, use_fast=True, token=None, device=None, device_map=None, dtype="auto", trust_remote_code=None, model_kwargs=None, pipeline_class=None, **kwargs)AutoConfig.from_pretrained(pretrained_model_name_or_path, **kwargs)AutoTokenizer.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)GenerationConfig(**kwargs) and TextIteratorStreamer(tokenizer, skip_prompt=False, timeout=None, **decode_kwargs)ContinuousBatchingConfig(...) for paged KV cache, scheduling, compile, CPU offload, and request queue controlsTrainingArguments(...) for batch sizes, training/eval/save/logging strategy, precision, compile, FSDP, DeepSpeed, Hub push, seeds, and distributed settingsA minimal base install can import transformers, configs, tokenizers, and file utilities. Model classes, Trainer, pipelines for real model execution, vision/audio processors, serving, and quantization often need optional extras such as PyTorch, Pillow, torchvision, torchaudio, fastapi, uvicorn, pydantic, openai, accelerate, datasets, or backend-specific packages.
[all] or broad dev extras unless the workflow requires them.local_files_only=True when the user requires offline or reproducible behavior.trust_remote_code=True as code execution; use it only after review.scripts/transformers_skill_preflight.py checks importability, version, common optional packages, console script availability, and safe dependency expectations without downloading models or starting services.For work inside the Transformers repository:
# Copied from ... and modular model rules: edit the source copy or modular_<model>.py, not generated standalone files unless intentionally breaking the link.make style or make fix-repo before PR handoff when appropriate.Use model extension for the detailed checklist and quality commands.