Spaces:
Sleeping
Sleeping
Update run_eval.py
Browse files- run_eval.py +8 -0
run_eval.py
CHANGED
@@ -120,6 +120,14 @@ for cfg in CONFIGS:
|
|
120 |
|
121 |
try:
|
122 |
res = evaluator.simple_evaluate(model=hf_lm, tasks=tasks)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
except Exception as e:
|
124 |
print(f"Evaluation failed for {adapter_repo}: {e}")
|
125 |
continue
|
|
|
120 |
|
121 |
try:
|
122 |
res = evaluator.simple_evaluate(model=hf_lm, tasks=tasks)
|
123 |
+
del merged_model
|
124 |
+
del peft_model
|
125 |
+
del base_model
|
126 |
+
del tokenizer
|
127 |
+
del hf_lm
|
128 |
+
gc.collect()
|
129 |
+
torch.cuda.empty_cache()
|
130 |
+
torch.cuda.ipc_collect()
|
131 |
except Exception as e:
|
132 |
print(f"Evaluation failed for {adapter_repo}: {e}")
|
133 |
continue
|