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 to source files adapted from FT (#104)
Woosuk Kwon committed
May 14, 2023 at 22:19 UTC
667ba3995c013df060657a4cdf3931176c6c5259
11 files changed
+126
-8
cacheflow/model_executor/models/gpt2.py
+1
-2
@@ -1,7 +1,6 @@
1
# coding=utf-8
2
-# Copyright 2023 The CacheFlow team.
2
# Adapted from https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/gpt2/modeling_gpt2.py
4
-#
3
+# Copyright 2023 The CacheFlow team.
4
# Copyright 2018 The OpenAI Team Authors and HuggingFace Inc. team.
5
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
6
#
cacheflow/model_executor/models/gpt_neox.py
+1
-2
@@ -1,7 +1,6 @@
1
# coding=utf-8
2
-# Copyright 2023 The CacheFlow team.
2
# Adapted from https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/gpt_neox/modeling_gpt_neox.py
4
-#
3
+# Copyright 2023 The CacheFlow team.
4
# Copyright 2022 EleutherAI The HuggingFace Inc. team. All rights reserved.
5
#
6
# Licensed under the Apache License, Version 2.0 (the "License");
cacheflow/model_executor/models/llama.py
+1
-2
@@ -1,7 +1,6 @@
1
# coding=utf-8
2
-# Copyright 2023 The CacheFlow team.
2
# Adapted from https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
4
-#
3
+# Copyright 2023 The CacheFlow team.
4
# Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved.
5
#
6
# This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
cacheflow/model_executor/models/opt.py
+1
-2
@@ -1,7 +1,6 @@
1
# coding=utf-8
2
-# Copyright 2023 The CacheFlow team.
2
# Adapted from https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/opt/modeling_opt.py
4
-#
3
+# Copyright 2023 The CacheFlow team.
4
# Copyright 2022 The Fairseq Authors and The HuggingFace Inc. team. All rights reserved.
5
#
6
# Licensed under the Apache License, Version 2.0 (the "License");
csrc/attention/attention_generic.cuh
+17
@@ -1,3 +1,20 @@
1
+/*
2
+ * Adapted from https://github.com/NVIDIA/FasterTransformer/blob/release/v5.3_tag/src/fastertransformer/kernels/decoder_masked_multihead_attention_utils.h
3
+ * Copyright (c) 2023, The CacheFlow team.
4
+ * Copyright (c) 2020-2023, NVIDIA CORPORATION. All rights reserved.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
#pragma once
19
20
#include <stdint.h>
csrc/attention/attention_kernels.cu
+17
@@ -1,3 +1,20 @@
1
+/*
2
+ * Adapted from https://github.com/NVIDIA/FasterTransformer/blob/release/v5.3_tag/src/fastertransformer/kernels/decoder_masked_multihead_attention/decoder_masked_multihead_attention_template.hpp
3
+ * Copyright (c) 2023, The CacheFlow team.
4
+ * Copyright (c) 2020-2023, NVIDIA CORPORATION. All rights reserved.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
#include <torch/extension.h>
19
#include <ATen/cuda/CUDAContext.h>
20
csrc/attention/attention_utils.cuh
+17
@@ -1,3 +1,20 @@
1
+/*
2
+ * Adapted from https://github.com/NVIDIA/FasterTransformer/blob/release/v5.3_tag/src/fastertransformer/kernels/decoder_masked_multihead_attention/decoder_masked_multihead_attention_template.hpp
3
+ * Copyright (c) 2023, The CacheFlow team.
4
+ * Copyright (c) 2020-2023, NVIDIA CORPORATION. All rights reserved.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
#pragma once
19
20
#include "attention_dtypes.h"
csrc/attention/dtype_bfloat16.cuh
+18
@@ -1,3 +1,21 @@
1
+/*
2
+ * Adapted from https://github.com/NVIDIA/FasterTransformer/blob/release/v5.3_tag/src/fastertransformer/kernels/decoder_masked_multihead_attention/decoder_masked_multihead_attention_template.hpp
3
+ * and https://github.com/NVIDIA/FasterTransformer/blob/release/v5.3_tag/src/fastertransformer/kernels/decoder_masked_multihead_attention_utils.h
4
+ * Copyright (c) 2023, The CacheFlow team.
5
+ * Copyright (c) 2020-2023, NVIDIA CORPORATION. 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
+ */
19
#pragma once
20
21
#include "attention_generic.cuh"
csrc/attention/dtype_float16.cuh
+18
@@ -1,3 +1,21 @@
1
+/*
2
+ * Adapted from https://github.com/NVIDIA/FasterTransformer/blob/release/v5.3_tag/src/fastertransformer/kernels/decoder_masked_multihead_attention/decoder_masked_multihead_attention_template.hpp
3
+ * and https://github.com/NVIDIA/FasterTransformer/blob/release/v5.3_tag/src/fastertransformer/kernels/decoder_masked_multihead_attention_utils.h
4
+ * Copyright (c) 2023, The CacheFlow team.
5
+ * Copyright (c) 2020-2023, NVIDIA CORPORATION. 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
+ */
19
#pragma once
20
21
#include "attention_generic.cuh"
csrc/attention/dtype_float32.cuh
+18
@@ -1,3 +1,21 @@
1
+/*
2
+ * Adapted from https://github.com/NVIDIA/FasterTransformer/blob/release/v5.3_tag/src/fastertransformer/kernels/decoder_masked_multihead_attention/decoder_masked_multihead_attention_template.hpp
3
+ * and https://github.com/NVIDIA/FasterTransformer/blob/release/v5.3_tag/src/fastertransformer/kernels/decoder_masked_multihead_attention_utils.h
4
+ * Copyright (c) 2023, The CacheFlow team.
5
+ * Copyright (c) 2020-2023, NVIDIA CORPORATION. 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
+ */
19
#pragma once
20
21
#include "attention_generic.cuh"
csrc/reduction_utils.cuh
+17
@@ -1,3 +1,20 @@
1
+/*
2
+ * Adapted from https://github.com/NVIDIA/FasterTransformer/blob/release/v5.3_tag/src/fastertransformer/kernels/reduce_kernel_utils.cuh
3
+ * Copyright (c) 2023, The CacheFlow team.
4
+ * Copyright (c) 2020-2023, NVIDIA CORPORATION. All rights reserved.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
#pragma once
19
20
namespace cacheflow {