Ubuyobozi bwa tekiniki

Amahugurwa avanze neza

Mixed precision uses lower-precision arithmetic for selected operations while retaining precision where needed.

Umva iki gitaboAI-byavuzwe · ~2 min

Kuriyi page2 min soma
  1. Incamake
  2. Kwibira cyane
  3. Gushyira mu bikorwa Isi
  4. Ejo hazaza h'amahugurwa avanze neza
  5. Kubishyira mubikorwa
  6. Komeza Ubushakashatsi
  7. Ibibazo bikunze kubazwa

Incamake

It can reduce memory use and improve throughput on supported hardware, but gains and numerical effects depend on the model, workload, hardware and training recipe.

Kwibira cyane

Traditional training stores weights and runs math in 32-bit floating point (FP32). Mixed precision uses lower-precision FP16 or bfloat16 for eligible operations while retaining FP32 where needed. Some FP16 recipes maintain a separate FP32 master copy to accumulate small weight updates; autocast workflows may instead keep model parameters in FP32 while casting selected operation inputs. Using 16-bit tensors can reduce memory used by eligible operations. Supported accelerators may execute some low-precision operations faster, but end-to-end throughput depends on hardware, workload and which operations autocast selects. FP16 has a narrower range, so tiny gradients can underflow. Loss scaling multiplies the loss before backpropagation and reverses that scale before the optimizer update; tools such as torch.amp.GradScaler can manage this process. Bfloat16 has a wider exponent range than FP16 and often does not need the same loss-scaling strategy, though model and hardware behavior still need testing.

Gushyira mu bikorwa Isi

Itara rya PyTorch.cuda.amp.autocast kuzinga imyitozo kugirango ugabanye hafi kwibuka no kwinjiza kabiri kuri GPU imwe

Guhugura imiterere nini yindimi nka GPT yuburyo bwa transformateur muri bfloat16 kuri TPU kugirango wirinde igihombo-gipima

Guhuza ingano nini kumuguzi RTX GPU uhindura imyitozo ya ResNet ishusho kuva FP32 ikajya kuri FP16

FP8 ivanze neza kuri NVIDIA H100 GPUs kugirango igabanye igiciro cyo kwipimisha imipaka-imipaka

Ejo hazaza h'amahugurwa avanze neza

Icyitonderwa gikomeza kugabanuka. Amahugurwa ya FP8, ashyigikiwe na NVIDIA Hopper na Blackwell GPUs, arimo kuba urugero rwiza rwimipaka, kandi ubushakashatsi muburyo bwa FP4 na microscaling (MXFP) butera imbere. Tegereza ibice kugirango uhitemo-guhitamo kuri buri cyiciro neza, ibyuma kugirango ukore kavukire kugirango uhindure imiterere irambuye, hamwe namahugurwa-yo kumenya umubare kugirango uhindure umurongo uri hagati yimyitozo ngororangingo idahwitse hamwe no gufata umwanzuro, bigabanya ikiguzi cyamahugurwa ya trillion-parameter.

Kubishyira mubikorwa

Impamvu ari ngombwa

  • Igiciro na bije. Ibyemezo byubwubatsi bitwara imikorere nigiciro cyimikorere kumyaka.
  • Ibyemezo bisobanutse. Ubuhanga bwa tekinike bufasha amakipe guhitamo umurongo ukwiye, ntabwo ari shyashya gusa.
  • Kugenzura ubuziranenge. Guhitamo neza bya injeniyeri bigabanya ibintu byizewe mubikorwa.

Witondere

  • Gutezimbere igipimo kimwe gishobora guhisha intege nke za sisitemu.
  • Ibikorwa Remezo no kubungabunga akenshi usanga bidahabwa agaciro.
  • Icyuho cyumutekano no kwitegereza birashobora kwiyongera uko sisitemu igenda igorana.

Intambwe ikurikira

  1. Sobanura ubukererwe, ubuziranenge, nigiciro cyibiciro mbere yo kubishyira mubikorwa.
  2. Ibipimo byerekana umutwaro ufatika hamwe namakuru yimiterere.
  3. Gukurikirana ibikoresho kubikosa, drift, ningaruka zabakoresha.
  4. Tegura inzira yo gusubiza ibyabaye mbere yo gupima.

Komeza Ubushakashatsi

Ibaruwa y'amakuru y'ubuntu

Ibuka amakuru ya buri munsi ya AI

Inkuru eshatu zizewe za AI buri gitondo cy'iminsi y'akazi, zanditse mu rurimi rworoshye. Ubuntu iteka ryose, nta kwamamaza.

Imeri imwe buri munsi y'akazi. Kwiyimura mu buryo bumwe. Ntitwigera tugurisha cyangwa ngo dusangire aderesi yawe.

Isuzume

Take the Mixed Precision Training quiz

Ibisubizo ako kanya kuri buri kibazo, n'icyemezo gishobora gusangirwa gifite ID yagenzurwa umaze gutsinda isomo.

Tangira ikibazo

Fasha uburezi bwa AI bw'ubuntu. AI Understanding ni umuryango utegamiye kuri leta wa 501(c)(3) — nta kwamamaza, nta kwishyura, iteka ryose. Tanga impano

Ibibazo bikunze kubazwa

What is Mixed Precision Training?

Mixed precision uses lower-precision arithmetic for selected operations while retaining precision where needed. It can reduce memory use and improve throughput on supported hardware, but gains and numerical effects depend on the model, workload, hardware and training recipe.

In an FP16 training recipe that keeps an FP32 master weight, why retain it?

Some FP16 recipes keep an FP32 master weight so small optimizer updates are not lost to low-precision rounding; not every mixed-precision recipe uses a separate copy.

Ni ikihe kibazo cyo gupima igihombo gikemura mumahugurwa ya FP16?

FP16 ifite imipaka igarukira, kuburyo gradients nto zishobora kuzenguruka kuri zeru; kugwiza igihombo mbere yinyuma ituma bahagararirwa.

Ni izihe nyungu bfloat16 ifite kuri FP16?

Bfloat16 ibika ibintu 8 byerekana nka FP32, urwego rwayo rero ni runini kandi buhoro buhoro ni gake.

For many supported Tensor Core matrix operations, how are partial sums commonly accumulated?

Many common Tensor Core operations accumulate in FP32 to reduce rounding error; this does not make the computation exact.

What is a common benefit of using 16-bit values for supported training operations?

Lower precision can reduce memory and speed supported operations, but total results depend on the model, hardware, and kernels used.