Comments (6)
It seems to work in the terminal.
What do you mean?
Can you please explain step by step what are you doing and how to reproduce the problem?
If the problem only happen inside Vegrant can you provide a minimum Vegrantfile that generates the problem?
Thanks
from lm-scorer.
Here is what I have just to see if I can get a language model(gpt2) to load.
I'm getting:
OSError: Couldn't reach server at 'https://s3.amazonaws.com/models.huggingface.co/bert/gpt2-config.json' to download pretrained model configuration file.
https://drive.google.com/file/d/1gRvVE13UhGBnvUZCsiiip5gGluGdMRnw/view?usp=sharing
from lm-scorer.
The link you shared is private.
Anyway it is likely to be a misconfiguration on your machine rather than a problem with this library.
What the errors is telling you is that the machine is unable to download the model from the server.
from lm-scorer.
It is for exactly this reason that I added the local_files_only directive. This avoids our going connections and only looks for the local files (in cache or in the specified location). It seems that the LMScorer currently doesn't pass kwargs down to the actual 'from_pretrained' method, hence the following would not work.
scorer = LMScorer.from_pretrained("gpt2", local_files_only=True)
It might be helpful if options were passed down to the actual from_pretrained method.
from lm-scorer.
To you both, thanks for your help!
Currently this is my situation. I am using GPT2 with local files successfully.
However, this line..
scorer = LMScorer.from_pretrained("gpt2", device=device, batch_size=batch_size)
is failing because it still wants to access s3.amazonaws.com and is looking for the model names (["gpt2", "gpt2-medium", "gpt2-large", "gpt2-xl", distilgpt2"])
ValueError: Unrecognized model name.Can be one of: gpt2, gpt2-medium, gpt2-large, gpt2-xl, distilgpt2
However, I need it to recognize my gpt2 local files. Is there a way to use lm-scorer by using gpt2 local files?
My apologies. The link should work now. https://drive.google.com/file/d/1UEybSOF88vwcVVSYgut7WIOo2l4iprk0/view?usp=sharing
from lm-scorer.
I was able to finally able to figure out my problem with loading gpt2 and other python modules by changing the envvars file described here: https://stackoverflow.com/questions/3783887/why-cant-python-find-some-modules-when-im-running-cgi-scripts-from-the-web
from lm-scorer.
Related Issues (11)
- Unable to run lm-scorer HOT 1
- Python 3.8 support? HOT 5
- Can't load config for 'gpt2' HOT 5
- Not really correct to include <|endoftext|> token in scoring?
- Support for AutoModelWithLMHead
- Support for Python 3.8
- ValueError: Unable to create tensor, you should probably activate truncation and/or padding with 'padding=True' 'truncation=True' to have batched tensors with the same length. Perhaps your features (`input_ids` in this case) have excessive nesting (inputs type `list` where type `int` is expected).
- Possible missing words HOT 1
- Couple of queries: 1) Fine tuned GPT2 2) BPE Encoding HOT 2
- couldn't load pretrained gpt2 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lm-scorer.