tpu支持

This commit is contained in:
Zchen
2025-10-12 15:31:45 +08:00
parent 3892f13da8
commit 530b7c9d3d
6 changed files with 472 additions and 42 deletions

View File

@@ -0,0 +1,26 @@
# Accelerate Configuration for TPU Training
# This file configures Accelerate library for 8-core TPU training
# with mixed precision (bfloat16) support
compute_environment: TPU
distributed_type: TPU
tpu_name: null # Will use default TPU
tpu_zone: null # Will use default zone
# Mixed precision settings (use bfloat16 for TPU)
mixed_precision: bf16
# Number of TPU cores (v3-8 or v4-8 TPUs have 8 cores)
num_processes: 8
# Enable TPU debugging (set to false for production)
tpu_use_cluster: false
tpu_use_sudo: false
# Logging settings
main_process_port: null
machine_rank: 0
num_machines: 1
# Enable automatic optimization
use_cpu: false