Upload 2 files
Browse filesUpdate LICENSE.
- configuration_qwen2.py +4 -0
- modeling_qwen2.py +5 -0
configuration_qwen2.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
# coding=utf-8
|
|
|
|
| 2 |
# Copyright 2024 The Qwen team, Alibaba Group and the HuggingFace Inc. team. All rights reserved.
|
| 3 |
#
|
| 4 |
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -12,6 +13,9 @@
|
|
| 12 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
# See the License for the specific language governing permissions and
|
| 14 |
# limitations under the License.
|
|
|
|
|
|
|
|
|
|
| 15 |
""" Qwen2 model configuration"""
|
| 16 |
|
| 17 |
from transformers import PretrainedConfig
|
|
|
|
| 1 |
# coding=utf-8
|
| 2 |
+
# The following code are reused from the QWen project (https://huggingface.co/Qwen/Qwen2.5-14B-Instruct) of Alibaba Cloud.
|
| 3 |
# Copyright 2024 The Qwen team, Alibaba Group and the HuggingFace Inc. team. All rights reserved.
|
| 4 |
#
|
| 5 |
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
| 13 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
# See the License for the specific language governing permissions and
|
| 15 |
# limitations under the License.
|
| 16 |
+
|
| 17 |
+
# The code is modified by ByteDance and Tsinghua University from the original implementation of Qwen:
|
| 18 |
+
# - We changed Qwen2Config to Qwen2TSConfig to support time series modeling.
|
| 19 |
""" Qwen2 model configuration"""
|
| 20 |
|
| 21 |
from transformers import PretrainedConfig
|
modeling_qwen2.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
# coding=utf-8
|
|
|
|
| 2 |
# Copyright 2024 The Qwen team, Alibaba Group and the HuggingFace Inc. team. All rights reserved.
|
| 3 |
#
|
| 4 |
# This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
|
|
@@ -17,6 +18,10 @@
|
|
| 17 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 18 |
# See the License for the specific language governing permissions and
|
| 19 |
# limitations under the License.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
""" PyTorch Qwen2 model."""
|
| 21 |
import inspect
|
| 22 |
import math
|
|
|
|
| 1 |
# coding=utf-8
|
| 2 |
+
# The following code are reused from the QWen project (https://huggingface.co/Qwen/Qwen2.5-14B-Instruct) of Alibaba Cloud.
|
| 3 |
# Copyright 2024 The Qwen team, Alibaba Group and the HuggingFace Inc. team. All rights reserved.
|
| 4 |
#
|
| 5 |
# This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
|
|
|
|
| 18 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 19 |
# See the License for the specific language governing permissions and
|
| 20 |
# limitations under the License.
|
| 21 |
+
|
| 22 |
+
# The code is modified by ByteDance and Tsinghua University from the original implementation of Qwen:
|
| 23 |
+
# - Support time series modality for Qwen2 model.
|
| 24 |
+
|
| 25 |
""" PyTorch Qwen2 model."""
|
| 26 |
import inspect
|
| 27 |
import math
|