Giter Site home page Giter Site logo

MPS (Apple Silicon) Support about gemma_pytorch HOT 2 OPEN

google avatar google commented on August 9, 2024 10
MPS (Apple Silicon) Support

from gemma_pytorch.

Comments (2)

bghira avatar bghira commented on August 9, 2024 4

pytorch 2.3 has bf16 and complex tensor support, and dockerised containers now work @lamroger

from gemma_pytorch.

lamroger avatar lamroger commented on August 9, 2024

Took a look, a few things.

Linux / mps support looks to be in progress still pytorch/pytorch#81224 so running in a container isn't ready yet.

MPS has some limitations around complex tensors atm. Since gemma uses RoPE, it uses complex tensors and errors out if you run it locally.

https://github.com/pytorch/pytorch/pull/116764/files#diff-fe061f10677283971d77576718d3a04a00b2225d72c043fd59222a882b92c64bR654

freqs_cis = self.freqs_cis.index_select(0, input_positions)

Running locally with python scripts/run.py --ckpt gemma-2b-it.ckpt --variant 2b --device mps

from gemma_pytorch.

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.