[Misc] Add SPDX-License-Identifier headers to python source files (#12628)

- **Add SPDX license headers to python source files**
- **Check for SPDX headers using pre-commit**

commit 9d7ef44c3cfb72ca4c32e1c677d99259d10d4745
Author: Russell Bryant <rbryant@redhat.com>
Date:   Fri Jan 31 14:18:24 2025 -0500

    Add SPDX license headers to python source files
    
This commit adds SPDX license headers to python source files as
recommended to
the project by the Linux Foundation. These headers provide a concise way
that is
both human and machine readable for communicating license information
for each
source file. It helps avoid any ambiguity about the license of the code
and can
    also be easily used by tools to help manage license compliance.
    
The Linux Foundation runs license scans against the codebase to help
ensure
    we are in compliance with the licenses of the code we use, including
dependencies. Having these headers in place helps that tool do its job.
    
    More information can be found on the SPDX site:
    
    - https://spdx.dev/learn/handling-license-info/
    
    Signed-off-by: Russell Bryant <rbryant@redhat.com>

commit 5a1cf1cb3b80759131c73f6a9dddebccac039dea
Author: Russell Bryant <rbryant@redhat.com>
Date:   Fri Jan 31 14:36:32 2025 -0500

    Check for SPDX headers using pre-commit
    
    Signed-off-by: Russell Bryant <rbryant@redhat.com>

---------

Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
Russell Bryant
2025-02-02 14:58:18 -05:00
committed by GitHub
parent f256ebe4df
commit e489ad7a21
1012 changed files with 1884 additions and 2 deletions

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from vllm.transformers_utils.configs.chatglm import ChatGLMConfig
from vllm.transformers_utils.configs.cohere2 import Cohere2Config
from vllm.transformers_utils.configs.dbrx import DbrxConfig

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# yapf: disable
# ruff: noqa: E501
# coding=utf-8

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Adapted from
# https://github.com/THUDM/ChatGLM2-6B
from transformers import PretrainedConfig

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# ruff: noqa
# Adapted from

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# yapf: disable
# ruff: noqa: E501
# coding=utf-8

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# adapted from https://github.com/deepseek-ai/DeepSeek-VL2/blob/faf18023f24b962b32d9f0a2d89e402a8d383a78/deepseek_vl2/models/modeling_deepseek_vl_v2.py#L115-L268
from typing import Tuple

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import os
from typing import Optional, Union

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Copied from
# https://huggingface.co/LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct/blob/main/configuration_exaone.py
# Copyright 2021 The LG AI Research EXAONE Lab. All rights reserved.

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Adapted from
# https://huggingface.co/tiiuae/falcon-7b/blob/main/configuration_RW.py
# Copyright 2023 The vLLM team.

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Adapted from
# https://huggingface.co/h2oai/h2ovl-mississippi-2b/blob/main/configuration_h2ovl_chat.py
# --------------------------------------------------------

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Adapted from
# https://huggingface.co/OpenGVLab/InternVL2-1B/blob/main/configuration_internvl_chat.py
# --------------------------------------------------------

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2023 The OpenAI Team Authors and HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
# Copyright 2023 Cerebras Systems.

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
import os
from typing import Optional, Union

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from transformers.models.mllama import configuration_mllama as mllama_hf_config

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
from typing import List, Optional
from transformers import PretrainedConfig

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Copied from
# https://huggingface.co/mosaicml/mpt-7b/blob/main/configuration_mpt.py
"""A HuggingFace-style model configuration."""

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2024 HuggingFace Inc. team. All rights reserved.
# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.
#

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Adapted from
# https://huggingface.co/nvidia/NVLM-D-72B/blob/main/configuration_nvlm_d.py
# --------------------------------------------------------

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# yapf: disable
# ruff: noqa: E501
# coding=utf-8

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved.
#
# This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# adapted from https://www.modelscope.cn/models/TeleAI/TeleChat2-3B/resolve/master/configuration_telechat2.py
""" Telechat configuration compatible with LlamaConfig. """

View File

@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Adapted from https://github.com/fixie-ai/ultravox/blob/ecd58c4041030bae2ad15aa6bcf04ab43199ea02/ultravox/model/ultravox_config.py
from typing import Any, Dict, Optional