The relationship between hugging face and stanza models #994
-
Hi! I was wondering whether the stanza models are in sync with the ones in hugging face? If I run stanza.download(lang="lang-x"), does the current model in https://huggingface.co/stanfordnlp/stanza-lang-x/tree/main/models/ner get fetched? If the answer is yes, how do I specify which model I want it to use? Some https://huggingface.co/stanfordnlp/stanza-lang-x/tree/main/models/ner "folders" contain multiple models. Specifying the "package" in the stanza.download() function did not work, as it didn't recognize the model I was trying to load. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
There is a default model for each language. You should be able to specify
a different model in the package arguments... which one did it fail to
download?
Note that the models in the page you just linked to are for the upcoming
release, hence the 1.3.1 tag. You can access that now by using the dev
branch if you like.
…On Wed, Apr 6, 2022 at 7:51 AM alesalloum ***@***.***> wrote:
Hi!
I was wondering whether the stanza models are in sync with the ones in
hugging face? If I run stanza.download(lang="lang-x"), does the current
model in
https://huggingface.co/stanfordnlp/stanza-lang-x/tree/main/models/ner get
fetched?
If the answer is yes, how do I specify which model I want it to use? Some
https://huggingface.co/stanfordnlp/stanza-lang-x/tree/main/models/ner
"folders" contain multiple models.
Specifying the "package" in the stanza.download() function did not work,
as it didn't recognize the model I was trying to load.
—
Reply to this email directly, view it on GitHub
<#994>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2AYWJL3LCQJJB6YOSLOBTVDWQFDANCNFSM5SWJNUQA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
It should work for you now. What's going wrong?
…On Tue, Apr 12, 2022 at 4:14 AM alesalloum ***@***.***> wrote:
Thanks John for your response.
I did not really pay attention on the tags, it makes sense now.
For instance, I was not able to use the turku_bert.py model correctly (
https://huggingface.co/stanfordnlp/stanza-fi/tree/main/models/ner). I
guess when the current default model gets replaced by this new model in the
next release, I should be able to use it normally?
—
Reply to this email directly, view it on GitHub
<#994 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2AYWNNCUU6EWD5GDJOE3LVEVLHPANCNFSM5SWJNUQA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hello John, I see that you have just updated models in the -dev branch for some languages. But what does it mean? Are still UD models v. 2.8? What's the difference? |
Beta Was this translation helpful? Give feedback.
-
Good question. For English, we added our hand parsed trees:
https://github.com/stanfordnlp/handparsed-treebank
For Italian, there was quite a bit of work done by the IT maintainers to
unify the tags & lemmas between VIT & ISDT. Since I was doing other stuff
with those datasets anyway, I updated those models.
For Indonesian, there was a specific request to update the GSD models, as
the 2.8->2.9 update was much more substantial than it was for most
languages.
…On Thu, Apr 21, 2022 at 3:44 AM Luigi Talamo ***@***.***> wrote:
Hello John, I see that you have just updated models in the -dev branch for
some languages. But what does it mean? Are still UD models v. 2.8? What's
the difference?
—
Reply to this email directly, view it on GitHub
<#994 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2AYWNNHBNQWLMVPTCAHMTVGEWRJANCNFSM5SWJNUQA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Perhaps there's a mismatch between the version of stanza you're using and the model. You can use stanza 1.4.0, or update to the latest dev branch (no breaking changes yet, but no changes that really impact FI, either). Then something like this should work:
That should automatically download the correct ner model with bert, at which point you can copy that elsewhere if the purpose for downloading it yourself is to be able to use it offline. |
Beta Was this translation helpful? Give feedback.
Perhaps there's a mismatch between the version of stanza you're using and the model. You can use stanza 1.4.0, or update to the latest dev branch (no breaking changes yet, but no changes that really impact FI, either). Then something like this should work:
That should automatically download the correct ner model with bert, at which point you can copy that elsewhere if the purpose for downloading it yourself is to be able to use it offline.