Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
prm
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shi wenxuan
prm
Commits
68a8256f
Commit
68a8256f
authored
Mar 01, 2025
by
ZhangXiaoyun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
fa5864b0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
openr/infer.sh
+2
-2
openr/prm/infer_fns.py
+3
-3
No files found.
openr/infer.sh
View file @
68a8256f
...
@@ -80,9 +80,9 @@ ulimit -u 4125556
...
@@ -80,9 +80,9 @@ ulimit -u 4125556
cd
/nfs_global/S/zhangxiaoyun/prm/openr
cd
/nfs_global/S/zhangxiaoyun/prm/openr
export
PYTHONPATH
=
$(
pwd
)
export
PYTHONPATH
=
$(
pwd
)
bash reason/llm_service/create_service_qwen2.5_math_vllm_gold_prm_speed.sh
--acc
1.0
--policy_model_name
Qwen2.5-Math-
7
B-Instruct
bash reason/llm_service/create_service_qwen2.5_math_vllm_gold_prm_speed.sh
--acc
1.0
--policy_model_name
Qwen2.5-Math-
1.5
B-Instruct
sleep 30s
sleep 30s
bash scripts/eval/beam_search.sh
--acc
1.0
--policy_model_name
Qwen2.5-Math-
7
B-Instruct
bash scripts/eval/beam_search.sh
--acc
1.0
--policy_model_name
Qwen2.5-Math-
1.5
B-Instruct
#- End
#- End
echo
"Job end at
$(
date
"+%Y-%m-%d %H:%M:%S"
)
"
echo
"Job end at
$(
date
"+%Y-%m-%d %H:%M:%S"
)
"
openr/prm/infer_fns.py
View file @
68a8256f
...
@@ -83,7 +83,7 @@ def _qwen_math_gold_infer_fn(input_str: str, model, tokenizer, device, acc):
...
@@ -83,7 +83,7 @@ def _qwen_math_gold_infer_fn(input_str: str, model, tokenizer, device, acc):
inputs
=
[
steps
[
0
]]
inputs
=
[
steps
[
0
]]
for
i
in
range
(
1
,
len
(
steps
)):
for
i
in
range
(
1
,
len
(
steps
)):
if
not
steps
[
i
]
.
isspace
():
if
not
steps
[
i
]
.
isspace
():
inputs
.
append
(
inputs
[
1
]
+
steps
[
i
])
inputs
.
append
(
inputs
[
-
1
]
+
steps
[
i
])
steps_num
=
len
(
inputs
)
steps_num
=
len
(
inputs
)
# print("-----------------------------")
# print("-----------------------------")
# print("steps:", steps)
# print("steps:", steps)
...
@@ -114,14 +114,14 @@ def _qwen_math_gold_infer_fn(input_str: str, model, tokenizer, device, acc):
...
@@ -114,14 +114,14 @@ def _qwen_math_gold_infer_fn(input_str: str, model, tokenizer, device, acc):
step_score
=
1
-
step_score
step_score
=
1
-
step_score
step_scores
.
append
(
step_score
)
step_scores
.
append
(
step_score
)
inputs
=
inputs
[
len
(
step_scores
):]
# 如果前序是0,那就不用再rollout了
# 如果前序是0,那就不用再rollout了
if
len
(
step_scores
)
!=
0
and
step_scores
[
-
1
]
==
0
:
if
len
(
step_scores
)
!=
0
and
step_scores
[
-
1
]
==
0
:
step_scores
.
extend
([
0
]
*
(
len
(
inputs
)
-
len
(
step_scores
)))
step_scores
.
extend
([
0
]
*
(
len
(
inputs
)
-
len
(
step_scores
)))
assert
steps_num
==
len
(
step_scores
),
f
"{steps_num} != {len(step_scores)}"
assert
steps_num
==
len
(
step_scores
),
f
"{steps_num} != {len(step_scores)}"
return
step_scores
return
step_scores
inputs
=
inputs
[
len
(
step_scores
):]
global
lock
global
lock
with
lock
:
with
lock
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment