From 9f7ccfbaeddb43f12333a81f0b56b8459cc40d2d Mon Sep 17 00:00:00 2001 From: Ben Cohen Date: Thu, 25 Jul 2024 14:14:38 -0700 Subject: [PATCH 1/2] name RotaryEmbedding -> GPTNeoXRotaryEmbedding in utils_hh/modify_gptneox.py --- h2o_hf/utils_hh/modify_gptneox.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/h2o_hf/utils_hh/modify_gptneox.py b/h2o_hf/utils_hh/modify_gptneox.py index dc2df971..d442e87d 100644 --- a/h2o_hf/utils_hh/modify_gptneox.py +++ b/h2o_hf/utils_hh/modify_gptneox.py @@ -13,7 +13,7 @@ from torch.cuda.amp import autocast from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss -from transformers.models.gpt_neox.modeling_gpt_neox import RotaryEmbedding, GPTNeoXAttention, apply_rotary_pos_emb +from transformers.models.gpt_neox.modeling_gpt_neox import GPTNeoXRotaryEmbedding, GPTNeoXAttention, apply_rotary_pos_emb __all__ = ['convert_kvcache_gpt_neox_heavy_recent', 'GPTNeoXAttention_Mask'] @@ -34,7 +34,7 @@ def __init__(self, config): ), ) self.register_buffer("masked_bias", torch.tensor(-1e9)) - self.rotary_emb = RotaryEmbedding( + self.rotary_emb = GPTNeoXRotaryEmbedding( self.rotary_ndims, config.max_position_embeddings, base=config.rotary_emb_base ) self.register_buffer( From 8669d6221e7c262a8f80d84a62668923d5643497 Mon Sep 17 00:00:00 2001 From: Ben Cohen Date: Thu, 1 Aug 2024 12:41:12 -0700 Subject: [PATCH 2/2] update transformers version in install instructions --- h2o_hf/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/h2o_hf/README.md b/h2o_hf/README.md index 32ea99de..602fefba 100644 --- a/h2o_hf/README.md +++ b/h2o_hf/README.md @@ -8,7 +8,7 @@ ``` pip install crfm-helm -pip install git+https://github.com/huggingface/transformers +pip install transformers==4.33 pip install lm-eval ```