add copyright header
This commit is contained in:
parent
f035d51e42
commit
8a2ef81d17
20
arguments.py
20
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Optional, Self
|
||||
from enum import Enum
|
||||
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
import copy
|
||||
import torch
|
||||
import typing
|
||||
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
from transformers import AutoModelForCausalLM
|
||||
import torch
|
||||
from utils import replace_module
|
||||
|
20
modules.py
20
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
import torch
|
||||
import bitsandbytes as bnb
|
||||
import torch.multiprocessing as multiprocessing
|
||||
|
20
tokenizer.py
20
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
import transformers
|
||||
|
||||
from arguments import ModelArguments
|
||||
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
import transformers
|
||||
import torch
|
||||
from torch.utils import tensorboard
|
||||
|
20
tune.sh
20
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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
BASE_DIR=$(dirname "$0")
|
||||
VENV_DIR=$(venvget)
|
||||
|
20
utils.py
20
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
from peft.utils import _get_submodules
|
||||
import torch
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user