MCPcopy Create free account
hub / github.com/PRIME-RL/PRIME / generate_sample_batch

Function generate_sample_batch

eval/Coding/human_eval/evaluate_human_eval.py:84–100  ·  view source on GitHub ↗
(question_list)

Source from the content-addressed store, hash-verified

82 return s.split('```')[0]
83
84def generate_sample_batch(question_list):
85 llm = LLM(
86 model=args.model,
87 trust_remote_code=True,
88 tensor_parallel_size=torch.cuda.device_count(),
89 gpu_memory_utilization=0.90,
90 enforce_eager=True,
91 )
92 sampling_params = SamplingParams(max_tokens=4096,
93 temperature=args.temperature,
94 n=1,
95 stop=["<|eot_id|>"],)
96
97 outputs = llm.generate(question_list, sampling_params, use_tqdm=False)
98
99 completions = [match_code(output.outputs[0].text) for output in outputs]
100 return completions
101
102def make_signature(example):
103 signature = re.search(

Callers 1

Calls 3

generateMethod · 0.95
LLMClass · 0.90
match_codeFunction · 0.70

Tested by

no test coverage detected