Views
No views yet
| Version | Batch Size 1 | Batch Size 8 | Batch Size 16 | Batch Size 32 | Batch Size 64 |
|---|---|---|---|---|---|
| Torch | 34.8 | 249.2 | 470.1 | 878.6 | 1478.9 |
| lyraXVERSE | 96.6 | 725.5 | 1359.3 | 2415.6 | 3923.2 |
nvcr.io/nvidia/pytorch:22.12-py3nvcr.io/nvidia/pytorch:23.02-py31docker pull nvcr.io/nvidia/pytorch:23.02-py3
2docker run --rm -it --gpus all -v ./:/lyraXVERSE nvcr.io/nvidia/pytorch:23.02-py3
3
4pip install -r requirements.txt
5python demo.py1from lyra_xverse import lyraXVERSE
2
3model_path = "./models/"
4tokenizer_path = "./models/"
5inference_dtype = 'fp16'
6prompt = "讲个故事:"
7memopt_mode = 1
8max_output_length = 512
9arch = "Ampere" # Ampere or Volta
10cuda_version = 12 # cuda version, we currently support 11 and 12
11
12model = lyraXVERSE(model_path,
13 tokenizer_path = tokenizer_path,
14 dtype = inference_dtype,
15 memopt_mode = memopt_mode,
16 arch = arch,
17 cuda_version = cuda_version)
18
19bs = 1
20prompts = [prompt, ] * bs
21output_texts = model.generate(
22 prompts, output_length=max_output_length,
23 top_k=30, top_p=0.85, temperature=1.0, repetition_penalty=1.0, do_sample=False)
24
25print(output_texts)
26@Misc{lyraXVERSE2023,
author = {Haoxiong Su, Kangjian Wu, Zhengtao Wang, Yibo Lu, Bin Wu},
title = {lyraXVERSE: Accelerating XVERSE-13B-Chat(fp16) to 3000+ tokens/s},
howpublished = {\url{https://huggingface.co/TMElyralab/lyraXVERSE}},
year = {2023}
}[bug] mark in the title.