Skip to content

Instantly share code, notes, and snippets.

@cvpfus
Last active March 22, 2024 23:13
Show Gist options
  • Save cvpfus/ae9c0d3dce5b825b8ad295eab79fe032 to your computer and use it in GitHub Desktop.
Save cvpfus/ae9c0d3dce5b825b8ad295eab79fe032 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
PRETRAINED=${1:-"hpcaitech/grok-1"}
TOKENIZER=${2:-"tokenizer.model"}
while true; do
echo "Enter the text you want to process:"
read USER_TEXT
torchrun --standalone --nproc_per_node 8 inference_tp.py --pretrained "$PRETRAINED" \
--tokenizer "$TOKENIZER" \
--max_new_tokens 64 \
--text "$USER_TEXT"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment