Skip to content

Instantly share code, notes, and snippets.

View igorbrigadir's full-sized avatar

Igor Brigadir igorbrigadir

View GitHub Profile

Learning LLMs in 2025

So you know how the transformer works, and you know basic ML/DL, and you want to learn more about LLMs. One way to go is looking into the various "algorithmic" stuff (optimization algorithms, RL, DPO, etc). Lot's of materials on that. But the interesting stuff is (in my opinion at least) not there.

This is an attempt to collect a list of academic (or academic-like) materials that explore LLMs from other directions, and focus on the non-ML-algorithmic aspects.

Courses

  • David Chiang's Theory of Neural Networks course.
  • This is not primarily LLMs, but does have substantial section on Transformers. Formal/Theory. More of a book than a course.
@gd3kr
gd3kr / embeddings.py
Created February 15, 2024 20:35
compute embeddings for tweets in tweets.json
"""
a simple script that reads tweets inside a json file, uses openai to compute embeddings and creates two files, metadata.tsv and output.tsv, which cam be used to visualise the tweets and their embeddings in TensorFlow Projector (https://projector.tensorflow.org/)
"""
# obtain tweets.json from https://gist.github.com/gd3kr/948296cf675469f5028911f8eb276dbc
import pandas as pd
import json
from openai import OpenAI
@adtac
adtac / Dockerfile
Last active May 16, 2025 08:58
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@epurdy
epurdy / gist:a348a243b7f48a74b4d50fb2488fb667
Created November 30, 2023 04:06
Glicko ratings derived from all known wars in history
NAME OF BELLIGERENT Rating +/- Deviation (sorted by Rating - Deviation)
Turkistan Islamic Party 3587 +/- 113
Dadullah Front 3581 +/- 111
High Council of Afghanistan Islamic Emirate 3581 +/- 111
Syrian Arab Republic 3429 +/- 161
ISIL-YP 3250 +/- 166
GPC 3233 +/- 166
Saleh 3163 +/- 163
Supreme Political Council 3159 +/- 163
@veekaybee
veekaybee / normcore-llm.md
Last active June 5, 2025 08:38
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

@mihailik
mihailik / massBlock.js
Last active April 13, 2023 11:20
Block everyone who liked this tweet, except people you follow
//@ts-check
async function massBlock() {
const dummy = {};
const progressPopup = await showProgressPopup();
const thumbsUp = '\uD83D\uDC4D';
async function showProgressPopup() {
const animationTimeMsec = 200;
@ryanfb
ryanfb / bookmarks_export.rb
Last active November 21, 2022 22:13
Export your Twitter Bookmarks to JSON. This will also delete all your Twitter Bookmarks, 50 Bookmarks at a time, to get around API limits. Now at: https://github.com/ryanfb/twitter-bookmarks-export
#!/usr/bin/env ruby
# Based on: https://github.com/twitterdev/Twitter-API-v2-sample-code/blob/main/Bookmarks-lookup/bookmarks_lookup.rb
# See: https://github.com/ryanfb/twitter-bookmarks-export
require 'json'
require 'typhoeus'
require 'twitter_oauth2'
# First, you will need to enable OAuth 2.0 in your App’s auth settings in the Developer Portal to get your client ID.
# Inside your terminal you will need to set an enviornment variable
# export CLIENT_ID='your-client-id'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# This is a new feature, so make sure to update to the latest version of transformers!
# You will also need to pip install tensorflow_text
import tensorflow as tf
from transformers import TFAutoModel, TFBertTokenizer
class EndToEndModel(tf.keras.Model):
def __init__(self, checkpoint):
super().__init__()
@pmbaumgartner
pmbaumgartner / digit_ngram_suggester.py
Last active July 1, 2024 16:08
A span candidate suggester function for spaCy that suggests spans containing a digit.
from typing import Optional, Iterable, cast, List
from thinc.api import get_current_ops, Ops
from thinc.types import Ragged, Ints1d
from spacy.pipeline.spancat import Suggester
from spacy.tokens import Doc
from spacy.util import registry
@registry.misc("ngram_digits_suggester.v1")