Skip to content

Instantly share code, notes, and snippets.

View natolambert's full-sized avatar
🎯
Focusing

Nathan Lambert natolambert

🎯
Focusing
View GitHub Profile
@natolambert
natolambert / gist:fcbbde38134bf11ec8e80b2fbefcf180
Created November 24, 2024 19:38
DeepSeek r1 on What is the biggest prime number between 23456 and 123456

Thought for 79 seconds

Alright, so I've been given this problem: "What is the biggest prime number between 23456 and 123456." At first glance, it seems pretty straightforward, but I need to make sure I understand what's being asked. I need to find the largest prime number within this range.

First things first, I need to recall what a prime number is. A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. So, numbers like 2, 3, 5, 7, and so on are primes because they can't be divided evenly by any other numbers except 1 and themselves.

Now, the range given is from 23456 to 123456. That's a pretty large range, so checking each number individually isn't practical. There must be a smarter way to approach this.

I know that prime numbers become less frequent as numbers get larger, but they still appear infinitely. However, within a specific range, there should be a finite number of primes. My goal is to find the largest one in this particular range.
@natolambert
natolambert / skyworks-rewardbench-contamination.md
Last active February 18, 2025 03:56
MagPie RewardBench Contamination (found through SkyWorks Preferences)

Recently, I learned that some of the top reward models on RewardBench were trained on a preference dataset that has unintentional contamination with the benchmark. The dataset, Skyworks Preferences 80k contains contamination by mixing a Magpie dataset in. Magpie is a new method for having language models generate instructions by prompting them with an empty chat template. The source for the Skyworks dataset that was contaminated is Argilla/magpie-ultra-v0.1, generated with Llama 3.1 405B Instruct. I would never expect a Magpie dataset to be contaminated.

What seems likely is that Meta trained on some these prompts, but the exact provenance of each prompt needs more example. For example, we learned that some of the prompts we used in our LLMBar subsets they got from popular training sets like Al

@natolambert
natolambert / jump.py
Created March 12, 2020 15:28
Optimization Problem
def jumper(parameters):
rho = 2300
E = 170e9
T = 550e-6
lamb = 13.75
w = parameters["w"]
x_max = 5e-3
N = parameters["N"]
L = parameters["L"]