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

Completely refactor and test YaRN finetuning #78

Merged
merged 30 commits into from
Dec 13, 2023

Conversation

honglu2875
Copy link
Contributor

@honglu2875 honglu2875 commented Dec 9, 2023

  • Unified dynamic YaRN and finetuning YaRN.
    • The code and the config can still be improved. Still WIP Refactored the codes.
    • One successful finetuning run.
    • YaRN hyperparameter sweep.
  • Improved RoPE using the in-place RoPE update by Katherine.
  • Change to in-place KV-cache and overhauling use_cache parameter.
  • Removed constraints by model.max_seq_len because dynamic yarn can go a little longer in principle.

@honglu2875 honglu2875 marked this pull request as ready for review December 13, 2023 18:38
else:
self.rotary_emb = RotaryEmbedding(self.d_head)
cfg = model_config.yarn_config or YaRNConfig()
self.rotary_emb = YaRNScaledRotaryEmbedding(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are YaRN rotary embeddings always being used? What about when we are pre-training? Does the default YaRNConfig() encapsulate the situation where YaRNScaledRotaryEmbedding is the same as normal rotary embeddings?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YaRN embedding is always used. The default is equivalent to the usual RoPE (scale=1.0)

@loubbrad loubbrad merged commit 8205d85 into EleutherAI:main Dec 13, 2023
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants