Skip to content

Add dtype support - #86

Open
younesbelkada wants to merge 5 commits into
karpathy:masterfrom
younesbelkada:master
Open

Add dtype support#86
younesbelkada wants to merge 5 commits into
karpathy:masterfrom
younesbelkada:master

Conversation

@younesbelkada

@younesbelkada younesbelkada commented Aug 5, 2022

Copy link
Copy Markdown

Motivation

People may want to use minGPT in different precisions (fp16, fp32, bf16). This PR integrates this feature to add this possibility to the library. Only floating point precisions are supported here.
Users can:

  • Create a model with a different precision than fp32

Added features

  • memory footprint tracking of minGPT models
  • Added a new test for checking the memory footprint of casted models

Other

Not sure if a pretrained model can be loaded in the desired dtype (needs to add kwargs on from_pretrained method probably)

@karpathy

Comment thread mingpt/model.py Outdated
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.

1 participant