Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -50,12 +50,12 @@ pip install -e .
|
|
50 |
from dmx.compressor.modeling import DmxModel
|
51 |
import lm_eval
|
52 |
|
53 |
-
model_args = "pretrained=
|
54 |
|
55 |
lm = lm_eval.api.registry.get_model("hf").create_from_arg_string(model_args, {"batch_size": 1})
|
56 |
|
57 |
# Transform the model with DMX
|
58 |
-
lm._model = DmxModel.from_torch(lm._model)
|
59 |
|
60 |
-
eval_results = lm_eval.evaluate(lm, lm_eval.tasks.get_task_dict([
|
61 |
```
|
|
|
50 |
from dmx.compressor.modeling import DmxModel
|
51 |
import lm_eval
|
52 |
|
53 |
+
model_args = "pretrained=d-matrix/gpt2-xl,trust_remote_code=True"
|
54 |
|
55 |
lm = lm_eval.api.registry.get_model("hf").create_from_arg_string(model_args, {"batch_size": 1})
|
56 |
|
57 |
# Transform the model with DMX
|
58 |
+
lm._model = DmxModel.from_torch(lm._model)
|
59 |
|
60 |
+
eval_results = lm_eval.evaluate(lm, lm_eval.tasks.get_task_dict(["wikitext"])) # Assign desired task, i.e. "wikitext"
|
61 |
```
|