Merge branch 'PanQiWei:main' into main

This commit is contained in:
qwopqwop200 2023-08-17 15:22:43 +09:00 committed by GitHub
commit f23a06f911
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 43 additions and 28 deletions

View file

@ -28,30 +28,42 @@ jobs:
with: with:
python-version: ${{ matrix.python }} python-version: ${{ matrix.python }}
- name: Free disk space # - name: Free disk space
run: | # run: |
df -h # df -h
echo "Removing large packages" # echo "Removing large packages"
sudo apt-get remove -y '^dotnet-.*' # sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y 'php.*' # sudo apt-get remove -y 'php.*'
sudo apt-get remove -y azure-cli google-cloud-sdk google-chrome-stable firefox powershell mono-devel # sudo apt-get remove -y azure-cli google-cloud-sdk google-chrome-stable firefox powershell mono-devel
df -h # df -h
sudo apt-get autoremove -y >/dev/null 2>&1 # sudo apt-get autoremove -y >/dev/null 2>&1
sudo apt-get clean # sudo apt-get clean
sudo apt-get autoremove -y >/dev/null 2>&1 # sudo apt-get autoremove -y >/dev/null 2>&1
sudo apt-get autoclean -y >/dev/null 2>&1 # sudo apt-get autoclean -y >/dev/null 2>&1
df -h # df -h
echo "https://github.com/actions/virtual-environments/issues/709" # echo "https://github.com/actions/virtual-environments/issues/709"
sudo rm -rf "$AGENT_TOOLSDIRECTORY" # sudo rm -rf "$AGENT_TOOLSDIRECTORY"
df -h # df -h
echo "remove big /usr/local" # echo "remove big /usr/local"
sudo rm -rf "/usr/local/share/boost" # sudo rm -rf "/usr/local/share/boost"
sudo rm -rf /usr/local/lib/android >/dev/null 2>&1 # sudo rm -rf /usr/local/lib/android >/dev/null 2>&1
df -h # df -h
sudo rm -rf /usr/share/dotnet/sdk > /dev/null 2>&1 # sudo rm -rf /usr/share/dotnet/sdk > /dev/null 2>&1
sudo rm -rf /usr/share/dotnet/shared > /dev/null 2>&1 # sudo rm -rf /usr/share/dotnet/shared > /dev/null 2>&1
sudo rm -rf /usr/share/swift > /dev/null 2>&1 # sudo rm -rf /usr/share/swift > /dev/null 2>&1
df -h # df -h
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2.2.0
with:
activate-environment: "build"
python-version: ${{ matrix.python }}
mamba-version: "*"
use-mamba: false
channels: conda-forge,defaults
channel-priority: true
add-pip-as-python-dependency: true
auto-activate-base: false
- name: Set up environment - name: Set up environment
run: | run: |
@ -66,16 +78,19 @@ jobs:
curl -O https://repo.radeon.com/amdgpu-install/${{ matrix.rocm }}/ubuntu/jammy/$ROCM_DL_FILE curl -O https://repo.radeon.com/amdgpu-install/${{ matrix.rocm }}/ubuntu/jammy/$ROCM_DL_FILE
sudo dpkg -i $ROCM_DL_FILE sudo dpkg -i $ROCM_DL_FILE
sudo DEBIAN_FRONTEND=noninteractive amdgpu-install --usecase=rocm --no-dkms --no-32 -y sudo DEBIAN_FRONTEND=noninteractive amdgpu-install --usecase=rocm --no-dkms --no-32 -y
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y --no-install-recommends rocsparse-dev rocthrust-dev rocblas-dev hipblas-dev hipsparse-dev sudo apt-get install -y --no-install-recommends rocsparse-dev rocthrust-dev rocblas-dev hipblas-dev hipsparse-dev
python -m pip install torch --index-url https://download.pytorch.org/whl/rocm${{ matrix.rocm }}
python -m pip install --upgrade build setuptools wheel ninja python -m pip install --upgrade build setuptools wheel ninja
python -m pip install torch --index-url https://download.pytorch.org/whl/rocm${{ matrix.rocm }}
- name: Build wheels - name: Build wheels
run: | run: |
ROCM_VERSION=${{ matrix.rocm }} python setup.py sdist bdist_wheel ROCM_VERSION=${{ matrix.rocm }} python setup.py sdist bdist_wheel
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: 'linux-rocm-wheels' name: 'linux-rocm-wheels'

View file

@ -1,4 +1,4 @@
__version__ = "0.4.0" __version__ = "0.4.1"
from .modeling import BaseQuantizeConfig from .modeling import BaseQuantizeConfig
from .modeling import AutoGPTQForCausalLM from .modeling import AutoGPTQForCausalLM
from .utils.peft_utils import get_gptq_peft_model from .utils.peft_utils import get_gptq_peft_model

View file

@ -79,7 +79,7 @@ class FusedLlamaAttentionForQuantizedModel(FusedBaseAttentionModule):
past_key_value = (key_states, value_states) if use_cache else None past_key_value = (key_states, value_states) if use_cache else None
if compare_pytorch_version("v2.0.0", op="eq"): if compare_pytorch_version("v2.0.0", op="ge"):
attn_output = F.scaled_dot_product_attention( attn_output = F.scaled_dot_product_attention(
query_states, query_states,
key_states, key_states,

View file

@ -9,7 +9,7 @@ os.environ["CC"] = "g++"
os.environ["CXX"] = "g++" os.environ["CXX"] = "g++"
common_setup_kwargs = { common_setup_kwargs = {
"version": "0.4.0", "version": "0.4.1",
"name": "auto_gptq", "name": "auto_gptq",
"author": "PanQiWei", "author": "PanQiWei",
"description": "An easy-to-use LLMs quantization package with user-friendly apis, based on GPTQ algorithm.", "description": "An easy-to-use LLMs quantization package with user-friendly apis, based on GPTQ algorithm.",