Skip to content

Commit

Permalink
Use absolute imports (#90)
Browse files Browse the repository at this point in the history
- Switch to absolute imports to ensure `vptq.ops` is correctly located
on a local setup.
- Allow running `vptq` as a script without requiring the `-m` flag.
- Resolve Issue #89 where CUDA kernel is not found in local setups.

---------

Co-authored-by: Yang Wang <wyatuestc@gmail.com>
  • Loading branch information
bndos and YangWang92 authored Oct 28, 2024
1 parent 1c6b87e commit 64d3461
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vptq/layers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Licensed under the MIT License.
# --------------------------------------------------------------------------

from vptq.model_base import AutoModelForCausalLM as AutoModelForCausalLM
from vptq.layers.model_base import AutoModelForCausalLM as AutoModelForCausalLM
2 changes: 1 addition & 1 deletion vptq/layers/model_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import transformers
from tqdm import tqdm

from vptq.vqlinear import VQuantLinear
from vptq.layers.vqlinear import VQuantLinear


def set_op_by_name(layer, name, new_module):
Expand Down

0 comments on commit 64d3461

Please sign in to comment.