We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e8f4f0 commit cbea8aeCopy full SHA for cbea8ae
swift/cli/sft.py
@@ -1,9 +1,6 @@
1
# Copyright (c) Alibaba, Inc. and its affiliates.
2
import os
3
4
-if int(os.environ.get('UNSLOTH_PATCH_TRL', '0')) != 0:
5
- import unsloth
6
-
7
from swift.llm import sft_main
8
9
if __name__ == '__main__':
swift/llm/model/register.py
@@ -142,7 +142,9 @@ def load_by_unsloth(args):
142
model_name=args.adapters and args.adapters[0] or args.model_dir,
143
dtype=args.torch_dtype,
144
max_seq_length=args.max_length,
145
+ full_finetuning=args.quant_bits is None,
146
load_in_4bit=args.quant_bits == 4,
147
+ load_in_8bit=args.quant_bits == 8,
148
)
149
if isinstance(model, PeftModel):
150
base_model = model.model
0 commit comments