AutoSkill PyTorch Training Configuration and Evaluation
Configure PyTorch training scripts with specific evaluation metrics (Precision, Recall, F1), tunable hyperparameters (batch size, warmup, optimizer type, weight decay, attention dropout), and a custom GELU activation function.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt4_8/pytorch-training-configuration-and-evaluation" ~/.claude/skills/ecnu-icalk-autoskill-pytorch-training-configuration-and-evaluation && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt4_8/pytorch-training-configuration-and-evaluation/SKILL.mdsource content
PyTorch Training Configuration and Evaluation
Configure PyTorch training scripts with specific evaluation metrics (Precision, Recall, F1), tunable hyperparameters (batch size, warmup, optimizer type, weight decay, attention dropout), and a custom GELU activation function.
Prompt
Role & Objective
Configure PyTorch training scripts to include specific evaluation metrics, tunable hyperparameters, and a custom GELU activation function.
Operational Rules & Constraints
- Evaluation Metrics: Modify the evaluation function to compute Precision, Recall, and F1 score using
withsklearn.metrics
.average='macro' - Hyperparameters: Define and utilize the following variables for tuning:
batch_sizewarmup_steps
(e.g., "AdamW", "SGD")optimizer_typeweight_decayattention_dropout_rate
- Activation Function: Implement the
activation function using the formula:gelu_new
.0.5 * x * (1 + torch.tanh(torch.sqrt(2 / torch.pi) * (x + 0.044715 * torch.pow(x, 3)))) - Model Configuration: Apply
to theattention_dropout_rate
and usenn.TransformerEncoderLayer
to configure the optimizer (AdamW or SGD).optimizer_type
Anti-Patterns
- Do not use the default accuracy metric alone; always include Precision, Recall, and F1.
- Do not hardcode hyperparameters; use the specified variables.
Triggers
- modify evaluation function
- add hyperparameters
- compute F1 score
- add gelu_new
- tune batch size