Spaces:
Running
Running
Commit
·
1c52fac
1
Parent(s):
7aca970
Add instructions on how to deploy and add new models
Browse files
README.md
CHANGED
@@ -11,7 +11,91 @@ short_description: A Unified Evaluation of LLMs for RTL Generation.
|
|
11 |
sdk_version: 5.19.0
|
12 |
---
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
## License
|
15 |
|
16 |
This project is licensed under the Apache License 2.0.
|
17 |
-
See the [LICENSE](./LICENSE) and [NOTICE](./NOTICE) files for more details.
|
|
|
11 |
sdk_version: 5.19.0
|
12 |
---
|
13 |
|
14 |
+
## Quick Introduction
|
15 |
+
|
16 |
+
### Prerequisites
|
17 |
+
|
18 |
+
- **Python 3.11** or higher (required by the project)
|
19 |
+
- **[uv](https://docs.astral.sh/uv/getting-started/installation/)** for managing dependencies
|
20 |
+
|
21 |
+
#### Installing uv
|
22 |
+
|
23 |
+
On macOS and Linux:
|
24 |
+
```bash
|
25 |
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
26 |
+
```
|
27 |
+
|
28 |
+
Install dependencies:
|
29 |
+
```bash
|
30 |
+
uv sync
|
31 |
+
```
|
32 |
+
|
33 |
+
### Deploy Locally
|
34 |
+
|
35 |
+
```
|
36 |
+
$ uv run app.py
|
37 |
+
* Running on local URL: http://127.0.0.1:7860
|
38 |
+
* To create a public link, set `share=True` in `launch()`.
|
39 |
+
```
|
40 |
+
|
41 |
+
Then on localhost http://127.0.0.1:7860 you should have the leaderboard running
|
42 |
+
|
43 |
+
### Add new models
|
44 |
+
|
45 |
+
If you are from outside of HPAI you must directly modify the `results/results_icarus.json` and `results/results_verilator.json` files.
|
46 |
+
|
47 |
+
If you are from HPAI, you can add your model onto our shared `.csv` file of results and follow these steps:
|
48 |
+
|
49 |
+
1. Modify the `results/parse.py` file, `model_details` variable to include a new entry for your model
|
50 |
+
|
51 |
+
For example, if we wish to include the classic GPT2 model, we would add the following metadata:
|
52 |
+
|
53 |
+
```python
|
54 |
+
model_details = {
|
55 |
+
|
56 |
+
...
|
57 |
+
|
58 |
+
"GPT2": ( # model name
|
59 |
+
"https://huggingface.co/openai-community/gpt2", # model url
|
60 |
+
0.13, # params (in B)
|
61 |
+
"Coding", # model type: `General`, `Coding`, `RTL-Specific`
|
62 |
+
"V1", # release of the TuRTLe Leaderboard
|
63 |
+
),
|
64 |
+
}
|
65 |
+
```
|
66 |
+
|
67 |
+
2. Parse the CSV files onto JSON, which is what the Leaderboard will take as ground truth
|
68 |
+
|
69 |
+
```
|
70 |
+
$ uv run results/parse.py results/results_v3_mlcad_icarus.csv # will generate results/results_v3_mlcad_icarus.json
|
71 |
+
$ uv run results/parse.py results/results_v3_mlcad_verilator.csv # will generate results/results_v3_mlcad_verilator.json
|
72 |
+
```
|
73 |
+
|
74 |
+
The application is hardcoded to look for `results_icarus.json` and `results_verilator.json.` Rename the files you just created:
|
75 |
+
|
76 |
+
```
|
77 |
+
$ mv results/results_v3_mlcad_icarus.json results/results_icarus.json
|
78 |
+
$ mv results/results_v3_mlcad_verilator.json results/results_verilator.json
|
79 |
+
```
|
80 |
+
|
81 |
+
3. Compute the aggregated scores
|
82 |
+
|
83 |
+
This will generate the corresponding `aggregated_scores` files that the leaderboard uses for some of its views.
|
84 |
+
|
85 |
+
```
|
86 |
+
$ uv run results/compute_agg_results.py results/results_v3_mlcad_icarus.csv
|
87 |
+
$ uv run results/compute_agg_results.py results/results_v3_mlcad_verilator.csv
|
88 |
+
```
|
89 |
+
|
90 |
+
This will create `aggregated_scores_v3_mlcad_icarus.csv` and `aggregated_scores_v3_mlcad_verilator.csv`. Rename them to what the application expects:
|
91 |
+
|
92 |
+
```
|
93 |
+
$ mv results/aggregated_scores_v3_mlcad_icarus.csv results/aggregated_scores_icarus.csv
|
94 |
+
$ mv results/aggregated_scores_v3_mlcad_verilator.csv results/aggregated_scores_verilator.csv
|
95 |
+
```
|
96 |
+
|
97 |
+
|
98 |
## License
|
99 |
|
100 |
This project is licensed under the Apache License 2.0.
|
101 |
+
See the [LICENSE](./LICENSE) and [NOTICE](./NOTICE) files for more details.
|