Neural Network YaLM 100B a aikace.

Программирование

A karshen watan Yuni, Yandex
ya saki hanyar sadarwa na jijiyoyi tare da sigogi biliyan 100 da ake kira YaLM 100B ga jama’a . Ita ce babbar hanyar sadarwa mai kama da GPT a cikin jama’a. Yana magana game da yadda suke koyarwa, sun nuna mafi kyawun misalai da abin da neuron ke iya. Amma yana da kyau sosai a aikace kuma yana aiki a gida? Labarin ya yi shiru game da wannan, haka ma, ba shi da sauƙi don gudu da duba shi, tunda ana buƙatar kusan 200 Gb na GPU RAM. Wannan sharhi akan Habré
ya bayyana halin da ake ciki daidai
.

Wai, a cikin Yandex, duk irin waɗannan mutane masu wayo, kuma ba su ma aika da yadda ake yin al’ada ba. Babu api don babban samfuri, babu wani matsakaici ko ƙaramin tsari wanda aka shirya don talakawa (a cikin Google Colab). Ba a bayar da misali kan yadda ake saita samfurin, yadda ake samar da rubutu ba. Kawai dai labarin ya nuna wasu nuances ga masu shayarwa kuma shi ke nan. Ya isa a yi nazari sosai a kan yadda bankin ya yi shi da harafin “C” kuma ya yi haka. Na sami ra’ayi cewa wannan samfurin yana ɗaya daga cikin gwaje-gwajen da ba a yi nasara ba wanda ya kasance abin tausayi don jefawa a cikin sharar gida, don haka an buga shi a Bude Source don nuna abin da manyan samfurori Yandex ke haifar da su, kuma haka ma, shi ne tushen budewa!

Akwai tambayoyi da yawa akan Intanet yadda ake tafiyar da yalm ko ma gwada yanar gizo, amma babu amsoshin wannan. Ina cikin masu amfani da suka yi waɗannan tambayoyin. Kuma saita gano shi. Tun da gaske ina buƙatar hanyar samar da rubutu don mutummutumi na kuɗi. Don su iya hasashen ba kawai dabi’u ba, har ma su yi sharhi game da shi a cikin rubutu, dangane da rahoton kuɗi. Ainihin, zai kasance daidai da abin da masu nazarin kudi ke yi, kawai tare da amfani da basirar wucin gadi. Akwai hanyoyi guda biyu don tafiyar da yalm.
Hayar uwar garken a cikin gajimaretare da 200+ Gb GPU RAM ko canza lambar kuma kuyi aiki tare da saukar da sifili mai zurfi (lokacin da GPU ke aiwatar da wani ɓangare na hanyar sadarwar jijiya, sauran kuma ana adana su a cikin CPU RAM ko NVMe). Na farko yana da tsada sosai, game da 2500 rubles a kowace awa ko miliyan 1.7 a wata. Na biyu ba a sani ba, saboda ba a bayar da lambar da ke cikin ma’ajiyar ba, kawai
alamu ne a cikin batun ma’ajiyar, wanda ba shi da wahala a yi. Bari mu fara sauki.

Umarnin Kaddamar YaLM 100B

1. Muna hayan 200 GB GPU RAM, misali a nan .

Neural Network YaLM 100B a aikace.

Kuna buƙatar aƙalla GB 200 na jimlar ƙwaƙwalwar bidiyo. 8×40 = 320 GB. Wannan kawai ya dace. Kasa da 200 ba zai yiwu ba, ƙari yana yiwuwa. Kibiya tana nuna RAM na CPU, ba ma kallonsa. Tana iya zama kowa.

Muna nuna faifai na kimanin 300 GB, don haka tare da kayan aiki kuma zai fi dacewa da faifai mai sauri, saboda. dubun gigabytes na bayanai za a tura su kuma daga gare ta.

Neural Network YaLM 100B a aikace.Lokacin ƙirƙirar tushen tushe, zaɓi Ubuntu ML (Machine Learning). Wannan wajibi ne don a daidaita katunan bidiyo kuma babu abin da ke buƙatar shigar da ƙari.

Lokacin ƙirƙirar uwar garken, akwai nuances tare da ƙididdiga, za ku iya jin cewa kayan aiki ba su samuwa, amma a gaskiya kawai kuna buƙatar ƙara yawan ƙididdiga a cikin saitunan. Bayan an kunna uwar garken (yana iya ɗaukar mintuna 5-10), haɗa zuwa uwar garken ta hanyar ssh ko kai tsaye a cikin na’urar wasan bidiyo ta yanar gizo akan shafin uwar garke kuma aiwatar da umarnin.

