-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Improve Docs for LanguageModelFeaturizer #10385
Comments
I ran into the same issue and tried finding the reason in the Therefore, any other architecture such as |
Another potential issue comes from the fact that not all models published on https://huggingface.co/models have a Tensorflow implementation. For example,
results in an error
|
@mleimeister wouldn't this be fixed by installing pytorch? |
@koaning i think no, but not sure if tensorflow will compute gradients on pytorch architecture, so it can mess up training |
The tensors that we pass to DIET are static. Rasa uses the huggingface models as a featurizer so the gradients will never update the weights in the Having a pytorch dependency will make for very heavy docker containers though, especially if it already contains tensorflow ... I guess 1GB+ volumes are to be expected. |
@koaning Hm, yes, not sure tbh about adding pytorch as dependency and resulting Docker image sizes. Would this then be more of an ops/infrastructure question re the Docker images? For most models, there seems to be a version of TF weights, sometimes just not under the default specifier. In that case the more limiting factor is that one can currently only use architectures from the hard-coded list in registry.py. I wonder if this could be made more flexible, e.g. by using the HF Auto classes instead to automatically infer the model and tokenizer classes. Edit: the |
@mleimeister oh just to be clear, I don't think that Rasa should add it as a dependency, but I think there's nothing stopping any of our users to do so if they wanted to. |
This was another user forum question that might be relevant for improving the docs. Seemingly the error came from a HF model using a different tokenizer than what we expect (e.g. |
@mleimeister is right i have same issue. please fix it soon as possible... |
We need to run Bert model with AlbertTokenizer. |
Maybe it's worth producing a tutorial on how to extend the registry and pre-/post-processing to accommodate models that Rasa doesn't officially support? I've sketched this out to users in the forum before (see here), but not with a whole lot of detail |
@koernerfelicia you think the main component guide on our docs does not suffice? Part of me is a bit anxious in writing a guide for it because I fear that it may suggest that writing your own components for huggingface kinds of featurizers is a best practice. Certainly for English, I'd prefer to prevent users from trying out all sorts of models if they haven't shown their assistant to an end-user yet. |
I think that's already very useful! I was thinking more of I understand not wanting to encourage the use of/endless fiddling with these models, and ultimately defer to you there! I don't really know the justification behind why we support the models we do support, and think that for example the user I linked wanting to set up Albert seems fair enough to me. I don't think we want to support more models bc we don't have a generic way to do this, so maybe it is easiest to show people how they can extend the component if they want to. |
As a side project, I started an attempt to use the HuggingFace Since it'll take some more time to get this validated, would the docs update be good to clarify the current situation for now? Regarding a tutorial on how to extend the current version with other models, would the docs be the right place, or rather some external ressource we can point to? |
@mleimeister the docs update is definitely good as is to close this imo! I'm not as sure about the tutorial, I think ultimately that is up to @koaning (whether to do a tutorial bc of his reservations, and how we would go about the tutorial). I'm interested to see how you get on with the Auto classes. As you already saw in that other |
Closing this ticket since #10616 has been merged to 3.0.x |
There's a lot of confusion on the forum this week on how to configure the
LanguageModelFeautizer
. This suggests that we may want to add documentation that explains how to link models. I think part of the issue here is that it's hard for a user to know what themodel_name
of any given model on huggingface might be.The text was updated successfully, but these errors were encountered: