feat: added LoRA copyright notice
Browse files- modeling_lora.py +20 -0
modeling_lora.py
CHANGED
|
@@ -29,6 +29,26 @@ def initialized_weights(
|
|
| 29 |
|
| 30 |
|
| 31 |
class LoRAParametrization(nn.Module):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
def __init__(
|
| 33 |
self,
|
| 34 |
fan_in: int,
|
|
|
|
| 29 |
|
| 30 |
|
| 31 |
class LoRAParametrization(nn.Module):
|
| 32 |
+
"""
|
| 33 |
+
This LoRA implementation was inspired by https://github.com/cccntu/minLoRA
|
| 34 |
+
|
| 35 |
+
The MIT License (MIT) Copyright (c) 2020 Andrej Karpathy
|
| 36 |
+
|
| 37 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
| 38 |
+
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
| 39 |
+
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
| 40 |
+
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
| 41 |
+
subject to the following conditions:
|
| 42 |
+
|
| 43 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial
|
| 44 |
+
portions of the Software.
|
| 45 |
+
|
| 46 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
| 47 |
+
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
| 48 |
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
| 49 |
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
| 50 |
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 51 |
+
"""
|
| 52 |
def __init__(
|
| 53 |
self,
|
| 54 |
fan_in: int,
|