This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tqdm | |
import numpy as np | |
import pylab as pl | |
import jax, jax.numpy as jp | |
def loss(c): | |
v1 = c[:-2] - c[1:-1] | |
v2 = c[2:] - c[1:-1] | |
nv1 = jp.linalg.norm(v1, axis=1) | |
nv2 = jp.linalg.norm(v2, axis=1) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sa() | |
{ | |
name=$1 | |
if [[ ! -d ~/env/$name ]] | |
then | |
mkdir -p ~/env | |
uv venv ~/env/$name | |
fi | |
source ~/env/$name/bin/activate | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np, os, pickle, tqdm, jax, jax.numpy as jp | |
# setup | |
key = jax.random.PRNGKey(42) | |
batch_size = 1 | |
nl, n_head, vocab_size = 2, 2, 65 | |
n_embd = n_head * 8 | |
nh, hs = n_head, n_embd//n_head | |
B, C = batch_size, n_embd |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// iChannel0 is buffer A | |
// iChannel1 is some texture to use for weights | |
float rand() | |
{ | |
return 0.0; | |
} | |
void mainImage( out vec4 fragColor, in vec2 fragCoord ) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
# allow scripting password, pass as env var MDP | |
MDP=${MDP:-""} | |
# setup some vars | |
export u=$(whoami) | |
export kt=$HOME/.my-keytab |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import time | |
import s3fs | |
fs = s3fs.S3FileSystem( | |
endpoint_url="http://10.67.123.1:9000", | |
key="adni-user", | |
secret="12345679" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bistable: | |
movaps xmm3, xmm0 | |
movaps xmm1, xmm0 | |
mulss xmm3, xmm0 | |
mulss xmm1, xmm3 | |
divss xmm1, DWORD PTR .LC0[rip] | |
addss xmm1, xmm0 | |
movaps xmm0, xmm1 | |
mulss xmm0, xmm1 | |
addss xmm0, xmm3 |
NewerOlder