winglian commited on
Commit
0124825
2 Parent(s): 41e4f6c 14163c1

Merge pull request #182 from OpenAccess-AI-Collective/fix-llama-ref

Browse files

fix for local variable 'LlamaForCausalLM' referenced before assignment

Files changed (1) hide show
  1. src/axolotl/utils/models.py +1 -0
src/axolotl/utils/models.py CHANGED
@@ -90,6 +90,7 @@ def load_model(
90
  Load a model from a base model and a model type.
91
  """
92
 
 
93
  # TODO refactor as a kwarg
94
  load_in_8bit = cfg.load_in_8bit
95
  cfg.is_llama_derived_model = "llama" in base_model or (
 
90
  Load a model from a base model and a model type.
91
  """
92
 
93
+ global LlamaForCausalLM # pylint: disable=global-statement
94
  # TODO refactor as a kwarg
95
  load_in_8bit = cfg.load_in_8bit
96
  cfg.is_llama_derived_model = "llama" in base_model or (