Based on the repository content, I can help you create a YAML configuration to launch an 8xH100 VM for finetuning Llama 3.1 using SkyPilot.
Looking at the repository, there's a dedicated example for Llama 3.1 finetuning in the llm/llama-3_1-finetuning/ directory. Here's how you can do it:
First, install SkyPilot with the necessary cloud provider dependencies:
bash
pip install -U "skypilot[aws,gcp,azure]" # Choose your preferred cloud provider
Create a YAML file (e.g., llama3_finetune.yaml) with the following configuration:
[Redacted
resources:
accelerators: H100:8 # Request 8 NVIDIA H100 GPUs
disk_size: 1024 # Large disk for model weights and dataset
# Working directory to sync to the cloud
workdir: .
setup: |
# Install dependencies
pip install -U torch torchvision torchaudio
pip install transformers datasets accelerate
pip install bitsandbytes # For quantization support
pip install wandb # For experiment tracking
# Download the model (you'll need appropriate credentials/access)
tune download meta-llama/Meta-Llama-3.1-8B-Instruct --output-dir /tmp/Meta-Llama-3.1-8B-Instruct
run: |
# Run the finetuning script
python lora_finetune_distributed.py --config llama3_1/8B_lora
Launch the task:
bash
sky launch llama3_finetune.yaml
Important notes:
You'll need appropriate access to Llama 3.1 model weights from Meta. Make sure you have the necessary credentials configured.
The H100s are in high demand and may have limited availability. SkyPilot will automatically:
Search across multiple clouds for H100 availability
Choose the most cost-effective option
Handle failover if capacity is not available in one region/cloud
For cost optimization, you can add managed spot instances using:
[Redacted
use_spot: true
For automatic cleanup of idle resources, add:
[Redacted
file_mounts:
/checkpoint: s3://YOUR_BUCKET/checkpoints # Replace with your bucket
resources:
# ... previous resource config ...
disk_size: 1024
setup: |
# ... previous setup commands ...
run: |
# ... previous run commands ...
stop_on_completion: true # Automatically stop VM when done
If you want to use a specific cloud provider, you can add:
[Redacted
resources:
cloud: aws # or gcp, azure
accelerators: H100:8
Remember that H100s are expensive resources. Consider using SkyPilot's cost optimization features:
Managed spot instances for 3-6x cost savings
Auto-failover across regions/clouds for better availability
Autostop for automatic cleanup of idle resources
Let me know if you need any clarification or have questions about specific aspects of the configuration!