diff --git a/README.md b/README.md index c2f65650c4ca..837265cf8125 100644 --- a/README.md +++ b/README.md @@ -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 | |:--------------------------------------------:|:---------:|:-----:|:-----:|:---------:|:--------:|:-----------:| @@ -149,7 +149,7 @@ Unified Checkpoint 大模型存储格式在模型参数分布上支持动态扩 ### pip 安装 ```shell -pip install --upgrade paddlenlp==3.0.0b0 +pip install --upgrade paddlenlp==3.0.0b1 ``` 或者可通过以下命令安装最新 develop 分支代码: diff --git a/README_en.md b/README_en.md index af1ecd024533..d665acce36ff 100644 --- a/README_en.md +++ b/README_en.md @@ -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: diff --git a/paddlenlp/__init__.py b/paddlenlp/__init__.py index 8ed4b67b1a4a..888b43e86f6d 100644 --- a/paddlenlp/__init__.py +++ b/paddlenlp/__init__.py @@ -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 diff --git a/setup.py b/setup.py index 2d634ec84b93..479a63386664 100644 --- a/setup.py +++ b/setup.py @@ -14,6 +14,7 @@ import errno import io import os +import re import subprocess from datetime import datetime @@ -110,7 +111,8 @@ 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: @@ -118,6 +120,21 @@ def show(): __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") @@ -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