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

Unable to load model from HF #4

Open
levente-murgas opened this issue Jun 28, 2024 · 1 comment
Open

Unable to load model from HF #4

levente-murgas opened this issue Jun 28, 2024 · 1 comment

Comments

@levente-murgas
Copy link

Hi!

First of all, amazing work! I'm trying to load the model with the pretrained weights from HF, but I'm receiving an error, while doing so.
My first attempt:
model = AutoModelForSeq2SeqLM.from_pretrained("flbbb/locost-gsg-pretrained")
And my second attempt:
pipe = pipeline("text2text-generation", model="flbbb/locost-gsg-pretrained")
Both resulting in the error:
ValueError: Unrecognized model in flbbb/locost-gsg-pretrained. Should have a `model_type` key in its config.json, or contain one of the following strings in its name: albert, align, altclip, audio-spectrogram-transformer, ...

Is there a chance that I can get some guidance on how to properly load your model?

Thanks!

@flbbb
Copy link
Owner

flbbb commented Sep 16, 2024

Hi and thanks for your message!
We did not fully integrated our model with the HF ecosystem. Which means you need to use our own class and call .pretrained on this class, instead of using the AutoModel or the pipeline.

Install following the README then:

from models import LOCOSTForConditionalGeneration
model = LOCOSTForConditionalGeneration.from_pretrained("flbbb/locost-gsg-pretrained")

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