Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion examples/train/tuners/boft/train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ CUDA_VISIBLE_DEVICES=0 \
swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type boft \
--label_names labels \
--dataset 'swift/self-cognition#1000' \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
Expand Down
1 change: 0 additions & 1 deletion examples/train/tuners/bone/train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ CUDA_VISIBLE_DEVICES=0 \
swift sft \
--model Qwen/Qwen2.5-7B-Instruct \
--train_type bone \
--label_names labels \
--dataset 'swift/self-cognition#1000' \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
Expand Down
3 changes: 2 additions & 1 deletion swift/trainers/mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ def __init__(self,

self.compute_loss_func = compute_loss_func
if get_function(model.__class__.forward) is not get_function(model.forward):
self.label_names = find_labels(model) or ['labels']
self.label_names = find_labels(model)
self.can_return_loss = can_return_loss(model)
self.label_names = self.label_names or ['labels']
self.start_time = time.time()

def _save_initial_model(self, output_dir):
Expand Down
Loading