Views
No views yet
| Base Model | Chat Model | 4bits Quantized Chat Model | |
|---|---|---|---|
| 7B-2k | BlueLM-7B-Base | BlueLM-7B-Chat | BlueLM-7B-Chat-4bits |
| 7B-32K | BlueLM-7B-Base-32K | BlueLM-7B-Chat-32K | BlueLM-7B-Chat-32K-AWQ / BlueLM-7B-Chat-32K-GPTQ |
| Model | Average | Summary | Single-Doc QA | Multi-Doc QA | Code | Few-shot | Synthetic |
|---|---|---|---|---|---|---|---|
| BlueLM-7B-Chat-32K | 41.2 | 18.8 | 35.6 | 36.2 | 54.2 | 56.9 | 45.5 |
1>>> import torch
2>>> from transformers import AutoModelForCausalLM, AutoTokenizer
3>>> tokenizer = AutoTokenizer.from_pretrained("vivo-ai/BlueLM-7B-Chat-32K-AWQ", trust_remote_code=True, use_fast=False)
4>>> model = AutoModelForCausalLM.from_pretrained("vivo-ai/BlueLM-7B-Chat-32K-AWQ", device_map="cuda:0", torch_dtype=torch.float16, trust_remote_code=True, low_cpu_mem_usage=True, use_cache=False)
5>>> model = model.eval()
6>>> inputs = tokenizer("[|Human|]:写一篇关于刘慈欣《三体》小说的读后感,1000字左右[|AI|]:", return_tensors="pt")
7>>> inputs = inputs.to("cuda:0")
8>>> pred = model.generate(**inputs, max_new_tokens=2048, repetition_penalty=1.1)
9>>> print(tokenizer.decode(pred.cpu()[0], skip_special_tokens=True))