Skip to content

Commit 0b42c14

Browse files
Update LICENSE and SPDX-License-Identifier as per OSRB guidance (#1244)
Update LICENSE and SPDX-License-Identifier as per OSRB guidance <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated contribution guidelines with expanded license compliance instructions and SPDX identifier guidance. * Extended LICENSE file with new "Third-Party Software Notices" section documenting Apache 2.0, MIT, and BSD 3-Clause licensed components. * **Chores** * Updated SPDX license identifiers across multiple files to reflect dual and triple licensing (Apache 2.0 with MIT and/or BSD 3-Clause). <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
1 parent 5523505 commit 0b42c14

File tree

12 files changed

+138
-12
lines changed

12 files changed

+138
-12
lines changed

CONTRIBUTING.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
Thanks for your interest in contributing to Model Optimizer (ModelOpt)!
44

5+
> [!NOTE]
6+
> Any contributions to this repository are only accepted under the Apache 2.0 license.
7+
58
## 🛠️ Setting up your environment
69

710
Ensure that Model Optimizer (ModelOpt) is installed in editable mode and that all `dev` optional requirements are installed:
@@ -64,11 +67,18 @@ If you are an external contributor, seek guidance from `@NVIDIA/modelopt-setup-c
6467
1. A reference link (with commit hash) to the source from which the code was copied.
6568
1. The original repository's Copyright / License.
6669
1. The NVIDIA Apache 2.0 Copyright / License header.
70+
- **Update `SPDX-License-Identifier`:** If the third-party code uses a different license than Apache 2.0, update the `SPDX-License-Identifier` in the NVIDIA header to reflect both licenses using SPDX expression syntax. For example, for MIT-licensed source code:
71+
72+
```python
73+
# SPDX-License-Identifier: Apache-2.0 AND MIT
74+
```
6775

68-
See [`modelopt/torch/speculative/eagle/utils.py`](./modelopt/torch/speculative/eagle/utils.py)
69-
for an example of the correct license header format.
76+
If the third-party code is also Apache 2.0, no change is needed (`SPDX-License-Identifier: Apache-2.0` remains correct).
77+
- **Update `LICENSE`:** Add the third-party copyright holder to the appropriate license section in the [`LICENSE`](./LICENSE) file under *Third-Party Software Notices*. If the third-party license is not already listed there, add a new section with the full license text.
7078
- **Exclude from license pre-commit hook:** Exclude copied files from the license pre-commit hook so it doesn't auto-add the NVIDIA Apache 2.0 license on top of the file. Add the file path to the `exclude` list in the `insert-license` hook in [`.pre-commit-config.yaml`](./.pre-commit-config.yaml).
7179

80+
See [`modelopt/torch/quantization/utils/calib_utils.py`](./modelopt/torch/quantization/utils/calib_utils.py) for an example of the correct license header format.
81+
7282
## 📝 Writing tests
7383

7484
We use [pytest](https://docs.pytest.org/) for all tests. For any new features / examples, make sure to add tests and that the coverage check in your PR passes. The tests are organized into the following directories:

LICENSE

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,119 @@
199199
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200200
See the License for the specific language governing permissions and
201201
limitations under the License.
202+
203+
================================================================================
204+
Third-Party Software Notices
205+
================================================================================
206+
207+
Portions of this repository contain code adapted from third-party sources.
208+
Each component is subject to the terms of its respective license as set out
209+
below.
210+
211+
--------------------------------------------------------------------------------
212+
Apache License, Version 2.0
213+
--------------------------------------------------------------------------------
214+
215+
Portions of this repository were adapted from code originally authored by
216+
the following copyright holders, licensed under the Apache License, Version 2.0
217+
(see full license text above):
218+
219+
Copyright 2021 The HuggingFace Inc. team
220+
Copyright 2022 The HuggingFace Team
221+
Copyright 2022, Lefebvre Dalloz Services
222+
Copyright 2022 EleutherAI and the HuggingFace Inc. team
223+
Copyright 2023 Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li
224+
Copyright (c) 2024 Heming Xia
225+
Copyright 2025 The Qwen team, Alibaba Group and the HuggingFace Inc. team
226+
227+
Licensed under the Apache License, Version 2.0 (the "License"); you may not
228+
use these files except in compliance with the License. You may obtain a copy
229+
of the License at http://www.apache.org/licenses/LICENSE-2.0
230+
231+
Unless required by applicable law or agreed to in writing, software distributed
232+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
233+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
234+
specific language governing permissions and limitations under the License.
235+
236+
--------------------------------------------------------------------------------
237+
MIT License
238+
--------------------------------------------------------------------------------
239+
240+
Portions of this repository were adapted from code originally authored by
241+
the following copyright holders, licensed under the MIT License:
242+
243+
Copyright (c) Andrei Panferov
244+
Copyright (c) Microsoft Corporation
245+
Copyright (c) 2020 EleutherAI
246+
Copyright (c) 2020 Dan Hendrycks
247+
Copyright (c) 2023 Deep Cognition and Language Research (DeCLaRe) Lab
248+
Copyright (c) 2023 DeepSeek
249+
250+
Permission is hereby granted, free of charge, to any person obtaining a copy
251+
of this software and associated documentation files (the "Software"), to deal
252+
in the Software without restriction, including without limitation the rights
253+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
254+
copies of the Software, and to permit persons to whom the Software is
255+
furnished to do so, subject to the following conditions:
256+
257+
The above copyright notice and this permission notice shall be included in all
258+
copies or substantial portions of the Software.
259+
260+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
261+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
262+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
263+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
264+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
265+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
266+
SOFTWARE.
267+
268+
--------------------------------------------------------------------------------
269+
BSD 3-Clause License
270+
--------------------------------------------------------------------------------
271+
272+
Portions of this repository were adapted from code originally authored by
273+
the following copyright holders, licensed under the BSD 3-Clause License:
274+
275+
Copyright (c) 2016- Facebook, Inc (Adam Paszke)
276+
Copyright (c) 2014- Facebook, Inc (Soumith Chintala)
277+
Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert)
278+
Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu)
279+
Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu)
280+
Copyright (c) 2011-2013 NYU (Clement Farabet)
281+
Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, Iain Melvin, Jason Weston)
282+
Copyright (c) 2006 Idiap Research Institute (Samy Bengio)
283+
Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, Samy Bengio, Johnny Mariethoz)
284+
Copyright (c) 2016-present, Facebook Inc.
285+
Copyright (c) 2016 Facebook Inc.
286+
Copyright (c) 2015 Google Inc.
287+
Copyright (c) 2015 Yangqing Jia
288+
Copyright 2019-2020 Kakao Brain
289+
Copyright (c) 2022 Cruise LLC.
290+
Copyright (c) 2024 Tri Dao.
291+
Copyright (c) 2021, 2023-2024 Arm Limited and/or its affiliates
292+
293+
Redistribution and use in source and binary forms, with or without
294+
modification, are permitted provided that the following conditions are met:
295+
296+
1. Redistributions of source code must retain the above copyright notice,
297+
this list of conditions and the following disclaimer.
298+
299+
2. Redistributions in binary form must reproduce the above copyright notice,
300+
this list of conditions and the following disclaimer in the documentation
301+
and/or other materials provided with the distribution.
302+
303+
3. Neither the names of Facebook, Deepmind Technologies, NYU, NEC Laboratories
304+
America and IDIAP Research Institute nor the names of its contributors may
305+
be used to endorse or promote products derived from this software without
306+
specific prior written permission.
307+
308+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
309+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
310+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
311+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
312+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
313+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
314+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
315+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
316+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
317+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

examples/deepseek/ptq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424

2525
# SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
26-
# SPDX-License-Identifier: Apache-2.0
26+
# SPDX-License-Identifier: Apache-2.0 AND MIT
2727
#
2828
# Licensed under the Apache License, Version 2.0 (the "License");
2929
# you may not use this file except in compliance with the License.

examples/deepseek/quantize_to_nvfp4.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# SOFTWARE.
2323

2424
# SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
25-
# SPDX-License-Identifier: Apache-2.0
25+
# SPDX-License-Identifier: Apache-2.0 AND MIT
2626
#
2727
# Licensed under the Apache License, Version 2.0 (the "License");
2828
# you may not use this file except in compliance with the License.

examples/llm_eval/lm_eval_hf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# SOFTWARE.
2424

2525
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
26-
# SPDX-License-Identifier: Apache-2.0
26+
# SPDX-License-Identifier: Apache-2.0 AND MIT
2727
#
2828
# Licensed under the Apache License, Version 2.0 (the "License");
2929
# you may not use this file except in compliance with the License.

examples/llm_eval/mmlu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# SOFTWARE.
2525

2626
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
27-
# SPDX-License-Identifier: Apache-2.0
27+
# SPDX-License-Identifier: Apache-2.0 AND MIT
2828
#
2929
# Licensed under the Apache License, Version 2.0 (the "License");
3030
# you may not use this file except in compliance with the License.

examples/llm_eval/modeling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# SOFTWARE.
2424

2525
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
26-
# SPDX-License-Identifier: Apache-2.0
26+
# SPDX-License-Identifier: Apache-2.0 AND MIT
2727
#
2828
# Licensed under the Apache License, Version 2.0 (the "License");
2929
# you may not use this file except in compliance with the License.

modelopt/onnx/quantization/operators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# SOFTWARE.
2525

2626
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
27-
# SPDX-License-Identifier: Apache-2.0
27+
# SPDX-License-Identifier: Apache-2.0 AND MIT
2828
#
2929
# Licensed under the Apache License, Version 2.0 (the "License");
3030
# you may not use this file except in compliance with the License.

modelopt/onnx/quantization/ort_patching.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# SOFTWARE.
2626

2727
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
28-
# SPDX-License-Identifier: Apache-2.0
28+
# SPDX-License-Identifier: Apache-2.0 AND MIT
2929
#
3030
# Licensed under the Apache License, Version 2.0 (the "License");
3131
# you may not use this file except in compliance with the License.

modelopt/torch/quantization/export_onnx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
# POSSIBILITY OF SUCH DAMAGE.
8787

8888
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
89-
# SPDX-License-Identifier: Apache-2.0
89+
# SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
9090
#
9191
# Licensed under the Apache License, Version 2.0 (the "License");
9292
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)