Spaces:
Runtime error
Runtime error
jaymojnidar
commited on
Commit
•
903e4f3
1
Parent(s):
035f9b8
adding my data config
Browse files
model.py
CHANGED
@@ -10,7 +10,7 @@ from huggingface_hub import login
|
|
10 |
#model_id = 'meta-llama/Llama-2-7b-chat-hf'
|
11 |
#model_id = 'Trelis/Llama-2-7b-chat-hf-sharded-bf16'
|
12 |
model_id = 'jaymojnidar/llama2-finetuned-mydata'
|
13 |
-
|
14 |
|
15 |
if torch.cuda.is_available():
|
16 |
tok = os.environ['HF_TOKEN']
|
@@ -21,7 +21,7 @@ if torch.cuda.is_available():
|
|
21 |
#, token="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"
|
22 |
)
|
23 |
|
24 |
-
config = AutoConfig.from_pretrained(
|
25 |
config.pretraining_tp = 1
|
26 |
model = AutoModelForCausalLM.from_pretrained(
|
27 |
model_id,
|
|
|
10 |
#model_id = 'meta-llama/Llama-2-7b-chat-hf'
|
11 |
#model_id = 'Trelis/Llama-2-7b-chat-hf-sharded-bf16'
|
12 |
model_id = 'jaymojnidar/llama2-finetuned-mydata'
|
13 |
+
config_model_id = 'jaymojnidar/llama2-finetuned-mydata/adapter_config.json'
|
14 |
|
15 |
if torch.cuda.is_available():
|
16 |
tok = os.environ['HF_TOKEN']
|
|
|
21 |
#, token="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"
|
22 |
)
|
23 |
|
24 |
+
config = AutoConfig.from_pretrained(config_model_id, use_auth_token=True)
|
25 |
config.pretraining_tp = 1
|
26 |
model = AutoModelForCausalLM.from_pretrained(
|
27 |
model_id,
|