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

Example: inference OPT-13B in kaggle with benchmarks #18

Open
justheuristic opened this issue Dec 25, 2022 · 0 comments
Open

Example: inference OPT-13B in kaggle with benchmarks #18

justheuristic opened this issue Dec 25, 2022 · 0 comments
Assignees

Comments

@justheuristic
Copy link
Collaborator

justheuristic commented Dec 25, 2022

Model: https://huggingface.co/facebook/opt-13b
Smaller model for experiments: https://huggingface.co/facebook/opt-350m

It would be great to allow inference for this model

Steps:

  • write a config in ./tensor_parallel/slicing_configs.py
    • make sure you split / gather KV similarly to BloomModel
  • find a way to shard a checkpoint such that the model is fully loaded with kaggle's limited ram
  • benchmark performance
    • baseline: model.parallelize
    • inference, batch size = 1 sequence
    • forward no_grad, batch = 4x 64 tokens (if it fits!)
    • forward+backward batch = 4x 64 tokens (if it fits!), make sure you model.gradient_checkpointing_enable() in both cases
@justheuristic justheuristic changed the title Example: inference OPT-13B in kaggle Example: inference OPT-13B in kaggle with benchmarks Dec 25, 2022
@justheuristic justheuristic pinned this issue Dec 25, 2022
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

2 participants