Skip to content
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

[Feature Request]: Compatible with Torch 2.* #17

Open
1 task done
adb57 opened this issue Dec 5, 2024 · 3 comments
Open
1 task done

[Feature Request]: Compatible with Torch 2.* #17

adb57 opened this issue Dec 5, 2024 · 3 comments

Comments

@adb57
Copy link

adb57 commented Dec 5, 2024

Email (Optional)

No response

Problem

I read the paper and this BERT-based model looks amazing! Only thing is when I go to run it, it appears torch 1.7 is not longer available... is there any way to upgrade this to torch 2.* ?

Proposed Solution

Not sure how much of an overhaul that would be, just a suggestion :)

Alternatives

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@zakidotai
Copy link

Hi,
Can you try the following code to see if it fulfills your requirements?

Also, you can get pytorch 1.7 from here

@adb57
Copy link
Author

adb57 commented Dec 6, 2024

I went to the above website, however the pip command could not find the version of torch. After doing some digging it seems my Python version is too new (3.11) which may be the reason for the problems I have been having. I will upgrade to version 3.8 later today and get back to you!

Thank you very much!

@adb57
Copy link
Author

adb57 commented Dec 9, 2024

Hi, Can you try the following code to see if it fulfills your requirements?

Also, you can get pytorch 1.7 from here

I see this is a different BERT model altogether, but I am confused why the code is so long for a prediction?

The MatBERT_NER seemed fairly intuitive. I just need to provide the pretrained matbert-base and matbert-solid-state models with the huggingface from_pretrained and then use the MATBERT_NER.matbert_ner.predict function on my provided sentences.

The code you provided appears to be training the model? Is there no pre-trained model available on huggingface?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants