Skip to content

Commit 4b50199

Browse files
committed
Document download models and jsonl format
1 parent a204017 commit 4b50199

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,22 @@ bash ./setup_env.sh
142142
# NOTE: Some models are guarded on huggingface, so you will need to visit their model page, accept the EULA and enter the huggingface Access Token to your account when prompted. See section "Requirements" for more details.
143143
```
144144

145-
Before running the experiments, you need to download the models and datasets.
146-
To download the models and datasets, run the following command:
145+
> Important note: Before running the experiments, you need to download the models and datasets used for the experiments.
146+
147+
We provide a script to download the required dataset and models for our experiments. This script must be run before starting the experiments.
148+
You may specify models to download by passing the `models` paramater.
149+
150+
```bash
151+
python3 experiments/main/download_models.py --models google/gemma-2-2b-it,google/gemma-2-9b-it
152+
```
153+
154+
To download all required models and datasets, run the following command:
147155

148156
```bash
149-
CUDA_VISIBLE_DEVICES=0 python3 experiments/main/download_models.py
157+
python3 experiments/main/download_models.py
150158
```
151159

160+
152161
### Warming up
153162

154163
To warm up, we start by reproducing the result for synthesis of the smallest model (Gemma 2 2B) and the MBPP dataset. To avoid using busy GPUs in a shared setting, use command `nvidia-smi` to check which GPUs are free. Then specify the IDs of GPUs you want to use by setting the `CUDA_VISIBLE_DEVICES` environment variable. If you want to use GPU 0 and 1, run the following command:
@@ -159,9 +168,9 @@ CUDA_VISIBLE_DEVICES=0,1 python3 experiments/main/run_experiments_syn_tran.py --
159168

160169
This reproduces the results for Gemma-2B on the synthesis task on MBPP.
161170
The experiment should finish within approximately 4 hours on a single GPU.
162-
The results of the experiment (and all other results) will be stored in `experiments/main/results` in an appropriately named `jsonl` file, in this concrete example `experiments/main/results/mbpp_google_gemma-2-2b-it_s=0_t=1_synth_nc.jsonl` and `..._c.jsonl` for the unconstrained and type-constrained variants respectively.
171+
The results of the experiment (and all other results) will be stored in `experiments/main/results` in an appropriately named `jsonl` file. The general schema is `experiments/main/results/<subset>_<model>_s=<seed>_t=<temperature>_<task>_<constrained>.jsonl`. In this concrete example `experiments/main/results/mbpp_google_gemma-2-2b-it_s=0_t=1_synth_nc.jsonl` and `..._c.jsonl` for the unconstrained and type-constrained variants respectively.
163172

164-
> The experiment runs can be cancelled at any time, intermediate results are stored in the `results` folder. Upon restarting, the script will automatically pick up the last completed instance and continue from there. It may happen that running tasks daemonize and continue running (check `nvidia-smi`). Make sure to kill them manually before restarting.
173+
> The experiment runs can be cancelled at any time, intermediate results are stored in the `jsonl` files. Upon restarting, the script will automatically pick up the last completed instance and continue from there. It may happen that running tasks daemonize and continue running (check `nvidia-smi`). Make sure to kill them manually before restarting.
165174
166175
Our experiment script automatically distributes jobs over indicated GPUs.
167176
The script then repeatedly queries whether running jobs are completed and new GPUs are available. You will therefore see something like the following ouput:
@@ -290,4 +299,4 @@ The type reachability algorithm is implemented in `typesafe_llm/parser/types_ts.
290299

291300
The automaton for statements is defined in `typesafe_llm/automata/parser_ts.py` in the class `StatementParserState`.
292301
It handles the constraining for valid return types.
293-
The automaton for the entire program is defined in `typesafe_llm/automata/parser_ts.py` in the class `ProgramParserState`.
302+
The automaton for the entire program is defined in `typesafe_llm/automata/parser_ts.py` in the class `ProgramParserState`.

0 commit comments

Comments
 (0)