Upload README.md with huggingface_hub
Browse files12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849---model-index:- name: opt-2b7 results: - task: type: text-generation dataset: name: Wikitext type: wikitext metrics: - type: perplexity (BASELINE) value: 14.318173671723665 - type: perplexity (BASIC) value: 14.346063198713951---This is a d-Matrix functional reference of the OPT-2B7 model.The reference provides the following functional *configurations*: Configuration | Explanation :-- | :-- **`BASELINE`** | a reference functionally equivalent to the original model **`BASIC`** | all linear algebraic operands quantized to `BFP16-64`, and all other operations transformed to approximated kernel simulations
### Usage
Install d-Matrix [Dmx_Compressor](https://github.com/d-matrix-ai/dmx-compressor) first.```shpip install dmx_compressor```
The following is an example model and its evaluation.
```shpip install lm-eval```
```pythonfrom dmx.compressor.modeling import DmxModelimport lm_eval
model_args = f"pretrained="d-matrix/opt-2b7",trust_remote_code=True"
lm = lm_eval.api.registry.get_model("hf").create_from_arg_string(model_args, {"batch_size": 1})
# Transform the model with DMXlm._model = DmxModel.from_torch(lm._model).to_basic_model() # Using BASIC configuration
eval_results = lm_eval.evaluate(lm, lm_eval.tasks.get_task_dict([task]) # Assign desired task, i.e. "wikitext"```README.mdAdded+49