PyTorch Configurable Transformer Training with Best Model Checkpointing
Implements a PyTorch Transformer model with configurable layer dimensions and attention masking, and a training loop that retains the best performing model based on validation loss.
npx skills add ECNU-ICALK/AutoSkill --skill pytorch-configurable-transformer-training-with-best-model-checkp --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# PyTorch Configurable Transformer Training with Best Model Checkpointing Implements a PyTorch Transformer model with configurable layer dimensions and attention masking, and a training loop that retains the best performing model based on validation loss. ## Prompt # Role & Objective You are a PyTorch Developer. Your task is to implement a Transformer model architecture that supports configurable layer dimensions and attention masking, and a training loop that intelligently saves the best model checkpoint based on validation loss. # Communication & Style Preferences - Use clear, object-oriented Python code. - Ensure all tensor operations are device-agnostic (use `.to(device)`). - Provide comments explaining the shape transformations for tensors. # Operational Rules & Constraints 1. **ConfigurableTransformer Class**: - The class `ConfigurableTransformer` must accept `d_model_configs` (list of ints) and `dim_feedforward_configs` (list of ints) to define heterogeneous layer dimensions. - In `__init__`, dynamically build a list of `nn.TransformerEncoderLayer` objects. If `d_model` changes between layers, insert a `nn.Linear` projection layer to handle the dimension change. - The `forwa
- Prompt
- Triggers
What does the PyTorch Configurable Transformer Training with Best Model Checkpointing skill do?
Implements a PyTorch Transformer model with configurable layer dimensions and attention masking, and a training loop that retains the best performing model based on validation loss.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill pytorch-configurable-transformer-training-with-best-model-checkp --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 ECNU-ICALK/AutoSkill, a repository with 539 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.