nvidia-smi

Sakamakon yakamata ya zama tebur mai katunan bidiyo, sigar direba da cuda. Kamar wannan.
Neural Network YaLM 100B a aikace.A cikin taken direban sigar da kuma inda. A gefen hagu akwai lambobin na’ura, a tsakiya akwai girman ƙwaƙwalwar na’urar. Idan baku da wannan bayanin, to kun tattara sabar daga tushen da ba daidai ba. Ana buƙatar Ubuntu ML (Machine Learnong) kamar yadda aka bayyana a sama.

2. Rufe wurin ajiya tare da YaLM

sudo git clone https://github.com/yandex/YaLM-100B/ yalm
cd yalm

Clone zuwa babban fayil ɗin ku don kada ku gyara saitin docker daga baya. Idan cloned wani wuri, to,
je nan da kuma ƙara hanyar zuwa inda cloned.

3. Zazzage wuraren bincike (bayanan horo na asali)

sudo chmod +x ./download/download.sh
sudo bash ./download/download.sh

Wannan zai ɗauki kusan awa ɗaya. Domin kada mu ɓata lokaci a banza, muna ƙirƙirar sabon haɗin ssh kuma a cikin layi daya mun fara gina akwati na docker.

4. Sanya nvidiadocker 2

Docker na al’ada bai dace ba,
nvidia-docker2 ana buƙatar .
https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#setting-up-nvidia-container-toolkit

5. Gina akwati don YaLM

