Nanobit commited on
Commit
56f9ca5
1 Parent(s): 8bd7a49

refactor: fix previous refactors

Browse files
scripts/finetune.py CHANGED
@@ -83,7 +83,7 @@ def do_inference(cfg, model, tokenizer, prompter="AlpacaPrompter"):
83
  temperature=0.9,
84
  top_p=0.95,
85
  top_k=40,
86
- return_DictDefault_in_generate=True,
87
  output_attentions=False,
88
  output_hidden_states=False,
89
  output_scores=False,
 
83
  temperature=0.9,
84
  top_p=0.95,
85
  top_k=40,
86
+ return_dict_in_generate=True,
87
  output_attentions=False,
88
  output_hidden_states=False,
89
  output_scores=False,
src/axolotl/utils/dict.py CHANGED
@@ -6,4 +6,4 @@ class DictDefault(Dict):
6
  A Dict that returns None instead of returning empty Dict for missing keys.
7
  '''
8
  def __missing__(self, key):
9
- return None
 
6
  A Dict that returns None instead of returning empty Dict for missing keys.
7
  '''
8
  def __missing__(self, key):
9
+ return None
src/axolotl/utils/models.py CHANGED
@@ -184,9 +184,9 @@ def load_model(
184
  # # https://github.com/HazyResearch/flash-attention/blob/40a25c8ee7465cf547b929cfa2937034e37bfce9/tests/models/test_gpt_neox.py#L12
185
  # # https://github.com/HazyResearch/flash-attention/tree/main/training#model-components
186
  # # add `**kwargs` to https://github.com/HazyResearch/flash-attention/blob/40a25c8ee7465cf547b929cfa2937034e37bfce9/flash_attn/models/gpt.py#L442
187
- # from flash_attn.utils.pretrained import state_DictDefault_from_pretrained
188
  # from flash_attn.models.gpt import GPTLMHeadModel
189
- # from flash_attn.models.gpt_neox import remap_state_DictDefault_hf_gpt_neox, gpt_neox_config_to_gpt2_config
190
  # from transformers import GPTNeoXConfig
191
  # config = gpt_neox_config_to_gpt2_config(GPTNeoXConfig.from_pretrained(base_model))
192
  # config.use_flash_attn = True
 
184
  # # https://github.com/HazyResearch/flash-attention/blob/40a25c8ee7465cf547b929cfa2937034e37bfce9/tests/models/test_gpt_neox.py#L12
185
  # # https://github.com/HazyResearch/flash-attention/tree/main/training#model-components
186
  # # add `**kwargs` to https://github.com/HazyResearch/flash-attention/blob/40a25c8ee7465cf547b929cfa2937034e37bfce9/flash_attn/models/gpt.py#L442
187
+ # from flash_attn.utils.pretrained import state_dict_from_pretrained
188
  # from flash_attn.models.gpt import GPTLMHeadModel
189
+ # from flash_attn.models.gpt_neox import remap_state_dict_hf_gpt_neox, gpt_neox_config_to_gpt2_config
190
  # from transformers import GPTNeoXConfig
191
  # config = gpt_neox_config_to_gpt2_config(GPTNeoXConfig.from_pretrained(base_model))
192
  # config.use_flash_attn = True