Spaces:
Paused
Paused
Tao Wu
commited on
Commit
·
2384367
1
Parent(s):
5a8ad65
add secretes
Browse files- app/embedding_setup.py +3 -2
app/embedding_setup.py
CHANGED
@@ -33,11 +33,12 @@ retriever = db.as_retriever(search_kwargs={"k": TOP_K})
|
|
33 |
LLM_MODEL = "meta-llama/Meta-Llama-3-8B-Instruct"
|
34 |
lora_weights = "/hpcwork/vg380347/llama3/Instruct_8B_EngGer_alpaca_finetune_pairwise_skill_24_128/last_checkpoint"
|
35 |
|
|
|
36 |
|
37 |
|
38 |
-
tokenizer = AutoTokenizer.from_pretrained(LLM_MODEL, cache_dir="/hpcwork/vg380347/.cache")
|
39 |
LLM_model = AutoModelForCausalLM.from_pretrained(
|
40 |
-
LLM_MODEL,
|
41 |
)
|
42 |
|
43 |
first_token = 'First'
|
|
|
33 |
LLM_MODEL = "meta-llama/Meta-Llama-3-8B-Instruct"
|
34 |
lora_weights = "/hpcwork/vg380347/llama3/Instruct_8B_EngGer_alpaca_finetune_pairwise_skill_24_128/last_checkpoint"
|
35 |
|
36 |
+
hf_auth = os.environ.get("SECRET_EXAMPLE")
|
37 |
|
38 |
|
39 |
+
tokenizer = AutoTokenizer.from_pretrained(LLM_MODEL, token=hf_auth, cache_dir="/hpcwork/vg380347/.cache")
|
40 |
LLM_model = AutoModelForCausalLM.from_pretrained(
|
41 |
+
LLM_MODEL, token=hf_auth, device_map="auto", trust_remote_code=True
|
42 |
)
|
43 |
|
44 |
first_token = 'First'
|