Skip to content

Instantly share code, notes, and snippets.

View parmarsuraj99's full-sized avatar

Suraj Parmar parmarsuraj99

View GitHub Profile
// ==UserScript==
// @name TweetXer
// @namespace https://github.com/lucahammer/tweetXer/
// @version 0.7.0
// @description Delete all your Tweets for free.
// @author Luca,dbort,pReya,Micolithe,STrRedWolf
// @license NoHarm-draft
// @match https://x.com/*
// @icon https://www.google.com/s2/favicons?domain=twitter.com
// @grant unsafeWindow
@veekaybee
veekaybee / normcore-llm.md
Last active November 18, 2024 07:43
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@NaxAlpha
NaxAlpha / long_gpt.py
Last active July 23, 2024 13:07
Training script for LongGPT; Fine-tunes GPT-2 (335M) on The Pile Dataset with a context size of 8k tokens. (requires > 16GB RAM)
import time
from contextlib import suppress
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torch.backends.cuda as cuda
from torch.utils.data import DataLoader, IterableDataset
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jeethu
jeethu / evaluation.py
Created August 25, 2020 17:01
Numerai Model Evaluation
import functools
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import matplotlib.table as table
import numpy as np
import pandas as pd
from scipy.stats import spearmanr
TOURNAMENT_NAME = "kazutsugi"
@aditya-malte
aditya-malte / smallberta_pretraining.ipynb
Created February 22, 2020 13:41
smallBERTa_Pretraining.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wingrime
wingrime / yeti_rank.py
Created June 22, 2018 12:42
Catboost with yeti-rank
import mmh3
import pandas as pd
def get_positive_hash(x):
s = " ".join(get_unique_tokens(x))
return mmh3.hash(s) % 2**31
df['group_id'] = df['query_string'].apply(get_positive_hash )
query_groups = df.groupby("group_id")
@uchidama
uchidama / mnist_to_jpg.py
Last active March 14, 2022 01:25
Convert mnist binary on keras datasets to jpeg images.
import keras
from keras.datasets import mnist
import numpy as np
from PIL import Image, ImageOps
import os
def save_image(filename, data_array):
im = Image.fromarray(data_array.astype('uint8'))
im_invert = ImageOps.invert(im)