Coder Social home page Coder Social logo

Simplify v2/Chat.py about chatrwkv HOT 8 CLOSED

blinkdl avatar blinkdl commented on July 20, 2024
Simplify v2/Chat.py

from chatrwkv.

Comments (8)

KerfuffleV2 avatar KerfuffleV2 commented on July 20, 2024 2

Yeah I wont merge such large changes

Fair enough. I think at some point you're going to have to clean up the code and it's going to be more difficult the larger and more complicated it becomes. Your choice though.

The best way to understand something is to write your own version.

I actually already did. I wrote a Rust based implementation here: https://github.com/KerfuffleV2/smolrsrwkv

It's CPU only and actually runs about as fast as ChatRWKV in cpu fp32 and cpu fp32i8 mode.

If you think it could help other people in the community, please feel free to link it if you want to. (Also, I'd be happy to receive any constructive criticism about it.)

from chatrwkv.

BlinkDL avatar BlinkDL commented on July 20, 2024

My code is a horrible mess (too busy to refactor)

You can use RWKV pip package: https://pypi.org/project/rwkv/ to write your own version from scratch

from chatrwkv.

djaffer avatar djaffer commented on July 20, 2024

image

Getting error after converting the model.

from chatrwkv.

BlinkDL avatar BlinkDL commented on July 20, 2024

Make sure you are using latest rwkv (0.7.2)
pip install rwkv --upgrade

from chatrwkv.

KerfuffleV2 avatar KerfuffleV2 commented on July 20, 2024

My code is a horrible mess (too busy to refactor)

Just checking. You're still not interested in letting someone else clean it up. Correct?

(Mostly talking about the actual model, not the chat example.)

from chatrwkv.

BlinkDL avatar BlinkDL commented on July 20, 2024

Just checking. You're still not interested in letting someone else clean it up. Correct?
(Mostly talking about the actual model, not the chat example.)

Please feel free to fork and write a better version :)

I will clean it when I am less busy (now training lots of models everyday)

from chatrwkv.

KerfuffleV2 avatar KerfuffleV2 commented on July 20, 2024

I'd be willing to do that, but it's something that would be a significant amount of work. So it basically would only be worth putting the time into if there was a pretty good chance of the changes getting accepted.

Obviously it wouldn't be reasonable to expect you to promise to merge a pull request before even seeing it, but there's still a way to find out of something is generally the kind of change you're looking for/would accept. You can see my previous pull #47 for the type of changes I'm talking about.

from chatrwkv.

BlinkDL avatar BlinkDL commented on July 20, 2024

I'd be willing to do that, but it's something that would be a significant amount of work. So it basically would only be worth putting the time into if there was a pretty good chance of the changes getting accepted.

Yeah I wont merge such large changes, but it will be great for understanding how the chat mode works, if you are interested :) The best way to understand something is to write your own version.

And it will be beneficial for the community because people can look at different implementations.

from chatrwkv.

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.