Reference-model is slow on long sequences, especially with TP>1
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 15/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- machine-learning, performance
Direzione di ricerca
Start with the reference-model forward timing in fast_llm/models/gpt/model.py around lines 336-342, since the issue asks whether the measurement itself is wrong. Check whether the timing synchronizes the device before and after the forward pass, then compare TP=1 and TP=2 runs at the same sequence length. Done means the TP=2 overhead and the mbs=1 vs mbs=2 anomaly are either explained or traced to a measurement error, with the findings written up on the issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Here are some latency numbers, run with https://github.com/ServiceNow/Fast-LLM/tree/874cb2a875a439cff10d18a67b293ed59831ce4e, by measuring the time taken to run the reference-model's forward https://github.com/ServiceNow/Fast-LLM/blob/874cb2a875a439cff10d18a67b293ed59831ce4e/fast_llm/models/gpt/model.py#L336-L342.
With TP=2, mbs=1, the time taken to run the reference model is much larger in comparison to TP=1.
Another puzzling point is that the reference-model-forward-time is larger in TP=2,mbs=1 than in TP=2,mbs=2.
Could be an issue in how this ref-model-forward time is measured here?
| Seq-length | TP | MBS | BS | Sequential micro-batches | Teacher-size | Studen-size | Ref-model forward (ms) | Step-time (ms) |
|---|---|---|---|---|---|---|---|---|
| 2048 | 1 | 1 | 16 | 1 | 4.6B | 4.6B | 24 | 206 |
| 4096 | 1 | 1 | 16 | 1 | 4.6B | 4.6B | 46 | 333 |
| 8192 | 1 | 1 | 16 | 1 | 4.6B | 4.6B | 95 | 656 |
| 2048 | 2 | 1 | 8 | 1 | 4.6B | 4.6B | 80 | 230 |
| 4096 | 2 | 1 | 8 | 1 | 4.6B | 4.6B | 150 | 367 |
| 8192 | 2 | 1 | 8 | 1 | 4.6B | 4.6B | 301 | 655 |
| 2048 | 2 | 2 | 16 | 1 | 4.6B | 4.6B | 33 | 231 |
| 4096 | 2 | 2 | 16 | 1 | 4.6B | 4.6B | 59 | 376 |
| 8192 | 2 | 2 | 16 | 1 | 4.6B | 4.6B | 121 | 739 |
- Lingua principale
- Python
- Stelle
- 337
- Fork
- 52
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
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 ServiceNow/Fast-LLM
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
ServiceNow/Fast-LLM#556 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
ServiceNow/Fast-LLM#538 ·
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
ServiceNow/Fast-LLM#533 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
ServiceNow/Fast-LLM#510 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
ServiceNow/Fast-LLM#507 ·
Tutte le issue di ServiceNow/Fast-LLM
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
Validate finite output clamping limits in StepPredictor.prepare_clamping_params to prevent silent NaN/Inf propagationForse già presa @muskan-creates352 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
mllam/neural-lam#848 ·
I maintainer di solito rispondono entro 2 giorni
-
infra
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
fab-geocommuns/RNB-coeur#1166 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
deepspeedai/DeepSpeed#8951 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
aws/context-ontology-accelerator#343 ·
I maintainer di solito rispondono entro 1 giorno