Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify some instructions #32

Open
bitsnaps opened this issue Aug 31, 2023 · 0 comments
Open

Simplify some instructions #32

bitsnaps opened this issue Aug 31, 2023 · 0 comments

Comments

@bitsnaps
Copy link

Hi,

I've just tried to make it simpler by putting some values in variables:

USER="TheBloke"
MODEL="WizardCoder-Python-13B-V1.0-GPTQ"
FILES=("config.json" "generation_config.json" "special_tokens_map.json" "tokenizer.model" "tokenizer_config.json" "model.safetensors")

then make loop to download required files:
If you don't want to distinguish between raw and resolve:

%%bash

for FILE in "${FILES[@]}"; do
  !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M "https://huggingface.co/$USER/$MODEL/resolve/main/$FILE" -d "/content/text-generation-webui/models/$MODEL" -o $FILE
done

Use this if you want to distinguish between raw and resolve:

%%bash

for FILE in "${FILES[@]}"; do
  if [[ $FILE == "tokenizer.model" || $FILE == "model.safetensors" ]]; then
    !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M "https://huggingface.co/$USER/$MODEL/resolve/main/$FILE" -d "/content/text-generation-webui/models/$MODEL" -o $FILE
  else
    !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M "https://huggingface.co/$USER/$MODEL/raw/main/$FILE" -d "/content/text-generation-webui/models/$MODEL" -o $FILE
  fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant