Skip to content

Instantly share code, notes, and snippets.

View Steboss's full-sized avatar

Steboss Steboss

View GitHub Profile
@Steboss
Steboss / submit2.sh
Created June 5, 2025 09:29
detailed version of submit file
#!/bin/bash
#SBATCH -A your_account
#SBATCH -p your_partition
#SBATCH -N 4 # example with 4 nodes
#SBATCH -t 04:00:00 # max run time
#SBATCH -J "something_in_line_with_your_system"
export CONFIG="fuji-70B-v2-flash" # here you can insert, for example, fuji-7B-v2-flash
export CONTAINER="ghcr.io/nvidia/jax:axlearn" # this is our public jax-axlearn container
@Steboss
Steboss / submit.sh
Created June 4, 2025 13:03
Example for using SLURM in Fuji
#!/bin/bash
#SBATCH -A something
#SBATCH -p some partition
#SBATCH -N 2 # number of nodes to use
#SBATCH -t
#SBATCH -J
export CONFIG="fuji-70B-v2-flash"
export CONTAINER="my-container"
matmul forward matmul backward
C OpenMP 7.82 +/- 0.12 2.90 +/- 0.03
Rust base 28.52 +/- 0.32 12.25 +/- 0.16
Rust Rayon 4.14 +/- 0.01 4.24 +/- 0.02
Rust Blas 0.05 +/- 0.01 0.19 +/- 0.01
@Steboss
Steboss / average_benchmark.csv
Created January 24, 2024 21:22
Average time benchmark
# of lines average time (s)
1000 0.27 ± 0.01
10000 0.32 ± 0.01
100000 0.97 ± 0.02
1000000 7.27 ± 0.06
10000000 64.29 ± 0.10
@Steboss
Steboss / average_benchmark.csv
Created January 24, 2024 21:21
Benchmark of Apache Beam average calculator
# of lines time (s)
1000 0.27 ± 0.01
10000 0.32 ± 0.01
100000 0.97 ± 0.02
1000000 7.27 ± 0.06
10000000 64.29 ± 0.10
@Steboss
Steboss / embeddings.txt
Created October 12, 2021 15:51
Example of embeddings
34 10
34 0.48683107 0.14057207 0.3592165 -0.13256235 -0.49405771 -0.18247333 0.9730174 0.90780646 -0.54426414 0.19603086
1 -0.8219996 -0.07360967 -0.37923583 0.1678768 0.5701133 -0.022573324 0.5270768 0.1042953 -1.1950656 0.038347103
33 0.85932285 0.4355257 0.4255835 0.3498892 -0.2654177 -0.13620856 0.95363593 0.76315534 -0.75525486 -0.031420168
3 -0.6389102 0.13940942 0.121233 -0.47521314 -0.19695918 0.27296686 0.80421066 0.37764257 -0.53217506 0.50822085
2 -0.6869131 0.25971353 -0.97738224 -0.17773396 0.12573187 0.17894426 0.46030718 0.5900712 -1.0935975 0.6173614
@Steboss
Steboss / embeddings.csv
Last active October 12, 2021 15:51
Example of final embeddings
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
34 10
34 0.48683107 0.14057207 0.3592165 -0.13256235 -0.49405771 -0.18247333 0.9730174 0.90780646 -0.54426414 0.19603086
1 -0.8219996 -0.07360967 -0.37923583 0.1678768 0.5701133 -0.022573324 0.5270768 0.1042953 -1.1950656 0.038347103
33 0.85932285 0.4355257 0.4255835 0.3498892 -0.2654177 -0.13620856 0.95363593 0.76315534 -0.75525486 -0.031420168
3 -0.6389102 0.13940942 0.121233 -0.47521314 -0.19695918 0.27296686 0.80421066 0.37764257 -0.53217506 0.50822085
2 -0.6869131 0.25971353 -0.97738224 -0.17773396 0.12573187 0.17894426 0.46030718 0.5900712 -1.0935975 0.6173614
@Steboss
Steboss / generate_input_data.py
Created October 12, 2021 15:45
Input data form sequences
for random_walk in random_walks:
N = len(random_walk)
#print(random_walk)
for i in range(N):
idxs_left = np.arange(max(0, i-window_size), i).tolist()
idxs_right = np.arange(i+1, min(N, i+window_size+1)).tolist()
for j in idxs_left:
X.append(random_walk[i])
y.append(random_walk[j])
@Steboss
Steboss / build_deepwalk_corpus.py
Created October 12, 2021 15:43
Create the corpus
walks = build_deepwalk_corpus(G,
num_paths = number_walks,
path_length = walk_length,
rand = random.Random(42)
)
@Steboss
Steboss / plot_rms_hurst.py
Created February 25, 2021 10:32
Return values and plot RMS and get Hurst coefficients
scales, fluct_to_array, coeff_to_array= dfa.play(X,5,9,0.25)
print("Fluctuations")
print(fluct_to_array)
print("Coefficients, swapped")
print(coeff_to_array)
#we need to swap the order here, due to the way coeff are computed!
coeff_tmp = coeff_to_array[1]
coeff_to_array[1] = coeff_to_array[0]
coeff_to_array[0] = coeff_tmp
fluctfit = 2**np.polyval(coeff_to_array,np.log2(scales))