cd yalm
sudo chmod +x ./docker/*
sudo bash ./docker/build.sh

Hakanan kusan awa daya ne.

Hack din rayuwa. Kuna iya saukar da wuraren bincike, shigar da docker da gina akwati akan sabar mai arha tare da katin bidiyo ɗaya. Zai zama iri ɗaya a cikin lokaci, don haka za ku iya ajiyewa kaɗan. Bayan haɗuwa akan sabar mai arha, muna share shi, kuma mu ƙirƙiri sabar fama ta amfani da faifai daga sabar mai arha. Sa’an nan ba za ku biya bashin lokacin jiran taro da fitar da wuraren bincike ba.

6. Shirya abun ciki

6.1 wuraren bincike

Bayan an gama zazzage wuraren bincike, kuna buƙatar zame su cikin saitunan. Akwai hanyoyi guda biyu, daidaitattun sigogi ko wuraren bincike na canja wuri. A ko’ina ana tsammanin cewa wuraren bincike za su kasance a cikin babban kundin tsarin aikin, bi da bi, abin da aka zazzage dole ne a canja shi daga babban fayil ɗin saukewa da ke sama. Kasancewa a cikin babban fayil ɗin yalm aiwatar

mv ./download/yalm100b_checkpoint ./

Ko canza hanyoyin zuwa fayilolin a cikin fayilolin misali
https://github.com/yandex/YaLM-100B/blob/c91b7d7fe8dbf39c9e307d6d324446d0df136a23/examples/generate_interactive.sh#L8-L9

6.2 Katin bidiyo

Muna duba cewa an saita katunan bidiyo daidai. Idan kana da katunan bidiyo guda takwas, to babu abin da yake buƙatar canza. Idan lambar ta bambanta, to, muna canza waɗannan layin
Neural Network YaLM 100B a aikace.A cikin layi na biyu, lambobin na’urorin da aka yi amfani da su (zaka iya duba su a cikin nvidia-smi, wanda ka riga ka kaddamar). A na hudu, adadin su.

7. Guda kwandon docker

Kasancewa a cikin babban fayil ɗin yalm, aiwatar da umarnin

sudo bash ./docker/run.sh

Idan komai ya yi kyau, to, za a kai ku zuwa wani akwati inda kuke buƙatar zuwa babban fayil ɗin yalm a cikin littafin gidan ku.

cd ~/yalm

8. Gudun misalin daga YaLM 100B

Mun shirya don ƙaddamar da ɗaya daga cikin misalan. An kwatanta su
a nan .

chmod +x ./misali/generate_interactive.sh
./examples/generate_interactive.sh

Yi haƙuri, ya rage don jira wasu mintuna 10-15 har sai an ƙirƙiri samfurin GPT kuma an ɗora ma’aunin nauyi daga wuraren bincike.
Neural Network YaLM 100B a aikace.

Lokacin da ginin ya ƙare, MegatronML zai sa ka shigar da mahallin don samar da rubutu. Yi hankali lokacin da kake bugawa. A ƙarƙashin wasu yanayi, kuskure yana faruwa, shirin ya rushe kuma kuna buƙatar sake fara taron. Saboda haka, yana da kyau a yi amfani da misalan da ke ɗaukar rubutu daga fayil.

9. Sakamakon aikin

Neural Network YaLM 100B a aikace.
Neural Network YaLM 100B a aikace.Ga alama mai ban sha’awa. Tabbas, waɗannan misalai ne masu kyau. Na gudanar da gwajin akan samfurori daban-daban. Kamar yadda ake tsammani, mafi kyawun mahallin, za a samar da rubutu mai ma’ana. Ana iya ganin cikakken tsarin tsararrakin gwaji a hanyoyin haɗin gwiwa:

Don farashin, ya kashe ni game da 9 dubu rubles don hayar sabobin na iyakoki daban-daban daga horo da kuma daga shirye-shiryen zuwa tsara. Wani abin takaici shine ba za ku iya samar da komai nan take ba. Yana ɗaukar lokaci mai tsawo don farawa kuma rubutun baya haifar da sauri kamar yadda muke so, idan aka yi la’akari da farashin sabar a kowace awa.
Neural Network YaLM 100B a aikace. 

Yadda ake gudanar da YaLM ba tare da 200Gb GPU RAM ba?

Kuna buƙatar ƙara saukar da sifili mai zurfi zuwa tsarin saiti. Ga wadanda suka san abin da muke magana akai, zai kasance da sauƙin yin shi. Ga wasu, wannan ba ƙaramin aiki ba ne ko kaɗan. Yana da mahimmanci a san cewa sauke kaya na iya kasancewa ko dai a cikin CPU RAM ko NVMe. Kuna iya mantawa game da NVMe a halin yanzu, saboda. Ana sarrafa adadi mai yawa na bayanai kuma faifan ba zai iya jurewa da shi ba. Zero offload CPU ya fi gaske. Gaskiya, don wannan kuna buƙatar samun 200+ Gb CPU RAM a hannun jari, wanda kuma ba shi da arha. Kuma za a samar da rubutu ɗaya na kusan mintuna 20-40, tunda har yanzu ba a sami damar daidaita shi akan katunan bidiyo guda biyu ba. Kamar yadda kake gani a cikin hoton da ke ƙasa, katin bidiyo ɗaya ne kawai ya shiga cikin tsararraki, sannan kawai don kwata na ƙwaƙwalwar ajiya. Ya rage don ganin dalilin da yasa ba a amfani da duk 24 GB,
Neural Network YaLM 100B a aikace.Da kyau, a ƙarshe, zan faɗi cewa yana yiwuwa a yi aiki ko da akan RTX 3070 TI ɗaya. Amma babu wata ma’ana ta musamman a cikin wannan, saboda. NVMe ba zai ba ku damar aiwatar da 150 GB na bayanai da sauri a cikin musanya ba, waɗanda ke cikin appendage na 96 GB na RAM.
Neural Network YaLM 100B a aikace.

Taƙaice

Tabbas, har yanzu zan yi ƙoƙarin nemo mafi kyawun hanyoyin ƙaddamarwa. Amma ya zuwa yanzu na kai ga ƙarshe cewa YaLM 100b yana da tsada sosai / yayi jinkiri ga ayyuka na. Don kuɗi ɗaya, mutane za su yi rubutu da yawa kuma mafi kyau. Amma ina ganin na wucin gadi ne, za mu gani. Idan kuna buƙatar taimako tare da ƙaddamarwa, kafa yalm, ko kuna son ganin sakamakon akan misalan mahallin ku, rubuta zuwa wasiku ko telegram.

pskucherov
Rate author
Add a comment

  1. Olha

    Статья на Мега актуальную тему! Спасибо.

    Reply
  2. Данила

    Крутая статья! Спасибо автору!

    Reply
  3. Дмитрий

    СПАСИБО !!!
    три дня эту информацию искал
    нет подобного о RuGPT3 и Порфириче?

    Reply