Spaces:
Runtime error
Runtime error
zetavg
commited on
Commit
•
42c2f04
1
Parent(s):
b676b21
make load from hf explicit
Browse files
llama_lora/models.py
CHANGED
@@ -113,7 +113,7 @@ def get_model(
|
|
113 |
with open(possible_model_info_json_path, "r") as file:
|
114 |
json_data = json.load(file)
|
115 |
possible_hf_model_name = json_data.get("hf_model_name")
|
116 |
-
if possible_hf_model_name:
|
117 |
peft_model_name_or_path = possible_hf_model_name
|
118 |
except Exception as e:
|
119 |
raise ValueError("Error reading model info from {possible_model_info_json_path}: {e}")
|
|
|
113 |
with open(possible_model_info_json_path, "r") as file:
|
114 |
json_data = json.load(file)
|
115 |
possible_hf_model_name = json_data.get("hf_model_name")
|
116 |
+
if possible_hf_model_name and json_data.get("load_from_hf"):
|
117 |
peft_model_name_or_path = possible_hf_model_name
|
118 |
except Exception as e:
|
119 |
raise ValueError("Error reading model info from {possible_model_info_json_path}: {e}")
|
lora_models/unhelpful-ai-v01/info.json
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
{
|
2 |
"hf_model_name": "zetavg/llama-lora-unhelpful-ai-v01",
|
|
|
3 |
"base_model": "decapoda-research/llama-7b-hf",
|
4 |
"prompt_template": "user_and_ai",
|
5 |
"dataset_name": "unhelpful_ai.json",
|
|
|
1 |
{
|
2 |
"hf_model_name": "zetavg/llama-lora-unhelpful-ai-v01",
|
3 |
+
"load_from_hf": true,
|
4 |
"base_model": "decapoda-research/llama-7b-hf",
|
5 |
"prompt_template": "user_and_ai",
|
6 |
"dataset_name": "unhelpful_ai.json",
|