A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 17, 09:15 UTC
Add copyright headers for HF models (#103)
Woosuk Kwon committed
May 14, 2023 at 21:54 UTC
707ec647bb3a5018e5d8cdded409d6244bbb9ea5
4 files changed
+74
cacheflow/model_executor/models/gpt2.py
+18
@@ -1,3 +1,21 @@
1
+# coding=utf-8
2
+# Copyright 2023 The CacheFlow team.
3
+# Adapted from https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/gpt2/modeling_gpt2.py
4
+#
5
+# Copyright 2018 The OpenAI Team Authors and HuggingFace Inc. team.
6
+# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
7
+#
8
+# Licensed under the Apache License, Version 2.0 (the "License");
9
+# you may not use this file except in compliance with the License.
10
+# You may obtain a copy of the License at
11
+#
12
+# http://www.apache.org/licenses/LICENSE-2.0
13
+#
14
+# Unless required by applicable law or agreed to in writing, software
15
+# distributed under the License is distributed on an "AS IS" BASIS,
16
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+# See the License for the specific language governing permissions and
18
+# limitations under the License.
19
"""1D GPT-2 model compatible with HuggingFace weights."""
20
from typing import Dict, List, Optional, Tuple
21
cacheflow/model_executor/models/gpt_neox.py
+17
@@ -1,3 +1,20 @@
1
+# coding=utf-8
2
+# Copyright 2023 The CacheFlow team.
3
+# Adapted from https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/gpt_neox/modeling_gpt_neox.py
4
+#
5
+# Copyright 2022 EleutherAI The HuggingFace Inc. team. All rights reserved.
6
+#
7
+# Licensed under the Apache License, Version 2.0 (the "License");
8
+# you may not use this file except in compliance with the License.
9
+# You may obtain a copy of the License at
10
+#
11
+# http://www.apache.org/licenses/LICENSE-2.0
12
+#
13
+# Unless required by applicable law or agreed to in writing, software
14
+# distributed under the License is distributed on an "AS IS" BASIS,
15
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+# See the License for the specific language governing permissions and
17
+# limitations under the License.
18
"""1D GPT-NeoX model compatible with HuggingFace weights."""
19
from typing import Dict, List, Optional, Tuple
20
cacheflow/model_executor/models/llama.py
+22
@@ -1,3 +1,25 @@
1
+# coding=utf-8
2
+# Copyright 2023 The CacheFlow team.
3
+# Adapted from https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
4
+#
5
+# Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved.
6
+#
7
+# This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
8
+# and OPT implementations in this library. It has been modified from its
9
+# original forms to accommodate minor architectural differences compared
10
+# to GPT-NeoX and OPT used by the Meta AI team that trained the model.
11
+#
12
+# Licensed under the Apache License, Version 2.0 (the "License");
13
+# you may not use this file except in compliance with the License.
14
+# You may obtain a copy of the License at
15
+#
16
+# http://www.apache.org/licenses/LICENSE-2.0
17
+#
18
+# Unless required by applicable law or agreed to in writing, software
19
+# distributed under the License is distributed on an "AS IS" BASIS,
20
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+# See the License for the specific language governing permissions and
22
+# limitations under the License.
23
"""1D LLaMA model compatible with HuggingFace weights."""
24
from typing import Dict, List, Optional, Tuple
25
cacheflow/model_executor/models/opt.py
+17
@@ -1,3 +1,20 @@
1
+# coding=utf-8
2
+# Copyright 2023 The CacheFlow team.
3
+# Adapted from https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/opt/modeling_opt.py
4
+#
5
+# Copyright 2022 The Fairseq Authors and The HuggingFace Inc. team. All rights reserved.
6
+#
7
+# Licensed under the Apache License, Version 2.0 (the "License");
8
+# you may not use this file except in compliance with the License.
9
+# You may obtain a copy of the License at
10
+#
11
+# http://www.apache.org/licenses/LICENSE-2.0
12
+#
13
+# Unless required by applicable law or agreed to in writing, software
14
+# distributed under the License is distributed on an "AS IS" BASIS,
15
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+# See the License for the specific language governing permissions and
17
+# limitations under the License.
18
"""1D OPT model compatible with HuggingFace weights."""
19
from typing import Dict, List, Optional, Tuple
20