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: minGPT add dtype support #16

Open
wants to merge 1 commit into
base: example_mingpt
Choose a base branch
from

Conversation

iejMac
Copy link
Owner

@iejMac iejMac commented Dec 4, 2022

original PR: karpathy/minGPT#86

@iejMac
Copy link
Owner Author

iejMac commented Dec 4, 2022

openai can you check this out?

@github-actions
Copy link

github-actions bot commented Dec 4, 2022

This pull request adds dtype support to the example fake_minGPT model in the model.py file. Tests for the change are added to the test_modeling_gpt2.py file. The changes make it easier to specify the desired dtype when initializing the model and include checks on the specified dtype. A get_memory_footprint() function is also added which will return the memory footprint of the current model in bytes and allows for the benchmarking of the memory footprint of the model and designing tests.

One possible improvement would be to add a comment in the model.py file to explain the purpose of the dtype. This would help future developers better understand the code. Additionally, it may be useful to add more tests to the test_modeling_gpt2.py file to more thoroughly test the new dtype support.

@iejMac iejMac added the example label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant