-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Deberta V2 Models #2739
Comments
I've just pushed #2740 which should hopefully add the missing metal kernels. |
👀 Funny enough I've been working on it a little bit this afternoon, I had something not quite right in the text classification side of things. Ill sync up my fork here in a little bit, and push up my text classification fixes and see if that works for you @emschwartz |
Amazing! I just tried rebasing the fork on @LaurentMazare's change and it does indeed work. Thank you both for your work on this! |
Also for what it's worth, I wanted to use nvidia/quality-classifier-deberta and translated their pytorch code sample using @BradyBonnette's branch. Here's the (AI-generated / modified) version of @BradyBonnette's example: nvidia/quality-classifier-deberta with candle
|
@emschwartz I just pushed up my latest updates, which also contains the latest sync from the main HuggingFace repo (which includes the metal updates). Feel free to give it a try directly from my fork if you wish. It now does token classification and text classification. I am looking over some of the stuff that I did originally in my main.rs example file, and wondering what I was thinking lol. I think I can shorten some of that up. I still don't have anything in the readme yet since I am making sure everything else still works. |
@emschwartz I added a preliminary README included with my example. If you want to try anything out, feel free. It's probably good someone other than me tries it out before I make a pull request :) |
Looks pretty good to me! My one suggestion about the readme would be to have the first example be one that pulls a model from HuggingFace rather than assuming the user has a locally fine-tuned model. That feels like a more advanced use of this. Might also be worth having a note about using the GPU feature flags that correspond to the platform you're on (because the examples all include cuda). Thanks again for your work on this! |
@emschwartz No problem! My pleasure. Thanks for the feedback, I can definitely do that. I didn't have any agenda in mind when I put the examples in that order other than "that's how they appeared in my I suppose the only thing about the GPU feature flags is that they're flags of I could add an example showing how to run it on the CPU, which is really nothing more than adding Were you able to try out my stuff with the quality-classifier thing you were working with? |
Makes sense!
Yup! Works like a charm 😊 |
Glad to hear it. Tomorrow Ill change up some of the documentation a little bit, then Ill start up a pull request. I am almost positive there will be some things that need changed or added, and that's OK. I am just glad to see that it's working for someone other than my development machine here! :) |
@BradyBonnette I just ran into a small inconsistency between the results I'm seeing using Candle vs PyTorch. The tokenization is slightly different and seems to be due to tokens being parsed such as "_Light" or "Light". I saw in the other thread that you mentioned something about SentencePiece and loading the Thanks again for your help! |
@emschwartz Yeah I do remember there being something with |
@emschwartz I've got a draft PR up, but haven't submitted it yet. If there's anything else you can find let me know. I did a complete rebase/squash of all my commits in preparation for the PR, so if you were using anything from my fork you might have to reconcile that. |
@BradyBonnette has been maintaining a branch to add support for DebertaV2 models #1177 (comment). It would be amazing to have that merged in 🙏
The one issue I ran into with the current diff is that there's an unsupported operation when running with the
metal
feature:The text was updated successfully, but these errors were encountered: