diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c17b5d9ca..c32089c4a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,7 +30,7 @@ repos: ] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.9.0 + rev: 25.12.0 hooks: - id: black files: (.*\.py)$ @@ -52,17 +52,17 @@ repos: - tomli - repo: https://github.com/crate-ci/typos - rev: v1.38.1 + rev: v1 hooks: - id: typos - repo: https://github.com/pycqa/isort - rev: 6.1.0 + rev: 7.0.0 hooks: - id: isort - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.0 + rev: v0.14.10 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix, --no-cache] diff --git a/auto_round/compressors/mllm/dataset.py b/auto_round/compressors/mllm/dataset.py index 349b8a33f..cf2941350 100644 --- a/auto_round/compressors/mllm/dataset.py +++ b/auto_round/compressors/mllm/dataset.py @@ -68,7 +68,7 @@ def __init__( self, template, model, - tokenzier, + tokenizer, dataset_path, extra_data_dir=None, seqlen=512, @@ -80,7 +80,7 @@ def __init__( self.model = model self.model_type = template.model_type self.template = template - self.tokenizer = tokenzier + self.tokenizer = tokenizer if os.path.exists(dataset_path): logger.info(f"use dataset {dataset_path}, loading from disk...") self.questions = json.load(open(dataset_path, "r")) diff --git a/test/test_cpu/test_mllm.py b/test/test_cpu/test_mllm.py index 2eb1d3e2f..3a91be1ca 100644 --- a/test/test_cpu/test_mllm.py +++ b/test/test_cpu/test_mllm.py @@ -99,11 +99,11 @@ class Myclass: model_type = None dataset = MLLM_DATASET["liuhaotian/llava"]( - template=Myclass(), model=None, tokenzier=None, dataset_path="liuhaotian/llava", seqlen=32, nsamples=32 + template=Myclass(), model=None, tokenizer=None, dataset_path="liuhaotian/llava", seqlen=32, nsamples=32 ) assert len(dataset.questions) == 32 dataset = MLLM_DATASET["liuhaotian/llava"]( - template=Myclass(), model=None, tokenzier=None, dataset_path="liuhaotian/llava", seqlen=2048, nsamples=512 + template=Myclass(), model=None, tokenizer=None, dataset_path="liuhaotian/llava", seqlen=2048, nsamples=512 ) assert len(dataset.questions) == 512