Skip to content

Instantly share code, notes, and snippets.

"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@DocShotgun
DocShotgun / llamacpp-moe-offload-guide.md
Last active March 11, 2026 17:50
Guide to optimizing inference performance of large MoE models across CPU+GPU using llama.cpp and its derivatives

Performant local mixture-of-experts CPU inference with GPU acceleration in llama.cpp

Introduction

So you want to try one of those fancy huge mixture-of-experts (MoE) models locally? Well, whether you've got a gaming PC or a large multi-GPU workstation, we've got you covered. As long as you've downloaded enough RAM beforehand.

Anatomy of a MoE Model

MoE models are described in terms of their total parameters and active parameters - i.e. DeepSeek V3 671B A37B has 671B total parameters, but we are using only 37B parameters at a time during each forward pass through the model.

@mary-ext
mary-ext / bluesky-osa.md
Last active March 7, 2026 02:11
Bluesky's age assurance sucks, here's how to work around it.

Bluesky's age assurance sucks, here's how to work around it.

Bluesky has implemented age verification measures in response to regional laws that restrict access, prompting users to verify their age through Epic Games' Kids Web Services before they can access adult content.

This sucks, but thankfully there are ways to work around it.

Before diving in: I encourage you to read this entire document, including the

/* ==UserStyle==
@name unfuck discord
@namespace easrng
@version 0.0.5
@author easrng
@updateURL https://gist.github.com/easrng/6d2305c305a2934ff4d21320e040cec8/raw/unfuck_discord.user.css
==/UserStyle== */
@-moz-document domain("discord.com") {
:root {
--font-primary:
@poyotanp
poyotanp / how-to-disable-middle-click-paste.md
Last active February 11, 2026 13:44
How to disable middle-click paste in KDE Plasma (Wayland)

Environment

  • Arch Linux
  • KDE Plasma 6.1.5 (Wayland)

Solution

For native Wayland applications

  1. open the KDE system settings
  2. select "Workspace" -> "General Behavior"
@gabe565
gabe565 / change-arc-icon.md
Last active February 24, 2026 21:06
Change Arc Browser Icon

Change Arc Browser Icon

arc

A collection of commands that change the Arc Browser icon on macOS.

Commands

Theme Command
Candy Arc defaults write company.thebrowser.Browser currentAppIconName candy
@TrevTV
TrevTV / ArcOn10.md
Last active October 23, 2025 19:22
Guide to installing Arc Browser on Windows 10

NOTICE: Arc now supports Windows 10 officially. This guide is no longer necessary.

As this is not an official way of installing Arc, if you encounter any issues do NOT report them to the developers, they did not intend for people to be running Arc on Windows 10.

.emoji[alt="🥹"] {
content: url("https://vendicated.github.io/random-files/face_holding_back_tears.svg");
}
.emoji[alt="🥺"] {
content: url("https://vendicated.github.io/random-files/pleading_face.svg");
}
@Erisa
Erisa / repeat.ts
Last active January 7, 2023 17:48
Repeat for clearing out Pages deployments (https://repeat.dev)
const config = [
{
project: "erisa",
days: 180
},
{
project: "super-secret-sauce",
days: 60
}
]
import tweepy, json, time, sys
auth = tweepy.OAuth1UserHandler(
<api keys here>
)
api = tweepy.API(auth)
d = json.loads(open(sys.argv[1]).read().split("=", 1)[1])