Add application file
Browse files
app.py
CHANGED
@@ -7,8 +7,9 @@ assert (
|
|
7 |
"LlamaTokenizer" in transformers._import_structure["models.llama"]
|
8 |
), "LLaMA is now in HuggingFace's main branch.\nPlease reinstall it: pip uninstall transformers && pip install git+https://github.com/huggingface/transformers.git"
|
9 |
from transformers import LlamaTokenizer, LlamaForCausalLM, GenerationConfig
|
|
|
10 |
|
11 |
-
tokenizer = LlamaTokenizer.from_pretrained("meta-llama/Llama-2-7b-hf")
|
12 |
|
13 |
BASE_MODEL = "meta-llama/Llama-2-7b-hf"
|
14 |
LORA_WEIGHTS = "DSMI/LLaMA-E"
|
|
|
7 |
"LlamaTokenizer" in transformers._import_structure["models.llama"]
|
8 |
), "LLaMA is now in HuggingFace's main branch.\nPlease reinstall it: pip uninstall transformers && pip install git+https://github.com/huggingface/transformers.git"
|
9 |
from transformers import LlamaTokenizer, LlamaForCausalLM, GenerationConfig
|
10 |
+
access_token = os.environ.get('HF_TOKEN')
|
11 |
|
12 |
+
tokenizer = LlamaTokenizer.from_pretrained("meta-llama/Llama-2-7b-hf", token=access_token)
|
13 |
|
14 |
BASE_MODEL = "meta-llama/Llama-2-7b-hf"
|
15 |
LORA_WEIGHTS = "DSMI/LLaMA-E"
|