Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoAWQ Windows Fix – Get It Running! #704

Open
WackyArt opened this issue Jan 30, 2025 · 0 comments
Open

AutoAWQ Windows Fix – Get It Running! #704

WackyArt opened this issue Jan 30, 2025 · 0 comments

Comments

@WackyArt
Copy link

⚠️ Problem: AutoAWQ Doesn't Work on Windows

Common errors:

  • ModuleNotFoundError: No module named 'autoawq'
  • ModuleNotFoundError: No module named 'awq'
  • RuntimeError: Numpy is not available (NumPy 2.x issue)
  • Triton is missing on Windows
  • Incorrect folder structure & missing __init__.py

✅ Solution – Step-by-Step Fix

🔹 1️⃣ Install AutoAWQ Cleanly

pip uninstall autoawq -y
pip cache purge
pip install git+https://github.com/casper-hansen/AutoAWQ.git --no-deps

Why --no-deps?
→ Prevents pip from installing incompatible dependencies like Triton or NumPy 2.x.


🔹 2️⃣ Fix Folder Structure Manually

📂 Path: C:\Users\USERNAME\env\chatbot\lib\site-packages\autoawq
Correct structure:

autoawq/
│   __init__.py  ✅ (must exist!)
│
└── awq/  ✅ (important – otherwise Python won’t find it!)
    ├── evaluation/
    ├── models/
    ├── modules/
    ├── quantize/
    ├── utils/

If all files are directly inside autoawq/, move them into an awq/ subfolder.


🔹 3️⃣ Fix __init__.py in autoawq

Open:

notepad C:\Users\USERNAME\env\chatbot\lib\site-packages\autoawq\__init__.py

If it contains:

__version__ = "0.2.8"
from awq.models.auto import AutoAWQForCausalLM

Change it to:

import sys
import os

sys.path.append(os.path.dirname(__file__))

__version__ = "0.2.8"
from awq.models.auto import AutoAWQForCausalLM

Why?
→ Ensures Python correctly finds autoawq and doesn’t treat awq as an external module.


🔹 4️⃣ NumPy Fix (Downgrade to a Compatible Version)

pip uninstall numpy -y
pip install numpy==1.26.4

Why?
→ AutoAWQ is not compatible with NumPy 2.x, so we need NumPy 1.x.


🔹 5️⃣ Final Test – Does It Work?

python -c "import autoawq; print('AutoAWQ successfully installed!')"

🎉 If no errors appear – Congrats, it works! 🎉


🔥 Summary

  • AutoAWQ is not optimized for Windows, but this fix makes it work.
  • Main issues: Wrong folder structure, missing paths, NumPy 2.x conflicts.
  • With this fix, AutoAWQ runs properly on Windows!

🚀 Now you’re ready to use AutoAWQ in your chatbot or other AI projects!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant