Skip to content

Instantly share code, notes, and snippets.

View danieldk's full-sized avatar

Daniël de Kok danieldk

View GitHub Profile
{
inputs = {
tgi-nix.url = "github:danieldk/tgi-nix";
#tgi-nix.url = "path:/home/daniel/git/tgi-nix";
nixpkgs.follows = "tgi-nix/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
diff --git a/pkgs/development/python-modules/torch/default.nix b/pkgs/development/python-modules/torch/default.nix
index 4e3d54f4caa4..00d6b2727981 100644
--- a/pkgs/development/python-modules/torch/default.nix
+++ b/pkgs/development/python-modules/torch/default.nix
@@ -232,7 +232,12 @@ buildPythonPackage rec {
};
patches =
- lib.optionals cudaSupport [ ./fix-cmake-cuda-toolkit.patch ]
+ [
# Author: Daniel de Kok
# Usage: python shard.py --safetensors-path /fsx/danieldk/4bit-gptq-instruct/gptq_model-4bit-128g.safetensors --framework torch --output-path /fsx/danieldk/4bit-gptq-instruct/gptq-sharded
import argparse
import safetensors
import huggingface_hub
def get_args():
@danieldk
danieldk / punct-unigrams-bigrams.txt
Created September 2, 2023 09:04
Punctuation unigram frequencies across various programming languages, with their most common bigrams
_ 44919, bigrams: __: 1445, ._: 531, _(: 529, _): 138, (_: 99
, 42109, bigrams: ),: 3297, ",: 3266, ],: 1725, },: 461, >,: 389
. 37513, bigrams: ..: 1881, ).: 1539, ._: 531, ].: 436, .": 431
) 32189, bigrams: (): 6046, );: 3852, ),: 3297, )): 2780, "): 2528
( 32188, bigrams: (): 6046, (": 2536, (&: 1116, ((: 699, _(: 529
: 24991, bigrams: ::: 4528, ):: 2302, ":: 849, ]:: 427, :{: 351
" 22854, bigrams: ",: 3266, "": 2633, (": 2536, "): 2528, ":: 849
= 20709, bigrams: ==: 1217, =": 670, +=: 351, !=: 347, =>: 316
/ 12470, bigrams: //: 5087, /*: 494, */: 493, :/: 239, </: 163
; 10225, bigrams: );: 3852, };: 895, ?;: 473, ";: 468, ];: 456
zsh 4................26.35
zsh 3................28.07
zsh 2................28.62
Maltron Colswap......28.96
Rolll................30.67
RSTHD................30.77
Semimak JQ...........31.48
Maltron..............31.94
Whorf................32.15
Semimak..............32.16
Reference: QWERTY
q w e r t | y u i o p -
a s d f g | h j k l ; '
z x c v b | n m , . /
|
total: 274518150.875; scaled: 1.9124203185633584
base: 160930274.5 / t: 29114226; n: 19670615; e: 13467191; r: 10704640.5; o: 8845495;
same finger: 42968625 / ed: 4340025; rt: 3347550; tr: 3309420; un: 3211310; de: 3065845;
long jump hand: 10921500 / in: 2183465; on: 1408861; ve: 786052; ce: 544306; om: 541916;
long jump: 20913880 / ce: 5443060; ec: 4162360; un: 3211310; um: 1122550; ny: 1111780;
Counts of non-alpha characters across Rust and Python projects.
20336 _
15827 ,
14507 .
13524 :
11606 )
11599 (
7986 "
5677 /
generated Feb 17, 2023 11:01:14
system MacOS 13.2.1 Darwin 22.3.0 arm64
emacs 28.2 ~/.emacs.d/
doom 3.0.0-pre PROFILE=_@0 grafted, HEAD -> master, origin/master,
origin/HEAD e9662492 2023-01-01 21:55:13 -0500 ~/.doom.d/
shell /bin/zsh
features ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE PDUMPER THREADS
TOOLKIT_SCROLL_BARS ZLIB
traits batch envvar-file
modules :config use-package :completion company ivy :ui doom doom-dashboard
#include <stdlib.h>
#include <cblas.h>
int const M = 7;
int const K = 1026;
int const N = 1026;
int main() {
float const *A = (float *) calloc(M * K, sizeof(float));
diff --git a/thinc/backends/__init__.py b/thinc/backends/__init__.py
index ba4daaa8..1b39deb3 100644
--- a/thinc/backends/__init__.py
+++ b/thinc/backends/__init__.py
@@ -79,6 +79,10 @@ def _import_extra_cpu_backends():
from thinc_apple_ops import AppleOps
except ImportError:
pass
+ try:
+ from thinc_mkl_ops import MKLOps