Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add T5 model #145
Add T5 model #145
Changes from all commits
ec00c54
dacb652
56a0a3c
5feff9f
ccfabde
2674d24
6e43ea1
59c2cf5
2c133b0
c9ddfcf
5f38a81
17be682
2d1a4dc
f9f85ba
500099f
b55a4e8
36a74e6
6baee0b
d2082a7
d2f6a1d
eaf9c94
c03313a
93cf3cc
8ac399b
fefa62b
5ae1188
ea10837
84f8b7b
03cc954
347e314
220c8f3
a0a43f8
b86e3d4
eb0b0cc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Dahoas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we verified this works? I recall accelerate freezing up if I started putting multiple models on gpu(though this could've just been the sentiment pipeline we were using for sentiments task)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Dahoas yes that works.
e.g. https://wandb.ai/pvduy/trlx/runs/2wgpt4im
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do agree with the larger model we should distribute multiple models on multiple gpus, but for this, I think we should keep it on GPU rather than CPU, they are super slow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This removed the need for:
trlx/trlx/trainer/accelerate_ppo_trainer.py
Line 89 in f71401e
We need to remove it if unused before it becomes stale.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these lines - these vars are already put on
cpu
on the lines right before the if-statementThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we penalize empty responses? Also do you know how it's possible to have those, except for when
max_new_tokens == 0
🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is a complete exception case, but I got it a few times when I ran PPO sentiments. @jon-tow you also faced with this right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah Jon has said that he also experienced it. I wonder if the case of it is unknown it may be a symptom of some other bug elsewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@reciprocated the only case I can think of that'd lead to an empty response is when
len(query)
is larger than thegenerate
method'smin_length
arg, which defaults to10
, and the model so happens to output theeos_token
on its first sample. (Note that with causal models themin_length
constraint includes the length of the context (query) meaning it won't actually have an effect on the generations if the min condition is already met by the context size).In such cases, I'm okay with penalizing empty responses as they're uninformative - so long as this is not a bug lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think it is a serious issue. We can just throw an error if this min_length thing comes up. I've never seen this in practice when I set min length correctly. (Perhaps we should add an extra parameter called min_new_length...? We should upstream to HF transformers though)