File tree 1 file changed +20
-3
lines changed 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change 1
1
import torch
2
2
3
3
from transformers import AutoModelForCausalLM , AutoTokenizer
4
+ try :
5
+ from lm_eval .models .huggingface import HFLM
6
+ from lm_eval .evaluator import evaluate
7
+ from lm_eval .tasks import get_task_dict
8
+ except ImportError as e :
9
+ print ("""
10
+ Error: The 'lm_eval' module was not found.
11
+ To install, follow these steps:
4
12
5
- from lm_eval .models .huggingface import HFLM
6
- from lm_eval .evaluator import evaluate
7
- from lm_eval .tasks import get_task_dict
13
+ 1. Clone the repository:
14
+ git clone https://github.com/EleutherAI/lm-evaluation-harness
15
+
16
+ 2. Change to the cloned directory:
17
+ cd lm-evaluation-harness
18
+
19
+ 3. Install the package in editable mode:
20
+ pip install -e .
21
+
22
+ After installation, re-run this script to use the LM Evaluation Harness.
23
+ """ )
24
+ raise # Re-raise the ImportError
8
25
9
26
from torchao .quantization .quant_api import (
10
27
change_linear_weights_to_int4_woqtensors ,
You can’t perform that action at this time.
0 commit comments