make_n_server.py 1.0 KB

1234567891011121314151617181920212223242526272829
  1. import os
  2. # model = 'mistralai/Mistral-7B-Instruct-v0.2'
  3. model = 'meta-llama/Meta-Llama-3-8B-Instruct'
  4. # model = 'google/gemma-1.1-7b-it'
  5. # model = 'google/gemma-1.1-2b-it'
  6. # model = 'microsoft/Phi-3-mini-4k-instruct'
  7. # model = 'meta-llama/Llama-2-7b-chat-hf'
  8. lora = ''
  9. # part = 'AI4Chem'
  10. part = 'low'
  11. if part == 'high':
  12. if lora != '':
  13. for i in range(60):
  14. os.system(f'sbatch -s --overcommit --requeue -p vip_gpu_ailab -A ai4phys --gres=gpu:1 ./server.bash {model} {10000+i} {lora}')
  15. else:
  16. for i in range(60):
  17. os.system(f'sbatch -s --overcommit --requeue -p vip_gpu_ailab -A ai4phys --gres=gpu:1 ./server.bash {model} {10000+i}')
  18. elif part == 'low':
  19. if lora != '':
  20. for i in range(16):
  21. os.system(f'sbatch -s --overcommit --requeue -p vip_gpu_ailab_low --gres=gpu:1 ./server.bash {model} {10000+i} {lora}')
  22. else:
  23. for i in range(16):
  24. os.system(f'sbatch -s --overcommit --requeue -p vip_gpu_ailab_low --gres=gpu:1 ./server.bash {model} {10000+i}')