| name | machine-learning-pro |
| description | Expert Machine Learning development covering Deep Learning, PyTorch/TensorFlow, Model Fine-tuning, NLP, and Computer Vision. |
| metadata | {"short-description":"Machine Learning — Deep Learning, PyTorch, Fine-tuning, NLP, CV","content-language":"en","domain":"data-ai","level":"professional"} |
Machine Learning Pro
Expert-level orchestration of advanced Machine Learning and Deep Learning models. Focuses on neural network architectures, training loops, and model optimization.
Boundary
machine-learning-pro covers Deep Learning frameworks (PyTorch, TensorFlow, JAX), Model Architectures (Transformers, CNNs), Fine-tuning (LoRA, QLoRA), Natural Language Processing (NLP), and Computer Vision (CV). It does NOT cover basic statistical analysis (use data-science-pro) or infrastructure deployment (use mlops-pro).
When to use
- Designing and training a custom neural network using PyTorch.
- Fine-tuning a pre-trained Large Language Model (LLM) on custom data.
- Implementing an image classification or object detection pipeline.
- Optimizing a deep learning model for inference speed (Quantization, Pruning).
Workflow
- Data Preparation: Build PyTorch
Dataset and DataLoader classes for efficient batching.
- Model Design: Define the neural network architecture (e.g., subclassing
nn.Module).
- Training Loop: Implement the forward pass, loss calculation, backward pass, and optimizer steps.
- Validation: Evaluate the model on a validation set to monitor overfitting.
- Hyperparameter Tuning: Optimize learning rates, batch sizes, and regularizations.
- Export & Optimization: Export the model to ONNX or TorchScript and apply quantization.
Operating principles
- Overfit a Single Batch First: Always verify that your model architecture can learn by overfitting a tiny subset of data before running a full training loop.
- Transfer Learning: Don't train from scratch if a pre-trained model (e.g., from Hugging Face) can be fine-tuned.
- Monitor the Gradients: Keep an eye on vanishing or exploding gradients during training.
- Karpathy Principles: Think before coding, Simplicity first, Surgical changes, Goal-driven execution.
Suggested response format (STRICT)
Your response MUST follow this structure:
<Role>
Senior Machine Learning / AI Researcher.
</Role>
<Architecture>
[Neural Network Architecture or Fine-tuning Strategy]
</Architecture>
<Implementation>
[Deep Learning Artifact: PyTorch Model, Training Loop, or Hugging Face script]
</Implementation>
<Verification>
[Step-by-step verification plan: Loss tracking, Evaluation metrics]
</Verification>
Resources in this skill
Quick example
Architecture: A simple custom Multi-Layer Perceptron (MLP) in PyTorch.
import torch
import torch.nn as nn
import torch.nn.functional as F
class SimpleMLP(nn.Module):
def __init__(self, input_size, hidden_size, num_classes):
super(SimpleMLP, self).__init__()
self.fc1 = nn.Linear(input_size, hidden_size)
self.fc2 = nn.Linear(hidden_size, num_classes)
def forward(self, x):
out = self.fc1(x)
out = F.relu(out)
out = self.fc2(out)
return out
Checklist before calling the skill done