This skill should be used when setting up, optimizing, or managing Templar AI miners on Bittensor Subnet 3 (netuid 3). Use it for tasks involving miner configuration, performance optimization, troubleshooting gradient scoring issues, managing Bittensor wallets with btcli, monitoring miner metrics, renting GPUs via Basilica for mining operations, or strategizing to achieve top miner ranking in the Templar decentralized training network. Integrates seamlessly with the basilica-cli-helper skill for GPU rentals.
Instrucciones de origen · Vista previa de solo lectura
name
templar-miner-claude-skill
description
This skill should be used when setting up, optimizing, or managing Templar AI miners on Bittensor Subnet 3 (netuid 3). Use it for tasks involving miner configuration, performance optimization, troubleshooting gradient scoring issues, managing Bittensor wallets with btcli, monitoring miner metrics, renting GPUs via Basilica for mining operations, or strategizing to achieve top miner ranking in the Templar decentralized training network. Integrates seamlessly with the basilica-cli-helper skill for GPU rentals.
Templar Miner Claude Skill
Overview
Set up, optimize, and manage Templar AI miners to achieve top performance in the Templar decentralized training network (Bittensor Subnet 3, netuid 3). This skill provides expert guidance on miner operations, from initial wallet setup through advanced optimization strategies.
Core Capabilities
1. MINER SETUP & CONFIGURATION
Initial Setup Workflow:
Create Bittensor Wallet (see references/bittensor_btcli.md for complete commands):
Minimum for Competitive Mining: 8x H200 GPUs (141GB VRAM each)
CPU: 64+ cores
RAM: 512+ GB
Storage: 1TB+ NVMe SSD
Network: 10Gbps+ bandwidth
Note: Smaller configurations (4x H100, etc.) are unlikely to be competitive for rewards. For GPU rentals, see the GPU Rental via Basilica section below.
GPU Rental via Basilica:
For those without access to 8x H200 GPUs, rent them through Basilica's decentralized compute marketplace. The basilica-cli-helper Claude skill (https://github.com/synapz-org/basilica-cli-claude-skill) integrates seamlessly with this Templar skill.
Quick Basilica Workflow:
Check Available GPUs:
basilica ls
basilica price --gpu h200 # Check H200 pricing
# Copy logs back
basilica cp [rental-id]:/root/templar/logs/ ./local-logs/
# Terminate when done
basilica down [rental-id]
Cost Optimization Tips:
Monitor Basilica pricing fluctuations with basilica price
Use basilica ps to track runtime and costs
Set up automated cost alerts
Test on smaller GPU counts first before scaling to 8x H200
Integration Note: When using both skills together, Claude can automatically coordinate between Templar mining operations and Basilica GPU rentals. Simply ask: "Help me set up a Templar miner on rented Basilica GPUs."
2. PERFORMANCE OPTIMIZATION
Memory Optimization Tactics:
Parameter Offloading (neurons/miner.py:493-496):
Offload model parameters to CPU before inner_steps
Restore to GPU after training
Reduces peak GPU memory by ~20%
Error Feedback Management:
Keep error_feedback on GPU during training
Move to pinned CPU memory after gradient computation
Prefetch back before next window
Mixed Precision:
Use bfloat16 for better stability than fp16
Configure in hparams.json: "mixed_precision_param": "bfloat16"
Gradient Quality Optimization:
Error Feedback Momentum (Critical for 64x compression):
Preserves gradient information across compressions
Configured via momentum_decay (default: 0.95)
Reference: src/tplr/neurons.py:47-222
Compression Hyperparameters:
{"topk_compression":64,// Top 64 coefficients"target_chunk":64,// DCT chunk size"momentum_decay":0.95// Momentum factor}
More GPUs → higher throughput → more windows completed
Better network → higher gather success
More RAM → larger batch sizes possible
Faster storage → quicker checkpoint loads
7. HYPERPARAMETER TUNING
Learning Rate Optimization:
{"adamw":{"learning_rate":1.17e-4,// Default starting point"warmup_steps":1500,// Gradual ramp-up"scheduler":{"t_max":140000,// Cosine annealing period"eta_min_factor":0.1// Min LR = 10% of max}}}
Momentum Decay Tuning:
Higher (0.95-0.99): Better gradient preservation across compression
The goal is to help users become top-performing miners in the Templar network through systematic setup, optimization, monitoring, and iterative improvement.