From 8a2ef81d17c52a6da18e46ff4f776d63df1030db Mon Sep 17 00:00:00 2001 From: uvos Date: Sat, 20 Jul 2024 22:57:16 +0200 Subject: [PATCH] add copyright header --- arguments.py | 20 ++++++++++++++++++++ datamodules.py | 20 ++++++++++++++++++++ dyntrainmodel.py | 20 ++++++++++++++++++++ modules.py | 20 ++++++++++++++++++++ tokenizer.py | 20 ++++++++++++++++++++ train_dynamic.py | 20 ++++++++++++++++++++ tune.sh | 20 ++++++++++++++++++++ utils.py | 20 ++++++++++++++++++++ 8 files changed, 160 insertions(+) diff --git a/arguments.py b/arguments.py index 042c1b3..48b3f40 100644 --- a/arguments.py +++ b/arguments.py @@ -1,3 +1,23 @@ + +# QRotaryTraining - A novel method for fully training all parameters of large +# language models (llms) while using less device memory than traditional methods. +# Copyright (C) 2024 Carl Philipp Klemm +# +# This file is part of QRotaryTraining. +# +# QRotaryTraining is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# QRotaryTraining is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with QRotaryTraining. If not, see . + from dataclasses import dataclass, field from typing import Optional, Self from enum import Enum diff --git a/datamodules.py b/datamodules.py index 2fb4d78..05b9ff2 100644 --- a/datamodules.py +++ b/datamodules.py @@ -1,3 +1,23 @@ + +# QRotaryTraining - A novel method for fully training all parameters of large +# language models (llms) while using less device memory than traditional methods. +# Copyright (C) 2024 Carl Philipp Klemm +# +# This file is part of QRotaryTraining. +# +# QRotaryTraining is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# QRotaryTraining is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with QRotaryTraining. If not, see . + import copy import torch import typing diff --git a/dyntrainmodel.py b/dyntrainmodel.py index 1fa08d6..68ce7c0 100644 --- a/dyntrainmodel.py +++ b/dyntrainmodel.py @@ -1,3 +1,23 @@ + +# QRotaryTraining - A novel method for fully training all parameters of large +# language models (llms) while using less device memory than traditional methods. +# Copyright (C) 2024 Carl Philipp Klemm +# +# This file is part of QRotaryTraining. +# +# QRotaryTraining is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# QRotaryTraining is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with QRotaryTraining. If not, see . + from transformers import AutoModelForCausalLM import torch from utils import replace_module diff --git a/modules.py b/modules.py index 6d59399..061f6a6 100644 --- a/modules.py +++ b/modules.py @@ -1,3 +1,23 @@ + +# QRotaryTraining - A novel method for fully training all parameters of large +# language models (llms) while using less device memory than traditional methods. +# Copyright (C) 2024 Carl Philipp Klemm +# +# This file is part of QRotaryTraining. +# +# QRotaryTraining is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# QRotaryTraining is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with QRotaryTraining. If not, see . + import torch import bitsandbytes as bnb import torch.multiprocessing as multiprocessing diff --git a/tokenizer.py b/tokenizer.py index e271933..cf8a04a 100644 --- a/tokenizer.py +++ b/tokenizer.py @@ -1,3 +1,23 @@ + +# QRotaryTraining - A novel method for fully training all parameters of large +# language models (llms) while using less device memory than traditional methods. +# Copyright (C) 2024 Carl Philipp Klemm +# +# This file is part of QRotaryTraining. +# +# QRotaryTraining is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# QRotaryTraining is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with QRotaryTraining. If not, see . + import transformers from arguments import ModelArguments diff --git a/train_dynamic.py b/train_dynamic.py index 865d623..0a64e19 100644 --- a/train_dynamic.py +++ b/train_dynamic.py @@ -1,3 +1,23 @@ + +# QRotaryTraining - A novel method for fully training all parameters of large +# language models (llms) while using less device memory than traditional methods. +# Copyright (C) 2024 Carl Philipp Klemm +# +# This file is part of QRotaryTraining. +# +# QRotaryTraining is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# QRotaryTraining is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with QRotaryTraining. If not, see . + import transformers import torch from torch.utils import tensorboard diff --git a/tune.sh b/tune.sh index d788b38..2a59aae 100755 --- a/tune.sh +++ b/tune.sh @@ -1,4 +1,24 @@ #!/bin/sh +# +# QRotaryTraining - A novel method for fully training all parameters of large +# language models (llms) while using less device memory than traditional methods. +# Copyright (C) 2024 Carl Philipp Klemm +# +# This file is part of QRotaryTraining. +# +# QRotaryTraining is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# QRotaryTraining is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with QRotaryTraining. If not, see . +# BASE_DIR=$(dirname "$0") VENV_DIR=$(venvget) diff --git a/utils.py b/utils.py index c58bc06..8f99d16 100644 --- a/utils.py +++ b/utils.py @@ -1,3 +1,23 @@ + +# QRotaryTraining - A novel method for fully training all parameters of large +# language models (llms) while using less device memory than traditional methods. +# Copyright (C) 2024 Carl Philipp Klemm +# +# This file is part of QRotaryTraining. +# +# QRotaryTraining is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# QRotaryTraining is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with QRotaryTraining. If not, see . + from peft.utils import _get_submodules import torch