Skip to content

Instantly share code, notes, and snippets.

View shang-vikas's full-sized avatar
🎯
Focusing

Vikas Sangwan shang-vikas

🎯
Focusing
  • New Delhi ,India
View GitHub Profile
@shang-vikas
shang-vikas / build-llm-cpp.sh
Last active March 13, 2026 16:24
build llm-cpp , download code& & reason model, setup litellm
#!/usr/bin/env bash
set -euo pipefail
########################################
# CONFIG
########################################
PREFIX="/opt/llama"
@shang-vikas
shang-vikas / build-llm-cpp.sh
Created March 13, 2026 14:32
build llama cpp with cuda
#!/usr/bin/env bash
set -euo pipefail
########################################
# CONFIG
########################################
PREFIX="/opt/llama"
import torch
from torch import nn
from torch import optim
from collections import OrderedDict
import numpy as np
import warnings
from torchvision.datasets import mnist
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shang-vikas
shang-vikas / convert_to_jpg.py
Created June 23, 2018 19:31
convert csv data to jpg images
from scipy.misc import imsave
import os
import numpy as np
import pandas as pd
from keras.datasets import mnist
def convert_to_jpg(x,y,df_type='train'):
if df_type=='train':
path = os.path.abspath('./digit-recognizer/train')
if not os.path.isdir(path):
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.