zhaozitian commited on
Commit
a2e7059
1 Parent(s): 6231256

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -8,7 +8,7 @@ assert (
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("daryl149/llama-2-7b-chat-hf", use_auth_token=True)
12
 
13
  BASE_MODEL = "daryl149/llama-2-7b-chat-hf"
14
  LORA_WEIGHTS = "Sparticle/llama-2-7b-japanese-lora"
@@ -30,7 +30,6 @@ if device == "cuda":
30
  load_in_8bit=False,
31
  torch_dtype=torch.float16,
32
  device_map="auto",
33
- use_auth_token = True,
34
  )
35
  model = PeftModel.from_pretrained(
36
  model, LORA_WEIGHTS, torch_dtype=torch.float16, force_download=True
@@ -40,7 +39,6 @@ elif device == "mps":
40
  BASE_MODEL,
41
  device_map={"": device},
42
  torch_dtype=torch.float16,
43
- use_auth_token = True,
44
  )
45
  model = PeftModel.from_pretrained(
46
  model,
 
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("daryl149/llama-2-7b-chat-hf")
12
 
13
  BASE_MODEL = "daryl149/llama-2-7b-chat-hf"
14
  LORA_WEIGHTS = "Sparticle/llama-2-7b-japanese-lora"
 
30
  load_in_8bit=False,
31
  torch_dtype=torch.float16,
32
  device_map="auto",
 
33
  )
34
  model = PeftModel.from_pretrained(
35
  model, LORA_WEIGHTS, torch_dtype=torch.float16, force_download=True
 
39
  BASE_MODEL,
40
  device_map={"": device},
41
  torch_dtype=torch.float16,
 
42
  )
43
  model = PeftModel.from_pretrained(
44
  model,