Rozmiar partii treningowej i akumulacja gradientu

Training batch size and gradient accumulation · id batchsize · aliases: batch size and gradient accumulation, rozmiar batcha i akumulacja gradientu

Dobór liczby przykładów na krok aktualizacji: akumulacja gradientu przez mikrobatche i krytyczny rozmiar batcha.

Choosing how many examples go into each update step: gradient accumulation over micro-batches and the critical batch size.

In one sentence

Decyzja, ile przykładów model ogląda przed każdą poprawką, i sposób na duży pakiet nawet na małej karcie graficznej.

Deciding how many examples a model sees before each correction, and how to get a large bundle even on a small graphics card.

Problem it solves

Za mały pakiet przykładów daje chaotyczną naukę, za duży marnuje obliczenia, a duży często nie mieści się w pamięci.

Too small a bundle makes learning erratic, too large wastes compute, and a large one often won't fit in memory.

What it does

Jak ankieta: zbyt mała daje przypadkowe wnioski, zbyt duża kosztuje bez zysku, a odpowiedzi można zbierać w kilku turach.

Like a survey: too small gives random conclusions, too large costs without benefit, and answers can be gathered in several rounds.

Everyday example

Na zwykłej karcie graficznej zamiast 64 przykładów naraz liczysz osiem razy po osiem i dopiero wtedy poprawiasz model.

On an ordinary graphics card, instead of 64 examples at once you process eight batches of eight, then update the model.

This concerns you if you…

Related topics

Sources