Skip to content

Commit

Permalink
HumanEval: Rename new args to match other scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
turboderp committed Sep 29, 2024
1 parent ef7cdda commit cad7848
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions eval/humaneval.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from __future__ import annotations

import os
import sys

import os, sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from human_eval.data import write_jsonl, read_problems
from exllamav2 import model_init
Expand All @@ -25,9 +23,9 @@
parser.add_argument("-v", "--verbose", action = "store_true", help = "Spam completions to console while generating")
parser.add_argument("-e", "--eval", action = "store_true", help = "Run evaluation script on output file after sampling")
parser.add_argument("-temp", "--temperature", type = float, help = "Sampling temperature (0 for greedy), default: 0.6", default = 0.6)
parser.add_argument("--top_k", type = int, help = "Top-k sampling, default: 50", default = 50)
parser.add_argument("--top_p", type = float, help = "Top-p sampling, default: 0.6", default = 0.6)
parser.add_argument("-trp", "--token_repetition_penalty", type = float, help = "Token repetition penalty, default: 1.0", default = 1.0)
parser.add_argument("-topk", "--top_k", type = int, help = "Top-k sampling, default: 50", default = 50)
parser.add_argument("-topp", "--top_p", type = float, help = "Top-p sampling, default: 0.6", default = 0.6)
parser.add_argument("-repp", "--repetition_penalty", type = float, help = "Token repetition penalty, default: 1.0", default = 1.0)
model_init.add_args(parser)
args = parser.parse_args()

Expand Down Expand Up @@ -124,10 +122,10 @@
)

gen_settings = ExLlamaV2Sampler.Settings(
token_repetition_penalty=args.token_repetition_penalty,
temperature=args.temperature,
top_k=args.top_k,
top_p=args.top_p
token_repetition_penalty = args.repetition_penalty,
temperature = args.temperature,
top_k = args.top_k,
top_p = args.top_p
)

# Get problems
Expand Down

0 comments on commit cad7848

Please sign in to comment.