File size: 880 Bytes
5354396
 
 
 
 
 
 
82ea7ed
5354396
 
 
 
82ea7ed
5354396
 
 
82ea7ed
5354396
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
AquilaChat2 long-text chat model [AquilaChat2-34B-16k](https://github.com/FlagAI-Open/Aquila2#base-model-performance).

Inference
```
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
device = torch.device("cuda:0")
model_info = "h2oai/h2ogpt-16k-aquilachat2-34b"
tokenizer = AutoTokenizer.from_pretrained(model_info, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_info, trust_remote_code=True, torch_dtype=torch.bfloat16)
model.eval()
model.to(device)
text = "Who are you?"
from predict import predict
out = predict(model, text, tokenizer=tokenizer, max_gen_len=200, top_p=0.95,
              seed=1234, topk=100, temperature=0.9, sft=True, device=device,
              model_name="h2oai/h2ogpt-16k-aquilachat2-34b")
print(out)
```
License
Aquila2 series open-source model is licensed under BAAI Aquila Model Licence Agreement