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

Create top-level torchchat.py CLI binary #215

Merged
merged 1 commit into from
Apr 16, 2024
Merged

Conversation

mergennachin
Copy link
Contributor

@mergennachin mergennachin commented Apr 16, 2024

python torchchat.py {generate, export, eval} --foo --bar

but also you can do:

python export.py --foo --bar

python generate.py --foo --bar

python eval.py --foo --bar

Test Plan:

Added CI test

 mkdir -p checkpoints/stories15M
 cd checkpoints/stories15M
 curl -fsSL -O https://huggingface.co/karpathy/tinyllamas/resolve/main/stories15M.pt
 curl -fsSL -O https://github.com/karpathy/llama2.c/raw/master/tokenizer.model
 cd ../../
 
 export MODEL_PATH=checkpoints/stories15M/stories15M.pt
 export MODEL_NAME=stories15M
 export MODEL_DIR=/tmp

 python generate.py --device cpu --checkpoint-path ${MODEL_PATH} --temperature 0
 python torchchat.py generate --device cpu --checkpoint-path ${MODEL_PATH} --temperature 0

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 16, 2024
@mergennachin mergennachin force-pushed the top_level_torchat branch 6 times, most recently from 53f151c to 7522f02 Compare April 16, 2024 19:01
@mergennachin mergennachin changed the title Create top-level torchat.py CLI binary Create top-level torchchat.py CLI binary Apr 16, 2024
@mergennachin mergennachin merged commit 804d128 into main Apr 16, 2024
8 of 15 checks passed
@mergennachin mergennachin deleted the top_level_torchat branch April 16, 2024 20:16
@Olivia-liu Olivia-liu mentioned this pull request Apr 17, 2024
malfet pushed a commit that referenced this pull request Jul 17, 2024
malfet pushed a commit that referenced this pull request Jul 17, 2024
malfet pushed a commit that referenced this pull request Jul 17, 2024
malfet pushed a commit that referenced this pull request Jul 17, 2024
malfet pushed a commit that referenced this pull request Jul 17, 2024
malfet pushed a commit that referenced this pull request Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants