|
|
import matplotlib.pyplot as plt |
|
|
|
|
|
|
|
|
x_labels = ['100', '250', '500', '1000', '2000', '4000', '6000'] |
|
|
models = { |
|
|
'DS_QW_7B-prompt': [33.8, 43.6, 55.2, 72, 84.4, 89.6, 90], |
|
|
|
|
|
|
|
|
'SFT+RL(with special token)': [38.4, 46.4, 68.2, 74.8, 86, 91.4, 92.2] |
|
|
} |
|
|
|
|
|
|
|
|
fig, ax = plt.subplots() |
|
|
|
|
|
|
|
|
colors = ['blue', 'green', 'red', 'purple'] |
|
|
for (model, scores), color in zip(models.items(), colors): |
|
|
ax.plot(x_labels, scores, label=model, color=color, marker='o') |
|
|
|
|
|
|
|
|
ax.set_title('MATH500 Scores by Model and Sample Size') |
|
|
ax.set_xlabel('Sample Size') |
|
|
ax.set_ylabel('Score') |
|
|
|
|
|
|
|
|
ax.legend() |
|
|
|
|
|
|
|
|
plt.savefig('math500_scores.png', bbox_inches='tight') |
|
|
|
|
|
|
|
|
plt.close() |
|
|
|
|
|
|
|
|
|