Skip to content

Commit

Permalink
Fixes for sparseml.evaluate (#2292)
Browse files Browse the repository at this point in the history
* fix imports

* revert hardcoded value
  • Loading branch information
Sara Adkins authored May 17, 2024
1 parent 513c338 commit dd1edd4
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/sparseml/evaluation/integrations/lm_evaluation_harness.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@
try:
# This needs to be imported after lm_eval to ensure right transformers
# version is installed for SparseML
from sparseml.transformers.utils.sparse_config import SparseAutoConfig
from sparseml.transformers.utils.sparse_model import SparseAutoModelForCausalLM
from sparseml.transformers.utils.sparse_tokenizer import SparseAutoTokenizer
from sparseml.transformers import SparseAutoTokenizer
from sparseml.transformers.sparsification.sparse_config import SparseAutoConfig
from sparseml.transformers.sparsification.sparse_model import (
SparseAutoModelForCausalLM,
)
except ImportError as import_error:
raise ImportError(
"Install sparseml supported dependencies for lm-eval integration by running "
"`pip uninstall transformers && pip install sparseml[transformers,torch]`"
) from import_error
raise import_error

__all__ = ["lm_eval_harness", "SparseMLLM"]
_LOGGER = logging.getLogger(__name__)
Expand Down

0 comments on commit dd1edd4

Please sign in to comment.