Agent skill · AI & Agents

huggingface-transformers

Use Hugging Face Transformers for local model inference, embeddings, and fine-tuning. Covers pipelines, model selection, quantization, and optimization. Use when working with local LLMs, embeddings, or custom model training.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill huggingface-transformers-fgarofalo56-suppercharge-microso --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 22 KB
Bundled scripts: none
Path: skills/ai-ml/huggingface-transformers-fgarofalo56-suppercharge-microso/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

It instructs the agent to use Hugging Face Transformers for local model inference, embeddings, and fine-tuning. It covers pipelines, model selection, quantization, and optimization. It explicitly advises when to use it: with local LLMs, embeddings, or custom model training.

How it works

  • Uses Pipeline API for tasks: text-generation, text-classification, ner, question-answering, summarization, etc., with corresponding models and configurations. Example commands include: "pipeline("text-generation")" and specific model choices like "microsoft/DialoGPT-medium" or "mistralai/Mistral-7B-Instruct-v0.2".
  • Shows installation steps for core transformers, extras, embeddings, quantization, PEFT/LoRA, and datasets via pip install commands.
  • Demonstrates loading models and tokenizers with from_pretrained, including options for device placement (device_map), precision (torch_dtype), and offline loading (local_files_only).
  • Provides Embeddings with Sentence Transformers usage and examples for encoding and similarity.
  • Details Text Generation in advanced modes (chat-style and streaming) with sample code for chat templates and streaming via TextIteratorStreamer.
  • Outlines Quantization methods: BitsAndBytes 4-bit/8-bit, GPTQ, and memory comparisons across precisions.
  • Describes Fine-Tuning workflows: basic Trainer usage with datasets, training arguments, and evaluation setup; also shows custom metrics and PEFT/LoRA workflows including LoRA configuration, saving/loading adapters, and QLoRA.
  • Includes Model Selection workflow from the hub: searching models, obtaining model info, and recommended models by task.
  • Provides local inference optimization guidance with a Batch Processing example (truncated in snippet).

When to use it

Use when working with local LLMs, embeddings, or custom model training.

What it can touch

The skill references tools and libraries, notably: "pipeline", "AutoTokenizer", "AutoModel", "AutoModelForCausalLM", "SentenceTransformer", "Trainer", and PEFT components. It prescribes commands like "pip install transformers torch", "from transformers import pipeline" and various from_pretrained, BitsAndBytesConfig, LoraConfig, get_peft_model, PeftModel, prepare_model_for_kbit_training. It also uses the HuggingFace Hub API via "from huggingface_hub import HfApi, list_models".

Caveats

The material lists licenses and dependencies (MIT license for the skill). It shows complex configurations (device_map, torch_dtype, quantization, and PEFT) that require compatible hardware and software versions; potential risk in mixing quantization settings with certain models is implied by the need to specify options like trust_remote_code and attn_implementation, but no explicit warnings beyond shown examples.

From the SKILL.md

# Hugging Face Transformers Skill ## Quick Reference | Task | Approach | Key Class | |------|----------|-----------| | Text Generation | `pipeline("text-generation")` | `AutoModelForCausalLM` | | Classification | `pipeline("text-classification")` | `AutoModelForSequenceClassification` | | Embeddings | `sentence-transformers` | `SentenceTransformer` | | NER | `pipeline("ner")` | `AutoModelForTokenClassification` | | QA | `pipeline("question-answering")` | `AutoModelForQuestionAnswering` | | Fine-tuning | `Trainer` API | `TrainingArguments` | ## Installation ```bash # Core transformers pip install transformers torch # With all extras pip install transformers[torch] accelerate # For embeddings pip install sentence-transformers # For quantization pip install bitsandbytes # For PEFT/LoRA pip install peft # For datasets pip install datasets ``` ## Pipeline API (Fastest Start) ### Text Generation ```python from transformers import pipeline # Simple generation generator = pipeline("text-generation", model="microsoft/DialoGPT-medium") result = generator("Hello, how are you?", max_length=50, num_return_sequences=1) print(result[0]["generated_text"]) # With specific model for instruction foll

What's inside
Steps it walks through
  1. Quick Reference
  2. Installation
  3. Pipeline API (Fastest Start)
  4. Text Generation
  5. Text Classification
  6. Named Entity Recognition
  7. Question Answering
  8. Summarization
  9. Model and Tokenizer Loading
  10. Basic Loading
  11. Loading with Options
  12. Offline Loading
  13. Embeddings with Sentence Transformers
  14. Basic Embeddings
Ships with 1 file
  • metadata.json
Commands it runs
Core transformers
pip install transformers torch
With all extras
pip install transformers[torch] accelerate
For embeddings
pip install sentence-transformers
For quantization
pip install bitsandbytes
For PEFT/LoRA
pip install peft
More from claude-skill-registry
All skills →
About this skill
What does the huggingface-transformers skill do?

Use Hugging Face Transformers for local model inference, embeddings, and fine-tuning. Covers pipelines, model selection, quantization, and optimization. Use when working with local LLMs, embeddings, or custom model training.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill huggingface-transformers-fgarofalo56-suppercharge-microso --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going