Git Product home page Git Product logo

Comments (5)

carmocca avatar carmocca commented on August 23, 2024

Hi. Can you add the error you got?

from litgpt.

Einengutenmorgen avatar Einengutenmorgen commented on August 23, 2024

Probably: BFloat16 is not supported on MPS

from litgpt.

Amal-David avatar Amal-David commented on August 23, 2024

Yes, BFloat16 is not supported on MPS.

Adding more details about the error below

`python3 generate/base.py --prompt "Hello, my name is" --checkpoint_dir checkpoints/tiiuae/falcon-7b

Loading model 'checkpoints/tiiuae/falcon-7b/lit_model.pth' with {'block_size': 2048, 'vocab_size': 50254, 'padding_multiple': 512, 'padded_vocab_size': 65024, 'n_layer': 32, 'n_head': 71, 'n_embd': 4544, 'rotary_percentage': 1.0, 'parallel_residual': True, 'bias': False, 'n_query_groups': 1, 'shared_attention_norm': True}
Traceback (most recent call last):
File "/Users/amal/Development/lit-parrot/generate/base.py", line 204, in
CLI(main)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jsonargparse/cli.py", line 85, in CLI
return _run_component(component, cfg_init)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jsonargparse/cli.py", line 147, in _run_component
return component(**cfg)
^^^^^^^^^^^^^^^^
File "/Users/amal/Development/lit-parrot/generate/base.py", line 147, in main
model = Parrot(config)
^^^^^^^^^^^^^^
File "/Users/amal/Development/lit-parrot/lit_parrot/model.py", line 26, in init
self.lm_head = nn.Linear(config.n_embd, config.padded_vocab_size, bias=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/nn/modules/linear.py", line 96, in init
self.weight = Parameter(torch.empty((out_features, in_features), **factory_kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/torch/utils/_device.py", line 76, in torch_function
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/lightning/fabric/utilities/init.py", line 55, in torch_function
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
TypeError: BFloat16 is not supported on MPS`

from litgpt.

carmocca avatar carmocca commented on August 23, 2024

You can pass --precision 16-true or --precision 32-true instead

from litgpt.

Amal-David avatar Amal-David commented on August 23, 2024

Thanks, that worked

from litgpt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.