Skip to content

Instantly share code, notes, and snippets.

View neel04's full-sized avatar
🎧
Just vibing

Neel Gupta neel04

🎧
Just vibing
View GitHub Profile
#!/bin/bash -e
BRANCH="dev"
# Define path for RAM disk
export DISK_PATH="$HOME/workspace"
export JAX_COMPILATION_CACHE_DIR="/tmp/jax_cache"
# Export environment variables pointing to the ramdisk
export HF_HOME="$DISK_PATH/huggingface"
export HF_DATASETS_CACHE="$DISK_PATH/huggingface_datasets"
@neel04
neel04 / run.sh
Last active November 27, 2024 01:33
Runner for React-Jax
#!/bin/bash -e
BRANCH="dev"
IMAGE_NAME="docker.io/neel04/react_image:latest"
CONTAINER_NAME="react_container"
RAMDISK_PATH=$(pwd)/ReAct_Jax/ramdisk/
# arguments for train_model.py
TRAIN_ARGS="--save_dir ./ReAct/outputs/ --dataset 'owt' --group 'owt' \
--num_blocks 8 --width 128 --n_heads 16 --epochs 1 --num_classes 50304 \
--log_interval 750 --save_interval 10000 --seqlen 512 \
@neel04
neel04 / tinytok.json
Created January 4, 2024 02:08
TinyStories custom tokenizer schema
{
"version": "1.0",
"truncation": null,
"padding": null,
"added_tokens": [
{
"id": 0,
"content": "[UNK]",
"single_word": false,
"lstrip": false,
@neel04
neel04 / solution.md
Created October 26, 2023 14:38
(Possible) solution to the puzzle

To be completely honest, I think the puzzle is badly phrased (and the edits don't really help)

Assumptions: We have a queue of n orders. The machine chooses $3$ random orders from n in an unbiased fashion.

"...Forgets about any orders that were skipped"

Is either redundant, or it implies that the machine chooses $3$ random orders, but in the next round chooses from $n-3$ orders.

That assumes we're taking a batch of $3$ orders, as restaurants usually do. So it's $n \choose 3$. Or we could be taking 1 order from the top 3 orders, so $3 \choose 1$.

gpu-st-p4d-24xlarge-44:28065:28065 [0] NCCL INFO Bootstrap : Using eth0:172.31.231.78<0>
gpu-st-p4d-24xlarge-44:28065:28065 [0] NCCL INFO NET/Plugin: Failed to find ncclNetPlugin_v5 symbol.
gpu-st-p4d-24xlarge-44:28065:28065 [0] NCCL INFO NET/Plugin: Failed to find ncclCollNetPlugin_v5 symbol.
gpu-st-p4d-24xlarge-44:28065:28065 [0] NCCL INFO Plugin Path : /opt/hpcx/nccl_rdma_sharp_plugin/lib/libnccl-net.so
gpu-st-p4d-24xlarge-44:28065:28065 [0] NCCL INFO P2P plugin IBext
gpu-st-p4d-24xlarge-44:28065:28065 [0] NCCL INFO NET/IB : No device found.
gpu-st-p4d-24xlarge-44:28065:28065 [0] NCCL INFO NET/IB : No device found.
gpu-st-p4d-24xlarge-44:28065:28065 [0] NCCL INFO NET/Socket : Using [0]eth0:172.31.231.78<0> [1]eth1:172.31.225.87<0> [2]eth2:172.31.235.21<0> [3]eth3:172.31.235.87<0>
gpu-st-p4d-24xlarge-44:28065:28065 [0] NCCL INFO Using network Socket
NCCL version 2.12.12+cuda11.7