Skip to content

Instantly share code, notes, and snippets.

View HallerPatrick's full-sized avatar
💭
🐸

Patrick Haller HallerPatrick

💭
🐸
  • Humboldt University of Berlin
  • Berlin
View GitHub Profile
@HallerPatrick
HallerPatrick / .tmux.conf
Created January 28, 2024 19:08
A good basic tmux config
# Optional: Set shell
# set-option -g default-shell /bin/zsh
# For neovim to use the <esc> key faster
set -sg escape-time 10
# Set the base index for windows to 1 instead of 0
set -g base-index 1
# Set the base index for panes to 1 instead of 0
@HallerPatrick
HallerPatrick / reshard.py
Created March 7, 2023 13:23 — forked from benob/reshard.py
Script to decompose/recompose LLAMA LLM models with different number of shards.
# script to decompose/recompose llama model in different number of shards
# note that it loads the full model * 2 in cpu memory
import os
import json
import sys
import torch
import glob
if len(sys.argv) != 4:
/* PrismJS 1.21.0
https://prismjs.com/download.html#themes=prism-dark&languages=markup+css+clike+bash+c+python */
/**
* prism.js Dark theme for JavaScript, CSS and HTML
* Based on the slides of the talk “/Reg(exp){2}lained/”
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {
/* PrismJS 1.21.0
https://prismjs.com/download.html#themes=prism-dark&languages=markup+css+clike+javascript+c+python */
var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function t(e,r){var a,n;switch(r=r||{},M.util.type(e)){case"Object":if(n=M.util.objId(e),r[n])return r[n];for(var i in a={},r[n]=a,e)e.hasOwnProperty(i)&&(a[i]=t(e[i],r));return a;case"Array":return n=M.util.objId(e),r[n]?r[n]:(a=[],r[n]=a,e.forEach(function(e,n){a[n]=t(e,