allenai / open-instruct

Apache License 2.0
1.22k stars 166 forks source link

Add model revision flag for finetuning #121

Closed dwadden closed 7 months ago

dwadden commented 7 months ago

Makes it possible finetune different checkpoints of the same HF model; this is useful for experimentation with OLMo.

I think I found all the places where the revision flag would need to be added but it's probably good for @yizhongw or @hamishivi to double-check.

hamishivi commented 7 months ago

This is just in the finetuning script, did we want to add this to eval scripts too?

hamishivi commented 7 months ago

Also, will it always be the case that the tokenizer revision == the model revision?

dwadden commented 7 months ago

I'll add it for evals as well, that's just a bit more complicated because we should really refactor the argument parser to be shared across tasks. I'll do this at some point, just hasn't been high-priority; seems like a separate PR.

Good point about tokenizer revision == model revision. I had assumed that each HF model revision comes with a matched tokenizer, but let me confirm that this is true. I guess we could add an extra tokenizer_revision flag?

hamishivi commented 7 months ago

Yeah, normally in Huggingface models and tokenizers are bundled, but currently we support this not being the case... we should probably just remain consistent with it!

hamishivi commented 7 months ago

And yeah, the argument parser thing makes sense. I'm also going to split the tokenizer and model loading for evals later today, so refactoring should probably wait at least until next week.