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

Add GPT-J support + benchmark results #13

Merged
merged 1 commit into from
Oct 10, 2023
Merged

Add GPT-J support + benchmark results #13

merged 1 commit into from
Oct 10, 2023

Conversation

tomaarsen
Copy link
Owner

Closes #11

Hello!

Pull Request overview

  • Add support for all GPT-J models.
  • Add benchmark results for GPT-J-6B
  • Add benchmarking script for GPT-J-6B

Details

As simple as

from attention_sinks import AutoModel

model = AutoModel.from_pretrained("EleutherAI/gpt-j-6b", device_map="auto")

Benchmarks

python benchmark/perplexity.py --model_name_or_path EleutherAI/gpt-j-6b --experiment attention_sinks --output_dir benchmark/outputs_gptj_6b
python benchmark/perplexity.py --model_name_or_path EleutherAI/gpt-j-6b --experiment transformers --output_dir benchmark/outputs_gptj_6b
python benchmark/perplexity.py --model_name_or_path EleutherAI/gpt-j-6b --experiment windowed --output_dir benchmark/outputs_gptj_6b

python benchmark/plot_perplexity.py --features perplexity vram --title "Log perplexity & VRAM usage of GPT-J 6B as a function of input lengths" --output_dir benchmark/outputs_gptj_6b --log_perplexity_limit 4

gpt_j_6b_ppl_vram_plotted

  • Tom Aarsen

@tomaarsen tomaarsen merged commit 40f899e into main Oct 10, 2023
@tomaarsen tomaarsen deleted the model/gptj branch October 10, 2023 16:38
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

Successfully merging this pull request may close these issues.

Add support for GPT-J models
1 participant