Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.
Avoid being a link dump. Try to provide only valuable well tuned information.
Neural network links before starting with transformers.
| type term = | |
| | Lam of (term -> term) | |
| | Pi of term * (term -> term) | |
| | Appl of term * term | |
| | Ann of term * term | |
| | FreeVar of int | |
| | Star | |
| | Box | |
| let unfurl lvl f = f (FreeVar lvl) |
| import sys | |
| from time import sleep | |
| import random | |
| import cursor | |
| class Renderer: | |
| def __init__(self, width, height): |
| module Let_syntax = struct | |
| let return = Lwt.return | |
| let (>>=) = Lwt.Infix.(>>=) | |
| let (>>|) = Lwt.Infix.(>|=) | |
| module Let_syntax = struct | |
| let bind m ~f = Lwt.bind m f | |
| end | |
| end |
| -- Note: There is a more complete explanation at https://github.com/hwayne/lets-prove-leftpad/tree/master/idris | |
| import Data.Vect | |
| -- `minus` is saturating subtraction, so this works like we want it to | |
| eq_max : (n, k : Nat) -> maximum k n = plus (n `minus` k) k | |
| eq_max n Z = rewrite minusZeroRight n in rewrite plusZeroRightNeutral n in Refl | |
| eq_max Z (S _) = Refl | |
| eq_max (S n) (S k) = rewrite sym $ plusSuccRightSucc (n `minus` k) k in rewrite eq_max n k in Refl | |
| -- The type here says "the result is" padded to (maximum k n), and is padding plus the original |
| #! /usr/bin/env ocaml | |
| let fprintf = Format.fprintf | |
| type t = | |
| | Tag of {name: string; attributes: (string * string) list; body: t list} | |
| | String of string | |
| let format_attribute f (key, value) = fprintf f " %s=\"%s\"" key value |
| type ('ty,'v) t = | |
| | Nil : ('v, 'v) t | |
| | Cons : 'a * ('ty, 'v) t -> ('a -> 'ty, 'v) t | |
| let cons x l = Cons (x,l) | |
| let plus1 l = Cons ((),l) | |
| let one x = Cons (x,Nil) |
| // Hello! I'm Leo Tindall, the SilverWingedSeraph, and this is a follow-up to my tutorial on | |
| // using match expressions in Rust. | |
| // In my last video, we created a finite state machine to parse and modify some simple markup. | |
| // In this video, we'll make the machine more abstract and more concise. | |
| // We'll start out the same way: defining the four states of the machine. | |
| // However, we'll use a neat trick that Rust | |
| // provides to make things easier later on. We'll ask the compiler to derive the Copy and Clone | |
| // traits on MachineState, so we don't have to worry about borrowing and ownership. |
Taught by Brad Knox at the MIT Media Lab in 2014. Course website. Lecture and visiting speaker notes.