Skip to content

Simplify some instructions #32

@bitsnaps

Description

@bitsnaps

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions