Skip to content

Instantly share code, notes, and snippets.

View jchook's full-sized avatar

Wes Roberts jchook

  • Meter AI, Inc.
  • Tübingen, Germany
View GitHub Profile
@veekaybee
veekaybee / normcore-llm.md
Last active April 23, 2024 16:03
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

@rain-1
rain-1 / llama-home.md
Last active February 22, 2024 05:52
How to run Llama 13B with a 6GB graphics card

This worked on 14/May/23. The instructions will probably require updating in the future.

llama is a text prediction model similar to GPT-2, and the version of GPT-3 that has not been fine tuned yet. It is also possible to run fine tuned versions (like alpaca or vicuna with this. I think. Those versions are more focused on answering questions)

Note: I have been told that this does not support multiple GPUs. It can only use a single GPU.

It is possible to run LLama 13B with a 6GB graphics card now! (e.g. a RTX 2060). Thanks to the amazing work involved in llama.cpp. The latest change is CUDA/cuBLAS which allows you pick an arbitrary number of the transformer layers to be run on the GPU. This is perfect for low VRAM.

  • Clone llama.cpp from git, I am on commit 08737ef720f0510c7ec2aa84d7f70c691073c35d.
@nopeless
nopeless / check-prime.ts
Last active April 5, 2024 20:26
static prime checking using typescript types
// Prime checking regex, which this code is based off of
// https://regex101.com/r/RIJkGF/1
type StringDivisible<n extends string, div extends string> = n extends `` ? true : n extends `${div}${infer r}` ? StringDivisible<r, div> : false;
type Substrings<n extends string, d extends string = ""> = n extends `${d}${infer r}` ? readonly [` ${d}`, ...Substrings<r, ` ${d}`>] : readonly [];
type StringFactors<n extends string> = Substrings<n> extends readonly [unknown, ...infer R extends readonly string[], unknown] ? R : never;
type StringIsPrime<n extends string, Factors extends readonly string[] = StringFactors<n>> = Factors extends readonly [infer s extends string, ...infer R extends readonly string[]] ? StringDivisible<n, s> extends true ? false : StringIsPrime<n, R> : true;
type RepeatStringByStringDigit<str extends string, d extends string> =
@bitti
bitti / gfm-render
Created May 20, 2022 23:29
Offline renderer for GitHub flavoured markdown
#!/usr/bin/ruby
require 'redcarpet'
require 'erb'
input = ARGV[0] && ARGV[0] != "-" && File.open(ARGV[0]) || STDIN
output = ARGV[1] && File.open(ARGV[1], "w") || STDOUT
File.join(ENV["XDG_CACHE_HOME"] || "#{ENV['HOME']}/.cache", "gfm-render")
class RenderWithTaskLists < Redcarpet::Render::HTML
Twitter ID Screen name Followers Removal observed Before After
17461978 SHAQ 15612791 2022-02-26T22:24:52Z SHAQ.ETH SHAQ.SOL
21910850 jakeowen 2119904 2022-02-26T15:45:18Z jakeowen.eth Jake Owen
7846 ijustine 1811449 2022-03-09T14:43:37Z iJustine.eth iJustineUltra
1666038950 BoredElonMusk 1752290 2022-02-17T08:05:47Z bored.eth Bored
381051960 ethRuby 1267133 2022-03-19T08:08:11Z CryptoSolis.eth Ruby
1282418324228337665 wsbmod 832406 2022-02-24T06:52:07Z wsbmod.eth wsbmod
20882981 EclecticMethod 495235 2022-02-18T04:39:30Z eclecticm.eth Eclectic Method
811350 alexisohanian 479340 2022-02-08T06:31:55Z AlexisOhanian.eth 7️⃣7️⃣6️⃣ Alexis Ohanian 7️⃣7️⃣6️⃣
22784458 Fwiz 410813 2022-03-22T08:54:42Z Ryan Wyatt - fwiz.eth 💜 Ryan Wyatt - @ GDC
@Amir22010
Amir22010 / convert_voc_to_yolo.md
Created February 22, 2020 22:01 — forked from myounus96/convert_voc_to_yolo.md
convert pascal voc dataset to yolo format

Convert PascalVOC Annotations to YOLO

This script reads PascalVOC xml files, and converts them to YOLO txt files.

Note: This script was written and tested on Ubuntu. YMMV on other OS's.

Disclaimer: This code is a modified version of Joseph Redmon's voc_label.py

Instructions:

  1. Place the convert_voc_to_yolo.py file into your data folder.
@antirez
antirez / lmdb.tcl
Created April 28, 2017 15:40
LMDB -- First version of Redis written in Tcl
# LVDB - LLOOGG Memory DB
# Copyriht (C) 2009 Salvatore Sanfilippo <antirez@gmail.com>
# All Rights Reserved
# TODO
# - cron with cleanup of timedout clients, automatic dump
# - the dump should use array startsearch to write it line by line
# and may just use gets to read element by element and load the whole state.
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands.
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump!
@dimkir
dimkir / nightmare-on-amazon-linux.MD
Last active February 6, 2021 17:45
How to run nightmare on Amazon Linux

Running nightmare on Amazon Linux

You may have thought of running nightmare on AWS Lambda. But before we can run it on Lambda, we need first to make it run on Amazon Linux.

Provision instance which replicates Lambda environment

According to AWS Documentation on Lambda Execution Environment and available Libraries we would need this AMI image with this alias amzn-ami-hvm-2016.03.3.x86_64-gp2. Keep in mind that AMI-image-id for this instance would be different in different regions (eg):

  • In eu-west-1 - ami-f9dd458a
  • In us-east-1 - ami-6869aa05
@kaspergrubbe
kaspergrubbe / build_termite_and_vte.sh
Created February 3, 2017 03:08
Build termite terminal and vte/vte-ng on Ubuntu
# VTE
apt-get install autoconf libglib2.0-dev gtk-doc-tools libpcre2-dev libgirepository1.0-dev gperf libvte-2.91-dev libvte-dev valac unzip
wget https://github.com/thestinger/vte-ng/archive/0.46.0.a.zip
unzip 0.46.0.a.zip
rm 0.46.0.a.zip
cd vte-ng-0.46.0.a
bash autogen.sh
make && make install
cd ~
rm -rf vte-ng-0.46.0.a/

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?