Files
wehub-resource-sync a203934033
Lint test / lint (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:34:58 +08:00

21 lines
583 B
Python

# Copyright (c) ModelScope Contributors. All rights reserved.
def try_init_unsloth():
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--tuner_backend', type=str, default='peft')
args, _ = parser.parse_known_args()
if args.tuner_backend == 'unsloth':
import unsloth
if __name__ == '__main__':
from swift.cli.utils import try_use_single_device_mode
try_use_single_device_mode()
try_init_unsloth()
from swift.ray_utils import try_init_ray
try_init_ray()
from swift.pipelines import sft_main
sft_main()