Delete README.md
Browse files
README.md
DELETED
|
@@ -1,51 +0,0 @@
|
|
| 1 |
-
---
|
| 2 |
-
model-index:
|
| 3 |
-
- name: opt-6b7
|
| 4 |
-
results:
|
| 5 |
-
- task:
|
| 6 |
-
type: text-generation
|
| 7 |
-
dataset:
|
| 8 |
-
name: Wikitext
|
| 9 |
-
type: wikitext
|
| 10 |
-
metrics:
|
| 11 |
-
- type: perplexity (BASELINE)
|
| 12 |
-
value: 12.286456082558505
|
| 13 |
-
- type: perplexity (BASIC)
|
| 14 |
-
value: 12.300496271519869
|
| 15 |
-
---
|
| 16 |
-
This is a d-Matrix functional reference of the OPT-6B7 model.
|
| 17 |
-
The reference provides the following functional *configurations*:
|
| 18 |
-
Configuration | Explanation
|
| 19 |
-
:-- | :--
|
| 20 |
-
**`BASELINE`** | a reference functionally equivalent to the original model
|
| 21 |
-
**`BASIC`** | all linear algebraic operands quantized to `MXINT8-64`, and all other operations transformed to approximated kernel simulations
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
### Usage
|
| 25 |
-
|
| 26 |
-
Install d-Matrix [Dmx_Compressor](https://github.com/d-matrix-ai/dmx-compressor) first.
|
| 27 |
-
```sh
|
| 28 |
-
pip install dmx_compressor
|
| 29 |
-
```
|
| 30 |
-
|
| 31 |
-
The following is an example model and its evaluation.
|
| 32 |
-
|
| 33 |
-
```sh
|
| 34 |
-
git clone https://github.com/EleutherAI/lm-evaluation-harness
|
| 35 |
-
cd lm-evaluation-harness
|
| 36 |
-
pip install -e .
|
| 37 |
-
```
|
| 38 |
-
|
| 39 |
-
```python
|
| 40 |
-
from dmx.compressor.modeling import DmxModel
|
| 41 |
-
import lm_eval
|
| 42 |
-
|
| 43 |
-
model_args = "pretrained=d-matrix/opt-6b7,trust_remote_code=True"
|
| 44 |
-
|
| 45 |
-
lm = lm_eval.api.registry.get_model("hf").create_from_arg_string(model_args, {"batch_size": 1})
|
| 46 |
-
|
| 47 |
-
# Transform the model with DMX
|
| 48 |
-
lm._model = DmxModel.from_torch(lm._model)
|
| 49 |
-
|
| 50 |
-
eval_results = lm_eval.evaluate(lm, lm_eval.tasks.get_task_dict(["wikitext"])) # Assign desired task, i.e. "wikitext"
|
| 51 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|