Is 7B llama speed expected to be slow?
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Ambito
- machine-learning, performance
Direzione di ricerca
Start with the supplied Python benchmark and compare the two model-loading and generation paths on the stated 2x RTX3060 setup. Check whether the reported token rates are reproducible and document whether the 7B quantized result is expected, including any identified performance difference or measurement issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hello, thank you for opening source such a solid work! Feel free to add my wechat (hellozhongwei) for an offline chat!
I know that, in the paper, the inference speed in Figure 2 is measured only by the gate_proj linear operation speed for 70B LLaMA. The speed bar looks impressive although I assume de-quantization and re-scaling in the CUDA kernel has huge overheads.
My hypothesis is the speed is due to single-batch memory-bound slowdown? But if this is the case, the full model inference for single batch should be faster as well? I do not have enough hardware resources, so I tested the smaller LLaMA 7B checkpoint: ChenMnZ/Llama-2-7b-EfficientQAT-w2g64-BitBLAS. However, the 2bit BitBLAS version is only around 14.5 tokens / s, but the huggingface native fp16 is faster (20 tokens / s) even if the latter one is operating in model parallelism.
My question is whether this is expected. Because I think BitBLAS has applied efficient schedulers on CUDA code already, it should have higher inference speed as you have reported in Figure 2. But why?
Test devices: 2x RTX3060
Test code:
import time
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from transformers import TextStreamer
from gptqmodel import GPTQModel
# ref model
ref_model_path = "NousResearch/Llama-2-7b-hf"
tokenizer = AutoTokenizer.from_pretrained(ref_model_path)
model = AutoModelForCausalLM.from_pretrained(ref_model_path,
torch_dtype=torch.float16, device_map='auto', load_in_8bit=False)
streamer = TextStreamer(tokenizer)
start = time.time()
output = model.generate(
**tokenizer("Solar eclipse is ", return_tensors="pt").to(model.device),
max_new_tokens=256, streamer=streamer, use_cache=True
)
end = time.time()
output_len = output.shape[-1]
delta_time = end - start
print(output_len, delta_time, output_len / delta_time)
# 2-bit model in BitBLAS
model_path = "ChenMnZ/Llama-2-7b-EfficientQAT-w2g64-BitBLAS"
tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=True)
model = GPTQModel.from_quantized(model_path)
streamer = TextStreamer(tokenizer)
start = time.time()
output = model.generate(
**tokenizer("Solar eclipse is ", return_tensors="pt").to(model.device),
max_new_tokens=256, streamer=streamer, use_cache=True
)
end = time.time()
output_len = output.shape[-1]
delta_time = end - start
print(output_len, delta_time, output_len / delta_time)
- Lingua principale
- Python
- Stelle
- 353
- Fork
- 38
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenGVLab/EfficientQAT
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
OpenGVLab/EfficientQAT#31 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 28/100
OpenGVLab/EfficientQAT#34 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
OpenGVLab/EfficientQAT#33 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
OpenGVLab/EfficientQAT#32 ·
-
About DatasetAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
OpenGVLab/EfficientQAT#30 ·
Tutte le issue di OpenGVLab/EfficientQAT
Issue simili
-
[Bug]: Streamed /v1/chat/completions sends unredacted agent error text (keys) in the final chunkForse già presa @rodricksz4h5 l’ha presa oggi. Apertaarea/streaming comp/gateway P2 type/security
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NousResearch/hermes-agent#138245 ·
I maintainer di solito rispondono entro 1 giorno
-
[oblt-aw][autodoc] Update user onboarding guide for mandatory trigger CODEOWNERS stepForse già presa @github-actions l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
correction metadata
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 68/100
acl-org/acl-anthology#10378 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
cloudtrail_multi_region_enabled_logging_management_events fails when the advanced event selector has a custom nameForse già presa @12YYCCYY16 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
prowler-cloud/prowler#13033 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
graygarbage/HermesKey#23 ·