Code Monkey home page Code Monkey logo

Comments (3)

edwardjhu avatar edwardjhu commented on May 18, 2024

Super cool! Thanks for sharing, Horace!

Do you think it might make sense to make something like this available in torch?

from lora.

Chillee avatar Chillee commented on May 18, 2024

@edwardjhu I think it's an interesting thought. LoRA has certainly become quite popular. OTOH, I'm sure that there will be many more variants and extensions of LoRA proposed in the coming months/years.

One of the hard parts about PyTorch is figuring out how to balance 1. following the leading edge closely enough to be useful to folks, and 2. not following the leading edge so closely that we end up committing to maintaining things that nobody uses anymore.

So, if we wanted to build something like this in torch, we'd need to think about how to build something composable and extensible, or think about what features we could add that are likely to be useful as this technology evolves. For example, this example came out of me making sure that we had the extensibility features to build LoRA in a nice way where you didn't need custom layers :P If you have any other thoughts I'd be happy to hear them!

For example, perhaps if it's inconvenient to save/load lora weights perhaps there's something we could be doing there?

from lora.

edwardjhu avatar edwardjhu commented on May 18, 2024

@Chillee That makes sense! Let's revisit after we see if LoRA stands the test of time. (Same for muP.)

Two questions:

  • Do you see a straightforward way to merge A and B with W in this implementation?
  • I assume that save/load works pretty seamlessly with tensor subclasses. If a user tries to load with torch.Tensor, they will get an error. Is that right?

Btw, if you are okay with it, I'd love to post this on Twitter and tag you since I think many might find this useful!

(Sorry about the delay.)

from lora.

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.