wmpscc commited on
Commit
a6b7210
·
1 Parent(s): 3813a21

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -41,7 +41,7 @@ def init_args():
41
  args = load_hyperparam(args)
42
 
43
  # args.tokenizer = Tokenizer(model_path=args.spm_model_path)
44
- args.tokenizer = AutoTokenizer.from_pretrained("Linly-AI/Linly-ChatFlow", use_fast=False, trust_remote_code=True)
45
  args.vocab_size = args.tokenizer.sp_model.vocab_size()
46
 
47
 
@@ -57,8 +57,8 @@ def init_model():
57
 
58
  # device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
59
  # model.to(device)
60
- model = AutoModelForCausalLM.from_pretrained("Linly-AI/Linly-ChatFlow", device_map="auto", torch_dtype=torch.float16, trust_remote_code=True)
61
-
62
  print(torch.cuda.max_memory_allocated() / 1024 ** 3)
63
  lm_generation = LmGeneration(model, args.tokenizer)
64
 
 
41
  args = load_hyperparam(args)
42
 
43
  # args.tokenizer = Tokenizer(model_path=args.spm_model_path)
44
+ args.tokenizer = AutoTokenizer.from_pretrained("Linly-AI/Chinese-LLaMA-2-7B-hf", use_fast=False, trust_remote_code=True)
45
  args.vocab_size = args.tokenizer.sp_model.vocab_size()
46
 
47
 
 
57
 
58
  # device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
59
  # model.to(device)
60
+ model = AutoModelForCausalLM.from_pretrained("Linly-AI/Chinese-LLaMA-2-7B-hf", device_map="auto", torch_dtype=torch.float16, trust_remote_code=True)
61
+ print(model)
62
  print(torch.cuda.max_memory_allocated() / 1024 ** 3)
63
  lm_generation = LmGeneration(model, args.tokenizer)
64