Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -28,12 +28,12 @@ pip install -e .
|
|
28 |
from dmx.compressor.modeling import DmxModel
|
29 |
import lm_eval
|
30 |
|
31 |
-
model_args = "pretrained=
|
32 |
|
33 |
lm = lm_eval.api.registry.get_model("hf").create_from_arg_string(model_args, {"batch_size": 1})
|
34 |
|
35 |
# Transform the model with DMX
|
36 |
-
lm._model = DmxModel.from_torch(lm._model)
|
37 |
|
38 |
-
eval_results = lm_eval.evaluate(lm, lm_eval.tasks.get_task_dict([
|
39 |
```
|
|
|
28 |
from dmx.compressor.modeling import DmxModel
|
29 |
import lm_eval
|
30 |
|
31 |
+
model_args = "pretrained=d-matrix/bert-base,trust_remote_code=True"
|
32 |
|
33 |
lm = lm_eval.api.registry.get_model("hf").create_from_arg_string(model_args, {"batch_size": 1})
|
34 |
|
35 |
# Transform the model with DMX
|
36 |
+
lm._model = DmxModel.from_torch(lm._model)
|
37 |
|
38 |
+
eval_results = lm_eval.evaluate(lm, lm_eval.tasks.get_task_dict(["wikitext"])) # Assign desired task, i.e. "wikitext"
|
39 |
```
|