#!/bin/bash # This script is used to fine-tune a model using PyTorch with multiple GPUs. export HSA_FORCE_FINE_GRAIN_PCIE=1 set -x # Run the script with 4 GPUs # Ensure you have the necessary environment variables set for PyTorch and CUDA # Example command to run the script with 4 GPUs # Make sure to adjust the paths and configurations as needed # Example command to run the script with 4 GPUs # Note: Adjust the paths to your data and model as necessary # Example command to run the script with 4 GPUs torchrun --standalone --nnodes=1 --nproc_per_node=4 finetune_hf_sft.py /home/client/nb/AdvertiseGen_fix /home/model/ZhipuAI/chatglm3-6b configs/sft.yaml