Open ankitkr3 opened 3 years ago
Currently this is not implemented, it loads the individual files from the unzipped file from disc.
@nreimers is there any code to implement this or extract the files from zip?
@nreimers i somehow extracted the model files and loading it into the param model = SentenceTransformer('E:/distiluse-base-multilingual-cased')
but it is giving an error -- ValueError: Unrecognized model in E:/distiluse-base-multilingual-cased\0_DistilBERT. Should have a model_type
key in its config.json, or contain one of the following strings in its name: retribert, t5, mobilebert, distilbert, albert, bert-generation, camembert, xlm-roberta, pegasus, marian, mbart, bart, reformer, longformer, roberta, flaubert, fsmt, bert, openai-gpt, gpt2, transfo-xl, xlnet, xlm, ctrl, electra, encoder-decoder, funnel, lxmert, dpr, layoutlm, rag
@nreimers i somehow extracted the model files and loading it into the param model = SentenceTransformer('E:/distiluse-base-multilingual-cased') but it is giving an error -- ValueError: Unrecognized model in E:/distiluse-base-multilingual-cased\0_DistilBERT. Should have a
model_type
key in its config.json, or contain one of the following strings in its name: retribert, t5, mobilebert, distilbert, albert, bert-generation, camembert, xlm-roberta, pegasus, marian, mbart, bart, reformer, longformer, roberta, flaubert, fsmt, bert, openai-gpt, gpt2, transfo-xl, xlnet, xlm, ctrl, electra, encoder-decoder, funnel, lxmert, dpr, layoutlm, rag
@nreimers also i never got this error before, i used to load the model from my local in the same fashion.
Try it with the most recent version: https://public.ukp.informatik.tu-darmstadt.de/reimers/sentence-transformers/v0.2/distiluse-base-multilingual-cased-v2.zip
If you still have an error, check if the config.json in E:/distiluse-base-multilingual-cased\0_DistilBERT has a key:
"model_type": "distilbert",
@nreimers thanks!
Hi Nils, I have the same question: Is it possible now to load the model from a zip file? The problem with using cloud is that one cannot refers to a folder in cloud. One can only get the url of a certain object (file). Thank you!
Hi Nils, I have the same question: Is it possible now to load the model from a zip file? The problem with using cloud is that one cannot refers to a folder in cloud. One can only get the url of a certain object (file). Thank you!
same question
Hi guys, Thanks for continuous support, i have saved my model in zip at s3 and want to extract and load at the runtime. How can I extract and load it at runtime without writing it into the hard memory?