Skip to content

Instantly share code, notes, and snippets.

View catastropiyush's full-sized avatar

Piyush R. Maharana catastropiyush

View GitHub Profile
@attentionmech
attentionmech / activation_dynamics_vis.py
Last active May 21, 2025 16:29
activation dynamics vis
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 ===
@gridley
gridley / criticality_check_x.ipynb
Created March 17, 2025 01:16
An openmc model to simulate the criticality (un)safety of the case of stolen plutonium in Mission Impossible: Fallout
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@willccbb
willccbb / grpo_demo.py
Last active June 13, 2025 03:56
GRPO Llama-1B
# 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},
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],