BAAI
/

ldwang commited on
Commit
a3be330
1 Parent(s): 870a119

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -26,7 +26,7 @@ The additional details of the Aquila model will be presented in the official tec
26
  from transformers import AutoTokenizer, AutoModelForCausalLM
27
  import torch
28
  device = torch.device("cuda:0")
29
- model_info = "BAAI/AquilaChat2-34B"
30
  tokenizer = AutoTokenizer.from_pretrained(model_info, trust_remote_code=True)
31
  model = AutoModelForCausalLM.from_pretrained(model_info, trust_remote_code=True, torch_dtype=torch.bfloat16)
32
  model.eval()
@@ -35,7 +35,7 @@ text = "请给出10个要到北京旅游的理由。"
35
  from predict import predict
36
  out = predict(model, text, tokenizer=tokenizer, max_gen_len=200, top_p=0.95,
37
  seed=1234, topk=100, temperature=0.9, sft=True, device=device,
38
- model_name="AquilaChat2-34B")
39
  print(out)
40
  ```
41
 
 
26
  from transformers import AutoTokenizer, AutoModelForCausalLM
27
  import torch
28
  device = torch.device("cuda:0")
29
+ model_info = "BAAI/AquilaChat2-7B"
30
  tokenizer = AutoTokenizer.from_pretrained(model_info, trust_remote_code=True)
31
  model = AutoModelForCausalLM.from_pretrained(model_info, trust_remote_code=True, torch_dtype=torch.bfloat16)
32
  model.eval()
 
35
  from predict import predict
36
  out = predict(model, text, tokenizer=tokenizer, max_gen_len=200, top_p=0.95,
37
  seed=1234, topk=100, temperature=0.9, sft=True, device=device,
38
+ model_name="AquilaChat2-7B")
39
  print(out)
40
  ```
41