ml-huggingface-models

Verify, download, fine-tune, and integrate HuggingFace pre-trained models in PyTorch projects.

Updated Feb 23, 2026
One-click install
npx skills add https://github.com/rishikanthc/ml-superpowers --skill ml-huggingface-models
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ml-huggingface-models
Source: https://github.com/rishikanthc/ml-superpowers/tree/main/skills/ml-huggingface-models
Command: npx skills add https://github.com/rishikanthc/ml-superpowers --skill ml-huggingface-models

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevent wasted compute and silent failures by ensuring pre-trained HuggingFace models are correctly loaded, validated, and integrated before any fine-tuning, continued pre-training, or production use.

Core Features & Use Cases

  • Base Model Verification: Run a forward pass on representative inputs to confirm tokenizer compatibility, output shapes, and padding/attention semantics.
  • Fine-Tuning Guidance: Decision gating between full fine-tuning and PEFT/LoRA with practical trade-offs and checklist requirements.
  • Training Workflows & Integration: Clear patterns for Lightning and HF Trainer setups, dataset tokenization rules, PEFT parameter checks, and continued pre-training recipes.
  • Use Case: Prepare a BERT-style classifier by verifying the checkpoint, tokenizing GLUE examples with explicit padding and max_length, choosing LoRA for limited compute, and confirming print_trainable_parameters before training.

Quick Start

Verify a HuggingFace checkpoint by loading the AutoTokenizer and AutoModel, running a single forward pass on a representative input, and confirming the logits or output shapes before starting any fine-tuning.

Frequently Asked Questions about ml-huggingface-models

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

FAQPage Schema
How do I verify a HuggingFace model before starting fine-tuning?

Run a forward pass on a HuggingFace checkpoint by loading AutoTokenizer and AutoModel, confirming logits and output shapes to verify tokenizer compatibility before fine-tuning.

What is the best way to choose between LoRA and full fine-tuning for a transformer?

Choosing between LoRA and full fine-tuning depends on compute availability; LoRA via PEFT is recommended for limited compute, while full fine-tuning requires verifying trainable parameters and robust training arguments for larger resources.

How do I tokenize a dataset for PyTorch training with HuggingFace transformers?

Tokenize a dataset by specifying explicit padding and truncation max_length, then set the dataset format to torch to ensure compatibility with PyTorch-based training loops and inference evaluation.

Can I use PyTorch Lightning with HuggingFace Trainer for model training?

HuggingFace model integration supports both Lightning and HF Trainer setups, providing clear patterns for training loops, dataset tokenization rules, and PEFT parameter checks within PyTorch-based projects.

Why does my HuggingFace forward pass fail during base model verification?

A forward pass fails during base model verification when tokenizer compatibility, output shapes, or padding and attention semantics are mismatched, requiring explicit padding and truncation specifications before training.

Do I need to check trainable parameters when applying PEFT to a HuggingFace model?

You must verify PEFT trainable parameters by calling print_trainable_parameters to confirm the LoRA adapters are correctly applied and only the intended layers are being updated during training.