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-2 #55

Open
oroojlooy opened this issue Apr 29, 2023 · 0 comments
Open

Using GPT-2 #55

oroojlooy opened this issue Apr 29, 2023 · 0 comments

Comments

@oroojlooy
Copy link

In the README, it is mentioned that Actor-Critic Policies supporting causal LMs (eg. GPT-2/3) and seq2seq LMs (eg. T5, BART). I was wondering how I can use GPT-2 model? I see the following call stack on instantiating and loading the model by default instantiates a seq2seq (encoder-decoder) model. Now, the question is how can I switch to a regular GPT model.

train_text_generation.py:84
train_text_generation.py:46 -> main()
training_utils.py:149 -> __init__()
training_utils.py:164 -> _setup()
training_utils.py:118 -> build_alg()
alg_wrappers.py:407 -> wrap_onpolicy_alg()
alg_wrappers.py:108 -> __init__()
ppo.py:166 -> __init__()
ppo.py:169 -> _setup_model()
on_policy_algorithm.py:117 -> _setup_model()
seq2seq_policy.py:51 -> __init__()
base_policy.py:135 -> __init__()
seq2seq_policy.py:67 -> _build_model_heads() (It gets a deepcopy of _policy_model as _ref_model. Then this calls from_pretrained for _policy_model, _value_model, and _ref_model to load the model parameters)
auto_factory.py:446 -> from_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

1 participant