Skip to content

Commit 723aa3d

Browse files
DrownFish19Mangodadada
authored andcommitted
[Version] update version info (PaddlePaddle#9060)
* update version * update * update * update
1 parent fd9adf0 commit 723aa3d

File tree

4 files changed

+29
-6
lines changed

4 files changed

+29
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Unified Checkpoint 大模型存储格式在模型参数分布上支持动态扩
127127
| Yuan2 |||| 🚧 | 🚧 | 🚧 | 🚧 ||
128128
------------------------------------------------------------------------------------------
129129

130-
* [大模型推理](./llm/docs/predict/inference.md)已支持 LLaMA 系列、Qwen 系列、Mistral 系列、ChatGLM 系列、Bloom 系列和Baichuan 系列,支持Weight Only INT8及INT4推理,支持WAC(权重、激活、Cache KV)进行INT8、FP8量化的推理,【LLM】模型推理支持列表如下:
130+
* [大模型推理](./llm/docs/predict/inference.md)已支持 LLaMA 系列、Qwen 系列、Mistral 系列、ChatGLM 系列、Bloom 系列和 Baichuan 系列,支持 Weight Only INT8及 INT4推理,支持 WAC(权重、激活、Cache KV)进行 INT8、FP8量化的推理,【LLM】模型推理支持列表如下:
131131

132132
| 模型名称/量化类型支持 | FP16/BF16 | WINT8 | WINT4 | INT8-A8W8 | FP8-A8W8 | INT8-A8W8C8 |
133133
|:--------------------------------------------:|:---------:|:-----:|:-----:|:---------:|:--------:|:-----------:|
@@ -149,7 +149,7 @@ Unified Checkpoint 大模型存储格式在模型参数分布上支持动态扩
149149
### pip 安装
150150

151151
```shell
152-
pip install --upgrade paddlenlp==3.0.0b0
152+
pip install --upgrade paddlenlp==3.0.0b1
153153
```
154154

155155
或者可通过以下命令安装最新 develop 分支代码:

README_en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Detailed list 👉 [Supported Model List](https://github.com/PaddlePaddle/Paddle
6868
### Pip Installation
6969

7070
```shell
71-
pip install --upgrade paddlenlp==3.0.0b0
71+
pip install --upgrade paddlenlp==3.0.0b1
7272
```
7373

7474
or you can install the latest develop branch code with the following command:

paddlenlp/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,18 @@
1818

1919
PADDLENLP_STABLE_VERSION = "PADDLENLP_STABLE_VERSION"
2020

21-
22-
__version__ = "3.0.0b0.post"
21+
# this version is used for develop and test.
22+
# release version will be added fixed version by setup.py.
23+
__version__ = "3.0.0b1.post"
2324
if os.getenv(PADDLENLP_STABLE_VERSION):
2425
__version__ = __version__.replace(".post", "")
2526
else:
2627
formatted_date = datetime.now().date().strftime("%Y%m%d")
2728
__version__ = __version__.replace(".post", ".post{}".format(formatted_date))
2829

30+
# the next line will be replaced by setup.py for release version.
31+
# [VERSION_INFO]
32+
2933
if "datasets" in sys.modules.keys():
3034
from paddlenlp.utils.log import logger
3135

setup.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import errno
1515
import io
1616
import os
17+
import re
1718
import subprocess
1819
from datetime import datetime
1920

@@ -110,14 +111,30 @@ def show():
110111
f.write(content)
111112

112113

113-
__version__ = "3.0.0b0.post"
114+
# only use this file to contral the version
115+
__version__ = "3.0.0b1.post"
114116
if os.getenv(PADDLENLP_STABLE_VERSION):
115117
__version__ = __version__.replace(".post", "")
116118
else:
117119
formatted_date = datetime.now().date().strftime("%Y%m%d")
118120
__version__ = __version__.replace(".post", ".post{}".format(formatted_date))
119121

120122

123+
# write the version information for the develop version
124+
def append_version_py(filename="paddlenlp/__init__.py"):
125+
assert os.path.exists(filename), f"{filename} does not exist!"
126+
127+
with open(filename, "r") as file:
128+
file_content = file.read()
129+
130+
pattern = r"^# \[VERSION_INFO\].*$"
131+
modified_content = re.sub(pattern, f'\n__version__ = "{__version__}"\n\n', file_content, flags=re.MULTILINE)
132+
with open(filename, "w") as file:
133+
file.write(modified_content)
134+
135+
136+
append_version_py(filename="paddlenlp/__init__.py")
137+
121138
extras = {}
122139
REQUIRED_PACKAGES = read_requirements_file("requirements.txt")
123140
extras["tests"] = read_requirements_file("tests/requirements.txt")
@@ -197,6 +214,8 @@ def get_package_data_files(package, data, package_dir=None):
197214
)
198215
except Exception as e:
199216
git_checkout(paddlenlp_dir, "paddlenlp/version/__init__.py") if commit != "unknown" else None
217+
git_checkout(paddlenlp_dir, "paddlenlp/__init__.py") if commit != "unknown" else None
200218
raise e
201219

202220
git_checkout(paddlenlp_dir, "paddlenlp/version/__init__.py") if commit != "unknown" else None
221+
git_checkout(paddlenlp_dir, "paddlenlp/__init__.py") if commit != "unknown" else None

0 commit comments

Comments
 (0)