Skip to content

Instantly share code, notes, and snippets.

@juan-m12i
juan-m12i / load-context-template-settings.md
Last active December 13, 2023 11:05
PrivateGPT - Feature - load context template from settings
@juan-m12i
juan-m12i / install_llama_cpp.sh
Last active November 27, 2023 11:37
Install llama.cpp
# mostly from https://kubito.dev/posts/llama-cpp-linux-nvidia/
# Define the model path as a variable
MODEL_PATH="models/mistral-7B-v0.1"
# Rest of your shell script
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
# add nvcc to path
echo 'export PATH=/usr/local/cuda/bin:$PATH' >> ~/.zshrc
# https://docs.privategpt.dev/installation
git clone https://github.com/imartinez/privateGPT
cd privateGPT
curl https://pyenv.run | bash
# echo -e '\nexport PYENV_ROOT="$HOME/.pyenv"\n[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"\neval "$(pyenv init -)"\neval "$(pyenv virtualenv-init -)"' >> ~/.zshrc
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc && echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc && echo 'eval "$(pyenv init -)"' >> ~/.zshrc && echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.zshrc
source ~/.zshrc
@juan-m12i
juan-m12i / vm_cuda_gcp_finetuning_mistral.md
Last active December 10, 2023 14:41
Setting up a GCP instance with CUDA on an L4 GPU to run a finetune in Mistral

in GCP

  1. Create a GPU instance (I am using an L4 GPU, with >100 GB hard drive, and 8vcpu, based on Debian 11)
  2. Enable a firewall rule for ingress on port 8888
  3. Connect through ssh to the instance and run the commands below

Command line

sudo apt update
sudo apt -y install build-essential
sudo apt install -y linux-headers-$(uname -r)
@juan-m12i
juan-m12i / 0-startup-overview.md
Created May 15, 2021 12:49 — forked from dideler/0-startup-overview.md
Startup Engineering notes

Keybase proof

I hereby claim:

  • I am juan-m12i on github.
  • I am juan_m12i (https://keybase.io/juan_m12i) on keybase.
  • I have a public key ASBYGr3y9-9E3IFOdtwipbN-FlO8ICVwdbJIhhwuhKQq2Qo

To claim this, I am signing this object:

@juan-m12i
juan-m12i / euler551.ipynb
Created August 31, 2017 15:26
Notebook Euler 551
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.