This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib import colormaps | |
from matplotlib.animation import FuncAnimation | |
from mpl_toolkits.mplot3d import Axes3D | |
from transformers import GPT2LMHeadModel, GPT2Tokenizer | |
from sklearn.decomposition import PCA | |
# === CONFIG === |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# train_grpo.py | |
# | |
# See https://github.com/willccbb/verifiers for ongoing developments | |
# | |
""" | |
citation: | |
@misc{brown2025grpodemo, | |
title={Granular Format Rewards for Eliciting Mathematical Reasoning Capabilities in Small Language Models}, | |
author={Brown, William}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ic[x_, y_] := 1 E^(-350 ((x - 1/5)^2 + ( y - 1/3)^2)) | |
solnDir = | |
NDSolve[ | |
{D[u[x, y, t], {t, 2}] == D[u[x, y, t], {x, 2}] + D[u[x, y, t], {y, 2}], | |
u[x, y, 0] == ic[x, y], | |
(D[u[x, y, t], t] /. t -> 0) == 0, | |
u[0, y, t] == ic[0, y], | |
u[1, y, t] == ic[1, y], | |
u[x, 0, t] == ic[x, 0], |