Ekupheleni kukaJuni, i-Yandex
ikhiphe inethiwekhi ye- neural enamapharamitha ayizigidi eziyizinkulungwane eziyi-100 ebizwa ngokuthi i-YaLM 100B emphakathini . Inethiwekhi ye-neural efana ne-GPT enkulu kunazo zonke esizindeni somphakathi. Ikhuluma ngendlela abafundise ngayo, babonise izibonelo ezinhle kakhulu nokuthi yini i-neuron ekwazi ukuyenza. Kodwa ingabe kuhle kakhulu ekusebenzeni futhi kusebenza ekhaya? I-athikili ayithuli ngalokhu, ngaphezu kwalokho, akulula ukuyisebenzisa futhi uyihlole, ngoba cishe i-200 Gb ye-GPU RAM iyadingeka. Lawa mazwana ngoHabré
embula isimo ngokunembe kakhulu
.
Ngokusobala, ku-Yandex, bonke abantu abanjalo abahlakaniphile, futhi abazange bathumele ngisho ne-How-to evamile. Ayikho i-api yemodeli enkulu, ayikho imodeli esusiwe ephakathi nendawo noma encane eseyenziwe abantu abavamile (ku-Google Colab). Asikho isibonelo esinikezwayo sendlela yokusetha imodeli, indlela yokukhiqiza umbhalo. Ukuthi nje i-athikili ikhombisa ama-nuances ambalwa kwabahlakaniphile futhi yilokho. Kwanele ukubheka ngokucophelela ukuthi ibhange lenze kanjani ngohlamvu “C” futhi wenze okufanayo. Ngithole umbono wokuthi le modeli ingenye nje yezivivinyo ezihlulekile okwakudabukisa ukuphonsa kudoti, ngakho-ke yathunyelwa ku-Open Source ukuze ibonise ukuthi yimaphi amamodeli amakhulu adalwa yi-Yandex, futhi ngaphezu kwalokho, iwumthombo ovulekile!
Kukhona imibuzo eminingi ku-inthanethi ukuthi isetshenziswa kanjani i-yalm noma uzame ku-inthanethi, kepha azikho izimpendulo zalokhu. Ngangiphakathi kwabasebenzisi ababuze le mibuzo. Futhi waqala ukucabanga. Njengoba ngangidinga ngempela indlela yokukhiqiza imibhalo yamarobhothi ezezimali. Ukuze bangakwazi ukubikezela hhayi kuphela amanani, kodwa futhi baphawule ngakho ngombhalo, ngokusekelwe emibikweni yezezimali. Empeleni, kuzofana nalokho okwenziwa abahlaziyi bezezimali, kuphela ngokusetshenziswa kobuhlakani bokwenziwa. Kunezindlela ezimbili zokusebenzisa i-yalm.
Qasha iseva efwininge-RAM engu-200+ Gb GPU noma shintsha ikhodi futhi uqalise ngokukhipha i-deepspeed zero (lapho i-GPU icubungula ngokulandelana ingxenye yenethiwekhi ye-neural, futhi enye igcinwa ku-CPU RAM noma i-NVMe). Eyokuqala ibiza kakhulu, cishe ama-ruble angu-2500 ngehora noma izigidi ezingu-1.7 ngenyanga. Okwesibili akwaziwa, ngoba ikhodi endaweni yokugcina ayinikeziwe,
izinkomba kuphela endabeni yendawo yokugcina, okungekho nzima ukuyenza. Ake siqale elula.
- Imiyalo Yokwethulwa kwe-YaLM 100B
- 1. Siqasha i-RAM ye-GPU engu-200 GB, isibonelo lapha .
- 2. Hlanganisa indawo yokugcina nge-YaLM
- 3. Landa izindawo zokuhlola (imininingwane yokuqeqeshwa eyimodeli eyisisekelo)
- 4. Faka i-nvidia – docker2
- 5. Ukwakha isitsha se-YaLM
- 6. Lungiselela okuqukethwe
- 6.1 Izindawo zokuhlola
- 6.2 Amakhadi evidiyo
- 7. Qalisa isitsha sedokhu
- 8. Qalisa isibonelo kusuka ku-YaLM 100B
- 9. Imiphumela yomsebenzi
- Isetshenziswa kanjani i-YaLM ngaphandle kwe-200Gb GPU RAM?
- Ukufingqa
Imiyalo Yokwethulwa kwe-YaLM 100B
1. Siqasha i-RAM ye-GPU engu-200 GB, isibonelo lapha .
Udinga okungenani u-200 GB wesamba sememori yevidiyo. 8×40 = 320 GB. Yilena kuphela elingana. Okungaphansi kwama-200 akunakwenzeka, okuningi kungenzeka. Umcibisholo ukhombisa i-RAM ye-CPU, asiyibheki. Angaba noma ubani.
Sibonisa i-disk engaba ngu-300 GB, ukuze nge-spare futhi mhlawumbe i-disk esheshayo, ngoba. amashumi amagigabhayithi edatha azodluliselwa kuwo futhi asuke kuyo.
Lapho udala emithonjeni, khetha Ubuntu ML (Ukufunda Ngomshini). Lokhu kuyisibopho ukuze amakhadi evidiyo amiswe futhi akukho okudinga ukufakwa ngaphezu kwalokho.
Lapho udala iseva, kunama-nuances anezilinganiso, ungathola umuzwa wokuthi imishini ayitholakali, kodwa empeleni udinga nje ukwandisa ama-quotas kuzilungiselelo. Ngemva kokuthi iseva isicushiwe (kungathatha amaminithi angu-5-10), xhuma kuseva nge-ssh noma ngokuqondile kukhonsoli yewebhu ekhasini leseva bese ukhipha umyalo.
i-nvidia-smi
Umphumela kufanele ube itafula elinamakhadi evidiyo, inguqulo yomshayeli kanye ne-cuda. Cishe kanje.
2. Hlanganisa indawo yokugcina nge-YaLM
I-sudo git clone https://github.com/yandex/YaLM-100B/ yalm
cd yalm
Vala kufolda yakho yasekhaya ukuze ungadingi ukuhlela i-docker config kamuva. Uma yenziwe kwenye indawo,
hamba lapha bese wengeza indlela eya lapho kuhlanganiswe khona.
3. Landa izindawo zokuhlola (imininingwane yokuqeqeshwa eyimodeli eyisisekelo)
I-sudo chmod +x ./download/download.sh
sudo bash ./download/download.sh
Lokhu kuzothatha cishe ihora. Ukuze singachithi isikhathi ngeze, sakha uxhumano olusha lwe-ssh futhi ngokufana siqala ukwakha isitsha se-docker.
4. Faka i-nvidia – docker 2
I-docker evamile ayifanele, i
-nvidia-docker2 iyadingeka .
https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#setting-up-nvidia-container-toolkit
5. Ukwakha isitsha se-YaLM
cd yalm
sudo chmod +x ./docker/*
sudo bash ./docker/build.sh
Futhi cishe ihora.
I-Hack yempilo. Ungalanda izindawo zokuhlola, ufake i-docker futhi wakhe isitsha kuseva eshibhile ngekhadi elilodwa levidiyo. Kuyoba okufanayo ngesikhathi, ukuze ukwazi ukonga kancane. Ngemuva kokuhlanganiswa kuseva eshibhile, siyayisusa, futhi sakha iseva yokulwa sisebenzisa idiski kusuka kuseva eshibhile. Khona-ke ngeke ukhokhe ngokweqile isikhathi sokulinda umhlangano nokukhipha izindawo zokuhlola.
6. Lungiselela okuqukethwe
6.1 Izindawo zokuhlola
Ngemuva kokuthi ukulandwa kwamaphoyinti okuhlola sekuphelile, udinga ukuwashutheka kuma-configs. Kunezindlela ezimbili, amapharamitha alungile noma izindawo zokuhlola zokudlulisa. Kuyo yonke indawo kulindeleke ukuthi izindawo zokuhlola zibe kumkhombandlela oyinhloko wephrojekthi, ngokulandelana, okulandiwe kufanele kudluliselwe kufolda yokulanda ngenhla. Ukuba kufolda ye-yalm khipha
mv ./download/yalm100b_checkpoint ./
Noma shintsha izindlela eziya kumafayela kumafayela ayisibonelo
https://github.com/yandex/YaLM-100B/blob/c91b7d7fe8dbf39c9e307d6d324446d0df136a23/examples/generate_interactive.sh#L8-L9
6.2 Amakhadi evidiyo
Sihlola ukuthi amakhadi evidiyo asethwe ngendlela efanele. Uma unamakhadi evidiyo ayisishiyagalombili, akukho lutho oludinga ukushintshwa. Uma inombolo ihlukile, khona-ke sishintsha le migqa
7. Qalisa isitsha sedokhu
Njengoba ukufolda ye-yalm, khipha umyalo
sudo bash ./docker/run.sh
Uma konke kulungile, uzoyiswa esitsheni lapho udinga ukuya khona kufolda ye-yalm kumkhombandlela wasekhaya.
cd ~/yalm
8. Qalisa isibonelo kusuka ku-YaLM 100B
Sikulungele ukwethula esinye sezibonelo. Ziyachazwa
lapha .
chmod +x ./examples/generate_interactive.sh
./examples/generate_interactive.sh
Yiba nesineke, kusasele ukulinda eminye imizuzu eyi-10-15 kuze kudalwe imodeli ye-GPT futhi izisindo ezivela ezindaweni zokuhlola zilayishwa.
Lapho ukwakhiwa kuqedwa, i-MegatronML izokwazisa ukuthi ufake umongo ukuze ukhiqize umbhalo. Qaphela uma uthayipha. Ngaphansi kwezimo ezithile, kwenzeka iphutha, uhlelo luyaphahlazeka futhi udinga ukuqala umhlangano futhi. Ngakho-ke, kungcono ukusebenzisa izibonelo ezithatha umbhalo efayeleni.
9. Imiphumela yomsebenzi
Ngenani, kungibize cishe ama-ruble ayizinkulungwane ezingu-9 ngokuqasha amaseva amakhono ahlukene kusukela ekuqeqeshweni nasekulungiseleleni isizukulwane. Ukudumazeka okuthile kwakuwukuthi awukwazi ukukhiqiza yonke into ngaso leso sikhathi. Kuthatha isikhathi eside kakhulu ukuqalisa futhi umbhalo awukhiqizi ngokushesha njengoba besingathanda, uma kubhekwa izindleko zeseva ngehora.
Isetshenziswa kanjani i-YaLM ngaphandle kwe-200Gb GPU RAM?
Udinga ukungeza i-deepspeed zero offload ku-config. Kulabo abaziyo ukuthi sikhuluma ngani, kuzoba lula kakhulu ukukwenza. Kwabanye, lokhu akuwona neze umsebenzi omncane. Kubalulekile ukwazi ukuthi ukulayisha kungaba nge-CPU RAM noma i-NVMe. Ungakhohlwa nge-NVMe okwamanje, ngoba. inani elikhulu kakhulu ledatha liyacutshungulwa futhi idiski ayikwazi ukubhekana nayo. I-CPU yokukhipha i-Zero ingokoqobo kakhulu. Yiqiniso, kulokhu udinga ukuba ne-RAM engu-200+ Gb CPU esitokweni, nayo engabizi. Futhi umbhalo owodwa uzokhiqizwa cishe imizuzu engama-20-40, njengoba bekungakatholakali ukufanisa kumakhadi wevidiyo amabili. Njengoba ubona esithombeni esingezansi, ikhadi levidiyo elilodwa kuphela elihilelekile esizukulwaneni, bese kuba ingxenye yesine yememori. Kusazobonakala ukuthi kungani wonke ama-24 GB engasetshenziswa,
Ukufingqa
Yebo, ngisazozama ukuthola izindlela ezilungile zokuqalisa. Kodwa kuze kube manje ngifinyelele esiphethweni sokuthi i-YaLM 100b ibiza kakhulu / ihamba kancane emisebenzini yami. Ngemali efanayo, abantu bazobhala kakhulu futhi kangcono kakhulu. Kodwa ngicabanga ukuthi kungokwesikhashana, sizobona. Uma udinga usizo ngokuqalisa, ukusetha i-yalm, noma ufuna ukubona imiphumela ezibonelweni zakho zomongo, bhalela iposi noma ucingo.
Статья на Мега актуальную тему! Спасибо.
Крутая статья! Спасибо автору!
СПАСИБО !!!
три дня эту информацию искал
нет подобного о RuGPT3 и Порфириче?