bmah-dmx commited on
Commit
f7162ae
·
verified ·
1 Parent(s): 6bbc0ea

Delete README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -60
README.md DELETED
@@ -1,60 +0,0 @@
1
- ---
2
- model-index:
3
- - name: CodeLlama-7b
4
- results:
5
- - task:
6
- type: code-generation
7
- dataset:
8
- name: Humaneval
9
- type: humaneval
10
- metrics:
11
- - type: pass@1 (BASELINE)
12
- value: 0.3048780487804878
13
- - type: pass@1 (BASIC)
14
- value: 0.3170731707317073
15
- ---
16
- This is a d-Matrix functional reference of the CODELLAMA-7B 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 `BFP16-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/bigcode-project/bigcode-evaluation-harness.git
35
- cd bigcode-evaluation-harness
36
- pip install .
37
- ```
38
-
39
- ```python
40
- from dmx.compressor import config_rules
41
- from dmx.compressor.modeling import DmxModel
42
- from bigcode_eval.evaluator import Evaluator
43
-
44
- pipe = pipeline(
45
- task="text-generation",
46
- model="d-matrix/d-matrix/CodeLlama-7b",
47
- trust_remote_code=True,
48
- device=0,
49
- )
50
-
51
- # Transform the model with DMX
52
- model = DmxModel.from_torch(pipe.model).to("cuda")
53
- tensor = torch.randint(1, 100, (1, max_length)).to("cuda") # Assign desired max length of generation to max_length
54
- model.transform(model.dmx_config, *eval(f"config_rules.{dmx_config}"))
55
- setup = model(tensor)
56
-
57
- evaluator = Evaluator(accelerator, model, tokenizer, eval_args)
58
-
59
- result = evaluator.evaluate(task)
60
- ```