SlowGuess's picture
Upload Abforge training code snapshot
1ce6f9b verified
Raw
History Blame Contribute Delete
3.84 kB
import requests
import json
import re
# 你的原始数据
data = {
'data_source': 'openai/gsm8k', 'solution_str': '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n<|im_start|>user\nA candy store sold 20 pounds of fudge for $2.50/pound, 5 dozen chocolate truffles for $1.50 each and 3 dozen chocolate-covered pretzels at $2.00 each. How much money did the candy store make? Let\'s think step by step and output the final answer after "####".<|im_end|>\n<|im_start|>assistant\nLet\'s break down the sales step by step:\n\n1. **Fudge Sales:**\n - The candy store sold 20 pounds of fudge at $2.50 per pound.\n - Total from fudge = 20 pounds * $2.50/pound = $50.00\n\n2. **Chocolate Truffles Sales:**\n - The candy store sold 5 dozen chocolate truffles at $1.50 each.\n - Since 1 dozen = 12, 5 dozen = 5 * 12 = 60 truffles.\n - Total from chocolate truffles = 60 truffles * $1.50/truffle = $90.00\n\n3. **Chocolate-Covered Pretzels Sales:**\n - The candy store sold 3 dozen chocolate-covered pretzels at $2.00 each.\n - Since 1 dozen = 12, 3 dozen = 3 * 12 = 36 pretzels.\n - Total from chocolate-covered pretzels = 36 pretzels * $2.00/pretzel = $72.00\n\nNow, let\'s add up all the totals to find the overall amount of money made:\n\n- Total from fudge = $50.00\n- Total from chocolate truffles = $90.00\n- Total from chocolate-covered pretzels = $72.00\n\n#### 212.00<|im_end|>', 'ground_truth': '212',
'extra_info': {
'answer': '20 pounds of fudge at $2.50/pounds is 20*2.50 = $<<20*2.50=50.00>>50.00\nThe 5 dozen truffles were sold in individual units so a dozen is equal to 12 so 5*12=<<5*12=60>>60\n60 chocolate truffles, at $1.50 each sold for 60*1.50 = $<<60*1.50=90.00>>90.00\nThe 3 dozen chocolate pretzels sold in individual units so a dozen is equal to 12 so 3*12 = <<3*12=36>>36\n36 chocolate pretzels sold for $2.00 each sold for 36*2 = $<<36*2=72.00>>72.00\nAll total, the store made 50+90+72 = $<<50+90+72=212.00>>212.00 from candy sales\n#### 212',
'index': 2491,
'question': 'A candy store sold 20 pounds of fudge for $2.50/pound, 5 dozen chocolate truffles for $1.50 each and 3 dozen chocolate-covered pretzels at $2.00 each. How much money did the candy store make?',
'split': 'train'},
'prompt_str': '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n<|im_start|>user\nA candy store sold 20 pounds of fudge for $2.50/pound, 5 dozen chocolate truffles for $1.50 each and 3 dozen chocolate-covered pretzels at $2.00 each. How much money did the candy store make? Let\'s think step by step and output the final answer after "####".<|im_end|>\n<|im_start|>assistant\n',
'response_str': "Let's break down the sales step by step:\n\n1. **Fudge Sales:**\n - The candy store sold 20 pounds of fudge at $2.50 per pound.\n - Total from fudge = 20 pounds * $2.50/pound = $50.00\n\n2. **Chocolate Truffles Sales:**\n - The candy store sold 5 dozen chocolate truffles at $1.50 each.\n - Since 1 dozen = 12, 5 dozen = 5 * 12 = 60 truffles.\n - Total from chocolate truffles = 60 truffles * $1.50/truffle = $90.00\n\n3. **Chocolate-Covered Pretzels Sales:**\n - The candy store sold 3 dozen chocolate-covered pretzels at $2.00 each.\n - Since 1 dozen = 12, 3 dozen = 3 * 12 = 36 pretzels.\n - Total from chocolate-covered pretzels = 36 pretzels * $2.00/pretzel = $72.00\n\nNow, let's add up all the totals to find the overall amount of money made:\n\n- Total from fudge = $50.00\n- Total from chocolate truffles = $90.00\n- Total from chocolate-covered pretzels = $72.00\n\n#### 212.00<|im_end|>"}
response_str = requests.post('http://localhost:6009/get_reward2', json=data).json()
print('\\\\n服务器响应:')
print(json.dumps(response_str, indent=2,ensure_ascii=False))