Skip to content

Instantly share code, notes, and snippets.

@Tknott95
Last active August 29, 2023 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tknott95/a09780e12c3cae703baa4bfb4295108f to your computer and use it in GitHub Desktop.
Save Tknott95/a09780e12c3cae703baa4bfb4295108f to your computer and use it in GitHub Desktop.
Quick install Model Quantized huggingface via pip
#!/bin/sh
pkgs=(
"huggingface_hub"
"python-dotenv" "openai"
"torch torchvision torchaudio"
"bitsandbytes"
"accelerate>=0.20.3"
"git+https://github.com/huggingface/transformers"
)
for pkg in "${pkgs[@]}"; do
echo -e "\n\x1B[96m INSTALLING: $pkg \x1B[0m"
pip install $pkg
done
@Tknott95
Copy link
Author

Tknott95 commented Aug 29, 2023

** for cpu only **

#!/bin/sh

pkgs=(
  "huggingface_hub" 
  "python-dotenv" "openai"
  "torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu"
  "bitsandbytes" 
  "gradio"
  "accelerate>=0.20.3"
  "transformers==4.30"
  # "git+https://github.com/huggingface/transformers"
)  

for pkg in "${pkgs[@]}"; do
  echo -e "\n\x1B[96m  INSTALLING:   $pkg \x1B[0m"
  pip install $pkg
done



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment