Skip to content

Instantly share code, notes, and snippets.

View jason9075's full-sized avatar
🇹🇼
Z...z...z... -.-

Jason Kuan jason9075

🇹🇼
Z...z...z... -.-
View GitHub Profile
@veekaybee
veekaybee / normcore-llm.md
Last active May 4, 2024 21: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

@zrruziev
zrruziev / NUMA node problem.md
Last active May 4, 2024 11:11
Fixing "successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero" problem

What is NUMA (Non-Uniformed Memory Access)

Non-Uniform Memory Access (NUMA) is one of the computer memory design methods used in multiprocessor systems, and the time to access the memory varies depending on the relative position between the memory and the processor. In the NUMA architecture, when a processor accesses its local memory, it is faster than when it accesses the remote memory. Remote memory refers to memory that is connected to another processor, and local memory refers to memory that is connected to its own processor. In other words, it is a technology to increase memory access efficiency while using multiple processors on one motherboard. When a specific processor runs out of memory, it monopolizes the bus by itself, so other processors have to play. , and designate 'access only here', and call it a NUMA node.

1. Check Nodes

lspci | grep -i nvidia
  
01:00.0 VGA compatible controller: NVIDIA Corporation TU106 [GeForce RTX 2060 12GB] (rev a1)
@nguyenhoan1988
nguyenhoan1988 / install_dlib_conda.md
Created October 19, 2021 22:05
Installing dlib using conda with CUDA enabled

Installing dlib using conda with CUDA enabled

Prerequisite: conda and/or miniconda are already installed

  1. Create a conda environment.
$ conda create -n dlib python=3.8 cmake ipython
  1. Activate the environment.
@ryderdamen
ryderdamen / gce-to-gcs-uploads.md
Created December 4, 2018 15:43
Uploading Files from Google Compute Engine (GCE) VMs to Google Cloud Storage (GCS)

Uploading Files from Google Compute Engine (GCE) VMs to Google Cloud Storage (GCS)

I had a bit of trouble trying to configure permissions to upload files from my Google Compute Engine instance to my Google Cloud Storage bucket. The process isn't as intuitive as you think. There are a few permissions issues that need to be configured before this can happen. Here are the steps I took to get things working.

Let's say you want to upload yourfile.txt to a GCS bucket from your virtual machine. You can use the gsutil command line tool that comes installed on all GCE instances.

If you've never used the gcloud or gsutil command line tools on this machine before, you will need to initialize them with a service account.

@Prasad9
Prasad9 / annotation.xml
Created November 6, 2017 13:54
A sample XML annotation file based on Pascal VOC format.
<annotation>
<folder>GeneratedData_Train</folder>
<filename>000001.png</filename>
<path>/my/path/GeneratedData_Train/000001.png</path>
<source>
<database>Unknown</database>
</source>
<size>
<width>224</width>
<height>224</height>
@junegunn
junegunn / gist:f4fca918e937e6bf5bad
Last active May 4, 2024 05:07
Browsing git commit history with fzf
# fshow - git commit browser (enter for show, ctrl-d for diff, ` toggles sort)
fshow() {
local out shas sha q k
while out=$(
git log --graph --color=always \
--format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" |
fzf --ansi --multi --no-sort --reverse --query="$q" \
--print-query --expect=ctrl-d --toggle-sort=\`); do
q=$(head -1 <<< "$out")
k=$(head -2 <<< "$out" | tail -1)
@painejake
painejake / convert_to_lower-case.sh
Created February 22, 2011 11:33
Rename files and folders to lowercase recursively
#!/bin/bash
# Rename all directories. This will need to be done first.
# Process each directory’s contents before the directory itself
find * -depth -type d | while read x
do
# Translate Caps to Small letters
y=$(echo "$x" | tr '[A-Z ]' '[a-z_]');
# create directory if it does not exit
if [ ! -d "$y" ]; then