← スキル一覧に戻る

train-model
by mvillmow
Training framework written in Mojo
⭐ 11🍴 4📅 2026年1月24日
SKILL.md
name: train-model description: "Execute model training with optimization algorithms. Use when running training loops on datasets." mcp_fallback: none category: ml tier: 2 user-invocable: false
Train Model
Implement and execute model training loops including forward/backward passes, gradient updates, and checkpoint management.
When to Use
- Running full training pipeline on datasets
- Fine-tuning pretrained models
- Experimenting with hyperparameter variations
- Reproducing paper results
Quick Reference
# Mojo training loop pattern
struct Trainer:
var model: NeuralNetwork
var optimizer: Optimizer
var loss_fn: LossFn
fn train_epoch(mut self, mut dataloader: BatchLoader) -> Float32:
var total_loss: Float32 = 0.0
var batches: Int = 0
for batch in dataloader:
var predictions = self.model(batch.inputs)
var loss = self.loss_fn(predictions, batch.targets)
# Backward pass and optimization
total_loss += loss
batches += 1
return total_loss / Float32(batches)
Workflow
- Prepare data pipeline: Load and batch training data
- Initialize model: Create network with specified architecture
- Set up optimizer: Choose optimizer (SGD, Adam) with learning rate
- Implement training loop: Forward pass, compute loss, backward pass, update weights
- Monitor progress: Log loss, save checkpoints, validate periodically
Output Format
Training report:
- Loss values per epoch
- Training time per epoch
- Validation metrics (accuracy, loss)
- Learning curves (loss vs epoch)
- Final model performance
- Checkpoint locations
References
- See
prepare-datasetskill for data pipeline setup - See
evaluate-modelskill for validation - See CLAUDE.md > Mojo for training loop patterns
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です