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

Using GPT as shown in the paper #10

Open
MikeDoes opened this issue Jun 1, 2021 · 4 comments
Open

Using GPT as shown in the paper #10

MikeDoes opened this issue Jun 1, 2021 · 4 comments

Comments

@MikeDoes
Copy link

MikeDoes commented Jun 1, 2021

I am interested in using GPT as the main model as BERT is not performing too well.

Has it been implemented? Otherwise I am ready to implement it myself. Please let me know

@MikeDoes
Copy link
Author

MikeDoes commented Jun 1, 2021

Oh I found it here. Turns out the choices are:

'bert-large-uncased', 'bert-large-cased', 'bert-base-uncased', 'bert-base-cased', 'gpt2', 'gpt2-medium', 'gpt2-large', 'gpt2-xl'

@MikeDoes
Copy link
Author

MikeDoes commented Jun 1, 2021

I attempted to run it with the gpt2-xl parameters, however I got the following error:
Traceback (most recent call last):
File "/usr/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/content/language-models-are-knowledge-graphs-pytorch/process.py", line 29, in bfs
return BFS(s, end, graph, max_size, black_list_relation)
File "/content/language-models-are-knowledge-graphs-pytorch/utils.py", line 19, in BFS
visited = [False] * (max(graph.keys())+100)
ValueError: max() arg is an empty sequence
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "extract.py", line 74, in
for triplets in parse_sentence(sent.text, tokenizer, encoder, nlp, use_cuda=use_cuda):
File "/content/language-models-are-knowledge-graphs-pytorch/process.py", line 94, in parse_sentence
for output in pool.imap_unordered(bfs, params):
File "/usr/lib/python3.7/multiprocessing/pool.py", line 748, in next
raise value
File "/usr/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/content/language-models-are-knowledge-graphs-pytorch/process.py", line 29, in bfs
return BFS(s, end, graph, max_size, black_list_relation)
File "/content/language-models-are-knowledge-graphs-pytorch/utils.py", line 19, in BFS
visited = [False] * (max(graph.keys())+100)
ValueError: max() arg is an empty sequence

@MikeDoes
Copy link
Author

MikeDoes commented Jun 2, 2021

Also tried running it with just gpt2-large, same error and empty output file

@lingyu123-su
Copy link

got this error too

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