Skip to content

Commit e1bcdc3

Browse files
committed
Cleanup
1 parent 7746719 commit e1bcdc3

5 files changed

Lines changed: 19 additions & 29 deletions

File tree

eval/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ eval/
3232
For the MRI models, we provide an inference harness for the C++ HumanEval multi-region dataset.
3333
To execute task 11 on the 1-region dataset with constraints and traces enabled, use the following command:
3434
```bash
35-
python3 -m constrained_diffusion.eval.mri.generic_inference
36-
--max-tokens 256
37-
--model_name deepseek-ai/deepseek-coder-6.7b-base
38-
--seed 0
39-
--temp 1
40-
--dataset-name HumanEval/MRI/cpp/1
41-
--constrained True
42-
--trace True
43-
--task_id /11_
35+
python3 -m constrained_diffusion.eval.mri.generic_inference \
36+
--max-tokens 256 \
37+
--model_name deepseek-ai/deepseek-coder-6.7b-base \
38+
--seed 0 \
39+
--temp 1 \
40+
--dataset-name HumanEval/MRI/cpp/1 \
41+
--constrained True \
42+
--trace True \
43+
--task_id /11_
4444
```
4545

4646
For the diffusion LLMs, use the following command for the SMILES dataset.

eval/dllm/run_dllm.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,21 @@ def compute_needed_gpus(size_model, size_gpu):
2020

2121
subsets = [
2222
"THUDM/humaneval-x/cpp",
23-
"jsonschema_r",
24-
# "nmuendler/json-mode-eval-cleaned",
23+
"jsonschema",
2524
"smiles",
26-
# "jsonschema",
27-
# "sed",
2825
]
2926
temps = ["0.2"]
3027
gap_sizes = {
31-
"jsonschema_r": [0], # , 1, 5],
3228
"jsonschema": [0], # , 1, 5],
3329
"THUDM/humaneval-x/cpp": [0], # , 1, 2],
34-
"nmuendler/json-mode-eval-cleaned": [0], # , 1, 5],
3530
"smiles": [0], # , 1, 5],
36-
"sed": [0],
3731
}
3832
step_sizes = [32]
3933
seeds = [0, 1, 2, 3]
4034
configs = [
4135
("", "_synth"),
4236
]
43-
constraineds = [True]
37+
constraineds = [True, False]
4438

4539

4640
def find_available_gpus(gpus, n):
@@ -133,7 +127,7 @@ def find_available_gpus(gpus, n):
133127
else:
134128
suffix = "nc"
135129
command = (
136-
f"PYTHONPATH=. CUDA_VISIBLE_DEVICES={','.join(str(i) for i in cuda_devices)} python3 -m constrained_outoforder.eval.dllm.generic_inference "
130+
f"PYTHONPATH=. CUDA_VISIBLE_DEVICES={','.join(str(i) for i in cuda_devices)} python3 -m constrained_diffusion.eval.dllm.generic_inference "
137131
f"--max-tokens 256 --model_name {model} --seed {seed} --temp {temp} --trace False --dataset-name '{subset}' --inject_gap_size {gap_size} --max_total_injections {gap_size} --steps {num_step} "
138132
f"--constrained {constrained} --output_file 'results/{subset.replace('/', '_')}_{model.replace('/', '_')}_s={seed}_t={temp}_gs={gap_size}_sz={num_step}{name}_{suffix}.jsonl' {config}"
139133
)

eval/dllm/run_dllm_step_ablation.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,22 @@ def compute_needed_gpus(size_model, size_gpu):
1616

1717

1818
subsets = [
19-
# "nmuendler/json-mode-eval-cleaned",
2019
"smiles",
2120
"THUDM/humaneval-x/cpp",
22-
"jsonschema_r",
23-
# "sed",
21+
"jsonschema",
2422
]
2523
temps = ["0.2"]
2624
gap_sizes = {
27-
"jsonschema_r": [0], # , 1, 5],
25+
"jsonschema": [0], # , 1, 5],
2826
"THUDM/humaneval-x/cpp": [0], # , 1, 2],
29-
"nmuendler/json-mode-eval-cleaned": [0], # , 1, 5],
3027
"smiles": [0], # , 1, 5],
31-
"sed": [0],
3228
}
3329
step_sizes = [16, 64, 128, 256]
3430
seeds = [0, 1, 2, 3]
3531
configs = [
3632
("", "_synth"),
3733
]
38-
constraineds = [True]
34+
constraineds = [True, False]
3935

4036

4137
def find_available_gpus(gpus, n):
@@ -128,7 +124,7 @@ def find_available_gpus(gpus, n):
128124
else:
129125
suffix = "nc"
130126
command = (
131-
f"PYTHONPATH=. CUDA_VISIBLE_DEVICES={','.join(str(i) for i in cuda_devices)} python3 -m constrained_outoforder.eval.dllm.generic_inference "
127+
f"PYTHONPATH=. CUDA_VISIBLE_DEVICES={','.join(str(i) for i in cuda_devices)} python3 -m constrained_diffusion.eval.dllm.generic_inference "
132128
f"--max-tokens 256 --model_name {model} --seed {seed} --temp {temp} --trace False --dataset-name '{subset}' --inject_gap_size {gap_size} --max_total_injections {gap_size} --steps {num_step} "
133129
f"--constrained {constrained} --output_file 'results/{subset.replace('/', '_')}_{model.replace('/', '_')}_s={seed}_t={temp}_gs={gap_size}_sz={num_step}{name}_{suffix}.jsonl' {config}"
134130
)

eval/mri/run_fim.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def compute_needed_gpus(size_model, size_gpu):
4242
configs = [
4343
("", "_synth"),
4444
]
45-
constraineds = [True]
45+
constraineds = [True, False]
4646

4747

4848
def find_available_gpus(gpus, n):
@@ -132,7 +132,7 @@ def find_available_gpus(gpus, n):
132132
else:
133133
suffix = "nc"
134134
command = (
135-
f"PYTHONPATH=. CUDA_VISIBLE_DEVICES={','.join(str(i) for i in cuda_devices)} python3 -m constrained_outoforder.eval.mri.generic_inference "
135+
f"PYTHONPATH=. CUDA_VISIBLE_DEVICES={','.join(str(i) for i in cuda_devices)} python3 -m constrained_diffusion.eval.mri.generic_inference "
136136
f"--max-tokens 256 --model_name {model} --seed {seed} --temp {temp} --trace False --dataset-name '{subset}' --inject_gap_size {gap_size} --max_total_injections {gap_size} "
137137
f"--constrained {constrained} --output_file 'results/{subset.replace('/', '_')}_{model.replace('/', '_')}_s={seed}_t={temp}_gs={gap_size}{name}_{suffix}.jsonl' {config}"
138138
)

example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def main():
142142
print(prompt)
143143
print("Took {:.2f} seconds to generate.".format(time_taken_autocompletion))
144144
print("----------- Code ------------------")
145-
print(autocompletion)
145+
print(autocompletion or extracted)
146146

147147

148148
if __name__ == "__main__":

0 commit comments

Comments
 (0)