From cb722768f71cde5db478d4c8ebd3a829675dd675 Mon Sep 17 00:00:00 2001 From: hyunwoongko Date: Wed, 8 Feb 2023 03:50:27 +0900 Subject: [PATCH] Apply pre-commit --- .idea/workspace.xml | 98 +++++++++++++++++++ .../supervised_finetuning/efficiency_utils.py | 2 +- model/supervised_finetuning/trainer.py | 2 +- 3 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 .idea/workspace.xml diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000000..36c602430b --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1675697798532 + + + + + + + + + \ No newline at end of file diff --git a/model/supervised_finetuning/efficiency_utils.py b/model/supervised_finetuning/efficiency_utils.py index 272e1b2fcc..6a27accc64 100644 --- a/model/supervised_finetuning/efficiency_utils.py +++ b/model/supervised_finetuning/efficiency_utils.py @@ -1,7 +1,7 @@ import functools import torch -from transformers.activations import QuickGELUActivation, NewGELUActivation, FastGELUActivation, GELUActivation +from transformers.activations import FastGELUActivation, GELUActivation, NewGELUActivation, QuickGELUActivation def rsetattr(obj, attr, val): diff --git a/model/supervised_finetuning/trainer.py b/model/supervised_finetuning/trainer.py index 8edad8546a..83034d955a 100644 --- a/model/supervised_finetuning/trainer.py +++ b/model/supervised_finetuning/trainer.py @@ -5,11 +5,11 @@ import bitsandbytes import torch +from efficiency_utils import fuse_gelu from torch import nn from transformers import PreTrainedModel, Trainer, TrainingArguments from transformers.training_args import OptimizerNames from utils import get_dataset, get_loss, get_metrics, get_model, get_tokenizer, read_yamls -from efficiency_utils import fuse_gelu def compute_metrics(eval_pred, preprocess_fns, metrics):