Skip to content

Commit

Permalink
[Version] update version info (#9060)
Browse files Browse the repository at this point in the history
* update version

* update

* update

* update
  • Loading branch information
DrownFish19 authored Sep 3, 2024
1 parent 84469d6 commit a4fbc52
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Unified Checkpoint 大模型存储格式在模型参数分布上支持动态扩
| Yuan2 |||| 🚧 | 🚧 | 🚧 | 🚧 ||
------------------------------------------------------------------------------------------

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

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

```shell
pip install --upgrade paddlenlp==3.0.0b0
pip install --upgrade paddlenlp==3.0.0b1
```

或者可通过以下命令安装最新 develop 分支代码:
Expand Down
2 changes: 1 addition & 1 deletion README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Detailed list 👉 [Supported Model List](https://github.com/PaddlePaddle/Paddle
### Pip Installation

```shell
pip install --upgrade paddlenlp==3.0.0b0
pip install --upgrade paddlenlp==3.0.0b1
```

or you can install the latest develop branch code with the following command:
Expand Down
8 changes: 6 additions & 2 deletions paddlenlp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,18 @@

PADDLENLP_STABLE_VERSION = "PADDLENLP_STABLE_VERSION"


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

# the next line will be replaced by setup.py for release version.
# [VERSION_INFO]

if "datasets" in sys.modules.keys():
from paddlenlp.utils.log import logger

Expand Down
21 changes: 20 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import errno
import io
import os
import re
import subprocess
from datetime import datetime

Expand Down Expand Up @@ -110,14 +111,30 @@ def show():
f.write(content)


__version__ = "3.0.0b0.post"
# only use this file to contral the version
__version__ = "3.0.0b1.post"
if os.getenv(PADDLENLP_STABLE_VERSION):
__version__ = __version__.replace(".post", "")
else:
formatted_date = datetime.now().date().strftime("%Y%m%d")
__version__ = __version__.replace(".post", ".post{}".format(formatted_date))


# write the version information for the develop version
def append_version_py(filename="paddlenlp/__init__.py"):
assert os.path.exists(filename), f"{filename} does not exist!"

with open(filename, "r") as file:
file_content = file.read()

pattern = r"^# \[VERSION_INFO\].*$"
modified_content = re.sub(pattern, f'\n__version__ = "{__version__}"\n\n', file_content, flags=re.MULTILINE)
with open(filename, "w") as file:
file.write(modified_content)


append_version_py(filename="paddlenlp/__init__.py")

extras = {}
REQUIRED_PACKAGES = read_requirements_file("requirements.txt")
extras["tests"] = read_requirements_file("tests/requirements.txt")
Expand Down Expand Up @@ -197,6 +214,8 @@ def get_package_data_files(package, data, package_dir=None):
)
except Exception as e:
git_checkout(paddlenlp_dir, "paddlenlp/version/__init__.py") if commit != "unknown" else None
git_checkout(paddlenlp_dir, "paddlenlp/__init__.py") if commit != "unknown" else None
raise e

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

0 comments on commit a4fbc52

Please sign in to comment.