terryyz commited on
Commit
816cea8
1 Parent(s): ae5bb78

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -17
app.py CHANGED
@@ -34,23 +34,23 @@ DSPY_PREFIX_URL = "luna-code/dspy-codegen-350M-mono-prefix"
34
  CS_EVO_PREFIX_URL = "luna-code/cs-codegen-350M-mono-evo-prefix"
35
 
36
  tokenizer = AutoTokenizer.from_pretrained(CHECKPOINT_URL)
37
- basemodel = AutoModelForCausalLM.from_pretrained(CHECKPOINT_URL, device_map="auto")
38
-
39
- sql_prefix = PeftModel.from_pretrained(basemodel, SQLMODEL_PREFIX_URL, device_map="auto")
40
- sfepy_prefix = PeftModel.from_pretrained(basemodel, SFEPY_PREFIX_URL, device_map="auto")
41
- megengine_prefix = PeftModel.from_pretrained(basemodel, MEGENGINE_PREFIX_URL, device_map="auto")
42
- main_evo_prefix = PeftModel.from_pretrained(basemodel, MAIN_EVO_PREFIX_URL, device_map="auto")
43
-
44
- sqlmodel_fft = AutoModelForCausalLM.from_pretrained(SQLMODEL_FFT_URL, device_map="auto")
45
- sfepy_fft = AutoModelForCausalLM.from_pretrained(SFEPY_FFT_URL, device_map="auto")
46
- megengine_fft = AutoModelForCausalLM.from_pretrained(MEGENGINE_FFT_URL, device_map="auto")
47
- main_evo_fft = AutoModelForCausalLM.from_pretrained(MAIN_EVO_FFT_URL, device_map="auto")
48
- main_fd_fft = AutoModelForCausalLM.from_pretrained(MAIN_FD_FFT_URL, device_map="auto")
49
-
50
- langchain_prefix = PeftModel.from_pretrained(basemodel, LANGCHAIN_PREFIX_URL, device_map="auto")
51
- llamaindex_prefix = PeftModel.from_pretrained(basemodel, LLAMAINDEX_PREFIX_URL, device_map="auto")
52
- dspy_prefix = PeftModel.from_pretrained(basemodel, DSPY_PREFIX_URL, device_map="auto")
53
- cs_evo_prefix = PeftModel.from_pretrained(basemodel, CS_EVO_PREFIX_URL, device_map="auto")
54
 
55
  # basemodel = ""
56
  # sql_prefix = ""
 
34
  CS_EVO_PREFIX_URL = "luna-code/cs-codegen-350M-mono-evo-prefix"
35
 
36
  tokenizer = AutoTokenizer.from_pretrained(CHECKPOINT_URL)
37
+ basemodel = AutoModelForCausalLM.from_pretrained(CHECKPOINT_URL)
38
+
39
+ sql_prefix = PeftModel.from_pretrained(basemodel, SQLMODEL_PREFIX_URL)
40
+ sfepy_prefix = PeftModel.from_pretrained(basemodel, SFEPY_PREFIX_URL)
41
+ megengine_prefix = PeftModel.from_pretrained(basemodel, MEGENGINE_PREFIX_URL)
42
+ main_evo_prefix = PeftModel.from_pretrained(basemodel, MAIN_EVO_PREFIX_URL)
43
+
44
+ sqlmodel_fft = AutoModelForCausalLM.from_pretrained(SQLMODEL_FFT_URL)
45
+ sfepy_fft = AutoModelForCausalLM.from_pretrained(SFEPY_FFT_URL)
46
+ megengine_fft = AutoModelForCausalLM.from_pretrained(MEGENGINE_FFT_URL)
47
+ main_evo_fft = AutoModelForCausalLM.from_pretrained(MAIN_EVO_FFT_URL)
48
+ main_fd_fft = AutoModelForCausalLM.from_pretrained(MAIN_FD_FFT_URL)
49
+
50
+ langchain_prefix = PeftModel.from_pretrained(basemodel, LANGCHAIN_PREFIX_URL)
51
+ llamaindex_prefix = PeftModel.from_pretrained(basemodel, LLAMAINDEX_PREFIX_URL)
52
+ dspy_prefix = PeftModel.from_pretrained(basemodel, DSPY_PREFIX_URL)
53
+ cs_evo_prefix = PeftModel.from_pretrained(basemodel, CS_EVO_PREFIX_URL)
54
 
55
  # basemodel = ""
56
  # sql_prefix = ""