From f6980752a18b6ba7a625463b346c15176e8ca802 Mon Sep 17 00:00:00 2001 From: gstdl <54521960+gstdl@users.noreply.github.com> Date: Sat, 22 Oct 2022 20:04:57 +0700 Subject: [PATCH 1/7] add chapter0 --- chapters/id/chapter0/1.mdx | 110 +++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 chapters/id/chapter0/1.mdx diff --git a/chapters/id/chapter0/1.mdx b/chapters/id/chapter0/1.mdx new file mode 100644 index 000000000..0f49326d9 --- /dev/null +++ b/chapters/id/chapter0/1.mdx @@ -0,0 +1,110 @@ +# Pendahuluan + +Selamat datang di kursus Hugging Face! Pada Bab ini, anda akan dibimbing untuk mempersiapkan _working environment_. Jika anda memulai kursus ini untuk pertama kali, anda sangat direkomendasikan untuk menyelesaikan [Bab 1](/course/chapter1) terlebih dahulu. Setelah menyelesaikan [Bab 1](/course/chapter1) anda bisa kembali ke page ini untuk mencoba eksplorasi kodenya secara independen. + +Semua modul yang digunakan dalam kursus ini tersedia dalam modul Python. Di kursus ini, anda juga akan dibimbing untuk mempersiapkan Python _environment_ dan menginstal modul-modul yang dibutuhkan. + +Ada 2 cara untuk jenis _working environment_ yang bisa anda gunakan, Colab notebook dan _virtual environment_ Python. Anda bebas memilih _working envrionment_, tapi untuk pemula, kami menyarankan untuk menggunakan Colab notebook. + +Sebagai catatan, kursus ini tidak mencakup instalasi untuk pengguna Windows. Jika anda menggunakan Windows, mohon menggunakan Colab notebook. Jika anda adalah pengguna Linux atau macOS, anda bebas memilih _working environment_ yang akan dijelaskan dibawah. + +Sebagian besar dari kursus ini akan mewajibkan anda untuk memiliki akun Hugging Face. Jika anda belum memiliki akun, silahkan mendaftar terlebih dahulu di tautan berikut [https://huggingface.co/join](https://huggingface.co/join). + +## Menggunakan Google Colab notebook + +Menggunakan Colab notebook sangatlah sederhana, cukup dengan membuat notebook baru anda sudah bisa mulai koding! + +Jika anda belum terbiasa menggunakan Colab, silahkan mengikuti [tutorial pengenalan Colab dari Google](https://colab.research.google.com/notebooks/intro.ipynb) (hanya tersedia dalam Bahasa Inggris). Saat menggunakan Colab, anda dapat mengakses hardware seperti GPU dan TPU yang dapat mengakselerasi proses pengolahan data. Hardware ini dapat anda gunakan secara gratis untuk proyek skala kecil. + +Setelah terbiasa dengan Colab, buatlah notebook baru dengan setup sebagai berikut: + +
+An empty colab notebook +
+ +Langkah berikutnya adalah menginstal modul-modul yang akan digunakan dalam kursus ini menggunakan `pip`. `pip` adalah modul manager untuk bahasa pemrograman Python. Di dalam notebook, anda dapat mengakses komando sistem dengan menambahkan tanda seru (`!`) sebelum kode instruksi anda. Contoh instalasi modul πŸ€— adalah sebagai berikut: + +``` +!pip install transformers +``` + +Untuk memastikan bahwa modul telah terinstalasi dengan benar, anda perlu mencoba untuk meng-_import_ modul tersebut di _runtime_ Python anda: + +``` +import transformers +``` + +
+A gif showing the result of the two commands above: installation and import +
+ +Kode instruksi diatas menginstall versi ringan dari πŸ€— Transformers. Versi ringan ini tidak mengistall modul _machine learning_ (seperti PyTorch atau TensorFlow). Sangat direkomendasikan untuk mengistal versi _development_ dari modul ini karena nanti anda akan menggunakan berbagai macam fitur yang tersedia didalam modul ini dan versi ini juga akan mencakup berbagai macam modul untuk segala macam kasus yang akan dihadapi dalam kursus ini. Untuk mengistal versi _development_, silahkan eksekusi kode dibawah: + +``` +!pip install transformers[sentencepiece] +``` + +Proses instalasi akan berlangsung cukup lama. Tapi saat instalasi selesai, anda sudah siap untuk menyelesaikan kursus ini! + +## Menggunakan Python _virtual environment_ + +Jika anda ingin menggunakan Python _virtual environment_, tentu saja langkah pertama yang harus anda lewati adalah menginstal Python. Untuk menginstal Python, bisa mengikuti referensi di tautan [ini](https://realpython.com/installing-python/). + +Setelah Python berhasil terinstalasi, anda bisa menjalankan kode Python di terminal anda. Anda bisa memulai dengan mengeksekusi instruksi berikut untuk memastikan bahwa Python terinstalasi dengan benar: `python --version`. Instruksi ini akan menampilkan versi Python yang terinstalasi di komputer anda. + +Python yang saat ini terinstalasi di sistem anda adalah versi Python *"utama"* untuk sistem anda. Sangat direkomendasikan untuk tidak mengotak-ngatik Python "utama" di sistem anda, dan untuk setiap aplikasi yang akan dikembangkan menggunakan Python akan lebih baik jika menggunakan versi Python berbeda. Pada umumnya, versi Python yang digunakan untuk pengembangan aplikasi bukanlah versi "utama". Ini dilakukan karena setiap aplikasi menggunakan modul yang berbeda-beda dan setiap modul memiliki ketergantugan satu sama lain. Dengan menggunakan versi berbeda, kekhawatiran terjadinya konflik antar modul dapat dihindari. + +Penggunaan versi berbeda dari Python dilakukan dengan menggunakan [*virtual environments*](https://docs.python.org/3/tutorial/venv.html). _Virtual environment_ adalah instalasi Python terpisah yang digunakan untuk keperluan tertentu aplikasi. Di dalam virtual environment, versi Python maupun modul-modul yang terinstal akan terisolasi dari versi Python "utama". Terdapata banyak cara untuk membuat _virtual environment_, tapi di kursus ini kita akan mengikuti arahan khusus dari dokumentasi resmi Python yang dinamai [`venv`](https://docs.python.org/3/library/venv.html#module-venv). + +Pertama, buatlah folder baru untuk menyimpan aplikasi yang akan dibuat. Sebagai contoh, anda mungkin akan membuat folder baru bernama *transformers-course* di root folder dari home directory komputer anda: + +``` +mkdir ~/transformers-course +cd ~/transformers-course +``` + +Setelah masuk ke folder baru tersebut, buatlah _virtual environment_ menggunakan modul `venv` Python: + +``` +python -m venv .env +``` + +Setelah menggunakan modul `venv`, anda akan memiliki folder baru bernama *.env*: + +``` +ls -a +``` + +```out +. .. .env +``` + +Instruksi dibawah adalah instruksi untuk mengaktifkan dan menonaktifkan _virtual environment_ yang baru saja dibuat: + +``` +# Mengaktifkan virtual environment +source .env/bin/activate + +# Menonaktifkan virtual environment +source .env/bin/deactivate +``` + +Anda bisa memastikan bahwa anda menggunakan Python versi _virtual environment_ dengan mengeksekusi `which python` di terminal: jika balasan terminal adalah Python di dalam folder *.env*, maka _virtual environment_ anda sudah aktif! + +``` +which python +``` + +```out +/home//transformers-course/.env/bin/python +``` + +### Instalasi modul + +Sama seperti di Google Colab, anda perlu menginstal modul-modul yang diperlukan. Kali ini, instalasi versi _development_ πŸ€— Transformers dapat dilakukan menggunakan _package manager_ `pip`: + +``` +pip install "transformers[sentencepiece]" +``` + +Sekarang anda siap untuk mulai belajar! \ No newline at end of file From 8ec5e4954d5570eae659fc4009d08ac9a1398223 Mon Sep 17 00:00:00 2001 From: gstdl <54521960+gstdl@users.noreply.github.com> Date: Mon, 24 Oct 2022 14:19:49 +0700 Subject: [PATCH 2/7] add id/chapter1/1 --- chapters/id/chapter1/1.mdx | 61 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 chapters/id/chapter1/1.mdx diff --git a/chapters/id/chapter1/1.mdx b/chapters/id/chapter1/1.mdx new file mode 100644 index 000000000..bdce1e62e --- /dev/null +++ b/chapters/id/chapter1/1.mdx @@ -0,0 +1,61 @@ +# Pendahuluan + + + +## Selamat datang di Kursus πŸ€—! + + + +Pada kursus ini, anda akan belajar mengenai _natural language processing_ (pemrosesan bahasa natural) atau NLP menggunakan modul-modul dari ekosistem [Hugging Face](https://huggingface.co/) - [πŸ€— Transformers](https://github.com/huggingface/transformers), [πŸ€— Datasets](https://github.com/huggingface/datasets), [πŸ€— Tokenizers](https://github.com/huggingface/tokenizers), and [πŸ€— Accelerate](https://github.com/huggingface/accelerate) β€” as well as the [Hugging Face Hub](https://huggingface.co/models). Kursus ini 100% gratis tanpa iklan. + + +## Silabus + +Silabus kursus ini adalah sebagai berikut: + +
+Brief overview of the chapters of the course. + +
+ +- Bab 1-4 akan mencakup pengenalan konsep-konsep dasar modul πŸ€— Transformers. Di akhir bab 4, anda akan tahu bagaimana menggunakan model-model _Transformer_ dari [Hugging Face Hub](https://huggingface.co/models), melakukan model _fine-tuning_ untuk dataset anda, dan membagikan model anda di Hugging Face Hub! +- Bab 5-8 akan mencakup dasar-dasar dari πŸ€— Datasets dan πŸ€— Tokenizers sebelum anda diperkenalkan ke kasus-kasus yang dapat ditangani dengan NLP. Diakhir kursus ini, anda akan mampu menangani dan menyelesaikan kasus-kasus NLP. +- Chapters 9 to 12 go beyond NLP, and explore how Transformer models can be used tackle tasks in speech processing and computer vision. Along the way, you'll learn how to build and share demos of your models, and optimize them for production environments. By the end of this part, you will be ready to apply πŸ€— Transformers to (almost) any machine learning problem! +- Setelah NLP, di bab 9-12, anda akan mengeksplorasi bagaimana model-model Transformer dapat digunakan untuk menangani kasus-kasus lain seperti _speech processing_ (pemrosesan ucapan) dan _computer vision_ (penglihatan komputer). Selain itu, anda akan belajar cara membuat dan membagikan demo (prototype) dari model anda, serta cara mengoptimisasi model anda untuk _production environment_ (penerapan di kasus asli). Di akhir bab 12, anda akan siap mengimplementasikan πŸ€— Transformers untuk (hampir) semua kasus _machine learning_ (pembelajaran mesin)! + +Syarat mengikuti kursus: + +* Requires a good knowledge of Python +* Pengetahuan mengenai Python +* Akan lebih baik jika sudah mengenal deep learning dengan mengambil kursus dari [fast.ai](https://www.fast.ai/) "[Practical Deep Learning for Coders](https://course.fast.ai/)" atau program-program yang dikembangkan oleh [DeepLearning.AI](https://www.deeplearning.ai/) +* Tidak perlu pengetahuan mengenai [PyTorch](https://pytorch.org/) atau [TensorFlow](https://www.tensorflow.org/). Tapi, akan lebih baik jika sudah terbiasa dengan salah satu framework tersebut. + +Setelah menyelesaikan kursus ini, sangat direkomendasikan untuk mengikuti kursus dari DeepLearning.AI [Natural Language Processing Specialization](https://www.coursera.org/specializations/natural-language-processing?utm_source=deeplearning-ai&utm_medium=institutions&utm_campaign=20211011-nlp-2-hugging_face-page-nlp-refresh) yang akan mencakup model-model NLP klasik seperti naive Bayes dan LSTM. Pengetahuan tersebut akan sangat berharga bagi anda! + +## Tentang penulis + +**Abubakar Abid** adalah lulusan PhD dari Stanford dengan konsentrasi aplikasi pembelajaran mesin. Sembari menyelesaikan pendidikan PhD, beliau menciptakan [Gradio](https://github.com/gradio-app/gradio), sebuah modul _open-source_ Python yang sudah digunakan untuk membuat lebih dari 600.000 demo (prototype) model _machine learning_. Gradio telah diakusisi oleh Hugging Face, tempat dimana Abubakar bekerja sebagai _machine learning team lead_. + +**Matthew Carrigan** bekerja sebagai _Machine Learning Engineer_ di Hugging Face. Beliau tinggal di Dublin, Irlandia, pernah bekerja sebagai _ML engineer_ di Parse.ly dan sebelumnya merupakan peneliti post-doctoral di Trinity College Dublin. Beliau tidak percaya kita akan mencapai Artificial general intelligence (AGI) dengan menambahkan skala dari arsitektur yang digunakan sekarang, namun memiliki optimisme mengenai imortalitas robot. + +**Lysandre Debut** bekerja sebagai _Machine Learning Engineer_ di Hugging Face dan berfokus mengembangkan modul πŸ€— Transformers sejak seumur jagung. Beliau mempunya mimpi untuk agar NLP dapat diakses oleh semua orang dengan mengembangkan alat-alat atau aplikasi-aplikasi sederhana menggunkan API. + +**Sylvain Gugger** adalah _Research Engineer_ di Hugging Face dan merupakan salah satu _maintainer_ dari modul πŸ€— Transformers. Beliau pernah bekerja sebagai _Research Scientist_ di fast.ai, dan bersama Jeremy Howard menulis _[Deep Learning for Coders with fastai and PyTorch](https://learning.oreilly.com/library/view/deep-learning-for/9781492045519/)_. Fokus utama dari penelitian beliau adalah membuat _deep learning_ lebih mudah diakses dengan mendesain dan memperbaiki teknik-teknik untuk melatih model dengan sumber daya terbatas. + +**Dawood Khan** bekerja sebagai _Machine Learning Engineer_ di Hugging Face. Beliau berasal dari NYC dan merupakan lulusan New York University jurusan _Computer Science_. Sempat bekerja sebagai iOS _Engineer_ untuk beberapa tahun, Dawood memutuskan untuk _resign_ dan mengembangkan Gradio bersama rekan-rekan co-foundernya. Seiring berjalannya waktu, Gradio diakusisi oleh Hugging Face. + +**Merve Noyan** adalah advokat _developer_ di Hugging Face, beliau bertugas untuk mengembangkan konten beserta medianya untuk mendemokrasikan _machine learning_ untuk semua orang. + +**Lucile Saulnier** adalah _machine learning engineer_ di Hugging Face, bertugas untuk mengembangkan dan mendukung penggunaan alat-alat _open source_. Beliau juga aktif dalam banyak riset mengenai _Natural Language Processing_ seperti _collaborative training_ dan BigScience. + +**Lewis Tunstall** merupakan _machine learning engineer_ di Hugging Face, bertugas untuk mengembangkan alat-alat _open source_ dan membuatnya dapat diakses oleh komunitas. Beliau juga merupakan salah satu penulis dari buku terbitan O’Reilly berjudul [Natural Language Processing with Transformers](https://www.oreilly.com/library/view/natural-language-processing/9781098136789/). + +**Leandro von Werra** bekerja sebagai _machine learning engineer_ untuk tim _open-source_ di Hugging Face dan juga merupkan salah satu penulis buku [Natural Language Processing with Transformers](https://www.oreilly.com/library/view/natural-language-processing/9781098136789/) yang diterbitkan oleh O'Reilly. Beliau memiliki memiliki pengalaman mengembangkan proyek-proyek NLP untuk kasus nyata pada berbagai macam _machine learning stack_ selama beberapa tahun. + +Sudah siap untuk belajar? Di bab ini anda akan belajar mengenai: +* Penggunaan fungsi `pipeline()` untuk memecahkan masalah-masalah NLP seperti _text generation_ (pembuatan teks) dan klasifikasi. +* Arsitektur Transformer +* Bagaimana membedakan arsitektur encoder, decoder, dan encoder-decoder beserta kasus-kasus terkait. From 8e216551c9f13b69ace2177109b9bfeda2c453a5 Mon Sep 17 00:00:00 2001 From: gstdl <54521960+gstdl@users.noreply.github.com> Date: Mon, 24 Oct 2022 14:20:06 +0700 Subject: [PATCH 3/7] add id/_toctree.yml --- chapters/id/_toctree.yml | 201 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 chapters/id/_toctree.yml diff --git a/chapters/id/_toctree.yml b/chapters/id/_toctree.yml new file mode 100644 index 000000000..8cc0f1668 --- /dev/null +++ b/chapters/id/_toctree.yml @@ -0,0 +1,201 @@ +- title: 0. Persiapan + sections: + - local: chapter0/1 + title: Pendahuluan + +- title: 1. Model-model Transformer + sections: + - local: chapter1/1 + title: Pendahuluan +# - local: chapter1/2 +# title: Natural Language Processing +# - local: chapter1/3 +# title: Transformers, what can they do? +# - local: chapter1/4 +# title: How do Transformers work? +# - local: chapter1/5 +# title: Encoder models +# - local: chapter1/6 +# title: Decoder models +# - local: chapter1/7 +# title: Sequence-to-sequence models +# - local: chapter1/8 +# title: Bias and limitations +# - local: chapter1/9 +# title: Summary +# - local: chapter1/10 +# title: End-of-chapter quiz +# quiz: 1 + +# - title: 2. Using πŸ€— Transformers +# sections: +# - local: chapter2/1 +# title: Introduction +# - local: chapter2/2 +# title: Behind the pipeline +# - local: chapter2/3 +# title: Models +# - local: chapter2/4 +# title: Tokenizers +# - local: chapter2/5 +# title: Handling multiple sequences +# - local: chapter2/6 +# title: Putting it all together +# - local: chapter2/7 +# title: Basic usage completed! +# - local: chapter2/8 +# title: End-of-chapter quiz +# quiz: 2 + +# - title: 3. Fine-tuning a pretrained model +# sections: +# - local: chapter3/1 +# title: Introduction +# - local: chapter3/2 +# title: Processing the data +# - local: chapter3/3 +# title: Fine-tuning a model with the Trainer API or Keras +# local_fw: { pt: chapter3/3, tf: chapter3/3_tf } +# - local: chapter3/4 +# title: A full training +# - local: chapter3/5 +# title: Fine-tuning, Check! +# - local: chapter3/6 +# title: End-of-chapter quiz +# quiz: 3 + +# - title: 4. Sharing models and tokenizers +# sections: +# - local: chapter4/1 +# title: The Hugging Face Hub +# - local: chapter4/2 +# title: Using pretrained models +# - local: chapter4/3 +# title: Sharing pretrained models +# - local: chapter4/4 +# title: Building a model card +# - local: chapter4/5 +# title: Part 1 completed! +# - local: chapter4/6 +# title: End-of-chapter quiz +# quiz: 4 + +# - title: 5. The πŸ€— Datasets library +# sections: +# - local: chapter5/1 +# title: Introduction +# - local: chapter5/2 +# title: What if my dataset isn't on the Hub? +# - local: chapter5/3 +# title: Time to slice and dice +# - local: chapter5/4 +# title: Big data? πŸ€— Datasets to the rescue! +# - local: chapter5/5 +# title: Creating your own dataset +# - local: chapter5/6 +# title: Semantic search with FAISS +# - local: chapter5/7 +# title: πŸ€— Datasets, check! +# - local: chapter5/8 +# title: End-of-chapter quiz +# quiz: 5 + +# - title: 6. The πŸ€— Tokenizers library +# sections: +# - local: chapter6/1 +# title: Introduction +# - local: chapter6/2 +# title: Training a new tokenizer from an old one +# - local: chapter6/3 +# title: Fast tokenizers' special powers +# - local: chapter6/3b +# title: Fast tokenizers in the QA pipeline +# - local: chapter6/4 +# title: Normalization and pre-tokenization +# - local: chapter6/5 +# title: Byte-Pair Encoding tokenization +# - local: chapter6/6 +# title: WordPiece tokenization +# - local: chapter6/7 +# title: Unigram tokenization +# - local: chapter6/8 +# title: Building a tokenizer, block by block +# - local: chapter6/9 +# title: Tokenizers, check! +# - local: chapter6/10 +# title: End-of-chapter quiz +# quiz: 6 + +# - title: 7. Main NLP tasks +# sections: +# - local: chapter7/1 +# title: Introduction +# - local: chapter7/2 +# title: Token classification +# - local: chapter7/3 +# title: Fine-tuning a masked language model +# - local: chapter7/4 +# title: Translation +# - local: chapter7/5 +# title: Summarization +# - local: chapter7/6 +# title: Training a causal language model from scratch +# - local: chapter7/7 +# title: Question answering +# - local: chapter7/8 +# title: Mastering NLP +# - local: chapter7/9 +# title: End-of-chapter quiz +# quiz: 7 + +# - title: 8. How to ask for help +# sections: +# - local: chapter8/1 +# title: Introduction +# - local: chapter8/2 +# title: What to do when you get an error +# - local: chapter8/3 +# title: Asking for help on the forums +# - local: chapter8/4 +# title: Debugging the training pipeline +# local_fw: { pt: chapter8/4, tf: chapter8/4_tf } +# - local: chapter8/5 +# title: How to write a good issue +# - local: chapter8/6 +# title: Part 2 completed! +# - local: chapter8/7 +# title: End-of-chapter quiz +# quiz: 8 + +# - title: 9. Building and sharing demos +# new: true +# subtitle: I trained a model, but how can I show it off? +# sections: +# - local: chapter9/1 +# title: Introduction to Gradio +# - local: chapter9/2 +# title: Building your first demo +# - local: chapter9/3 +# title: Understanding the Interface class +# - local: chapter9/4 +# title: Sharing demos with others +# - local: chapter9/5 +# title: Integrations with the Hugging Face Hub +# - local: chapter9/6 +# title: Advanced Interface features +# - local: chapter9/7 +# title: Introduction to Blocks +# - local: chapter9/8 +# title: Gradio, check! +# - local: chapter9/9 +# title: End-of-chapter quiz +# quiz: 9 + +# - title: Course Events +# sections: +# - local: events/1 +# title: Live sessions and workshops +# - local: events/2 +# title: Part 2 release event +# - local: events/3 +# title: Gradio Blocks party From ab57862a971f96cebecd30d6fa7b37cb6168e9da Mon Sep 17 00:00:00 2001 From: gstdl <54521960+gstdl@users.noreply.github.com> Date: Mon, 24 Oct 2022 14:23:12 +0700 Subject: [PATCH 4/7] add id to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index db63d526c..db20052fa 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ This repo contains the content that's used to create the **[Hugging Face course] | [Gujarati](https://huggingface.co/course/gu/chapter1/1) (WIP) | [`chapters/gu`](https://github.com/huggingface/course/tree/main/chapters/gu) | [@pandyaved98](https://github.com/pandyaved98) | | [Hebrew](https://huggingface.co/course/he/chapter1/1) (WIP) | [`chapters/he`](https://github.com/huggingface/course/tree/main/chapters/he) | [@omer-dor](https://github.com/omer-dor) | | [Hindi](https://huggingface.co/course/hi/chapter1/1) (WIP) | [`chapters/hi`](https://github.com/huggingface/course/tree/main/chapters/hi) | [@pandyaved98](https://github.com/pandyaved98) | +| [Bahasa Indonesia](https://huggingface.co/course/id/chapter1/1) (WIP) | [`chapters/id`](https://github.com/huggingface/course/tree/main/chapters/id) | [@gstdl](https://github.com/gstdl) | | [Italian](https://huggingface.co/course/it/chapter1/1) (WIP) | [`chapters/it`](https://github.com/huggingface/course/tree/main/chapters/it) | [@CaterinaBi](https://github.com/CaterinaBi), [@ClonedOne](https://github.com/ClonedOne), [@Nolanogenn](https://github.com/Nolanogenn), [@EdAbati](https://github.com/EdAbati), [@gdacciaro](https://github.com/gdacciaro) | | [Japanese](https://huggingface.co/course/ja/chapter1/1) (WIP) | [`chapters/ja`](https://github.com/huggingface/course/tree/main/chapters/ja) | [@hiromu166](https://github.com/@hiromu166), [@younesbelkada](https://github.com/@younesbelkada), [@HiromuHota](https://github.com/@HiromuHota) | | [Korean](https://huggingface.co/course/ko/chapter1/1) (WIP) | [`chapters/ko`](https://github.com/huggingface/course/tree/main/chapters/ko) | [@Doohae](https://github.com/Doohae) | From cdfec2fda03eac8470c9084ccb04de3542827752 Mon Sep 17 00:00:00 2001 From: gstdl <54521960+gstdl@users.noreply.github.com> Date: Mon, 24 Oct 2022 14:24:42 +0700 Subject: [PATCH 5/7] add `id` to `.github/workflows` --- .github/workflows/build_documentation.yml | 2 +- .github/workflows/build_pr_documentation.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_documentation.yml b/.github/workflows/build_documentation.yml index b730778f2..b09b32f58 100644 --- a/.github/workflows/build_documentation.yml +++ b/.github/workflows/build_documentation.yml @@ -14,6 +14,6 @@ jobs: package: course path_to_docs: course/chapters/ additional_args: --not_python_module - languages: ar bn de en es fa fr gj he hi it ja ko pt ru th tr vi zh-CN zh-TW + languages: ar bn de en es fa fr gj he hi id it ja ko pt ru th tr vi zh-CN zh-TW secrets: token: ${{ secrets.HUGGINGFACE_PUSH }} diff --git a/.github/workflows/build_pr_documentation.yml b/.github/workflows/build_pr_documentation.yml index 51347210f..45e3b3e09 100644 --- a/.github/workflows/build_pr_documentation.yml +++ b/.github/workflows/build_pr_documentation.yml @@ -16,5 +16,5 @@ jobs: package: course path_to_docs: course/chapters/ additional_args: --not_python_module - languages: ar bn de en es fa fr gj he hi it ja ko pt ru th tr vi zh-CN zh-TW + languages: ar bn de en es fa fr gj he hi id it ja ko pt ru th tr vi zh-CN zh-TW hub_base_path: https://moon-ci-docs.huggingface.co From 9bd321c1c15da8b4986bf4e5fb4edf1610836032 Mon Sep 17 00:00:00 2001 From: Gusti Adli Anshari <54521960+gstdl@users.noreply.github.com> Date: Wed, 26 Oct 2022 10:53:38 +0700 Subject: [PATCH 6/7] [id] add chapter1/2 --- chapters/id/_toctree.yml | 4 ++-- chapters/id/chapter1/2.mdx | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 chapters/id/chapter1/2.mdx diff --git a/chapters/id/_toctree.yml b/chapters/id/_toctree.yml index 8cc0f1668..c6c1780e9 100644 --- a/chapters/id/_toctree.yml +++ b/chapters/id/_toctree.yml @@ -7,8 +7,8 @@ sections: - local: chapter1/1 title: Pendahuluan -# - local: chapter1/2 -# title: Natural Language Processing + - local: chapter1/2 + title: Pemrosesan Bahasa Natural # - local: chapter1/3 # title: Transformers, what can they do? # - local: chapter1/4 diff --git a/chapters/id/chapter1/2.mdx b/chapters/id/chapter1/2.mdx new file mode 100644 index 000000000..9d73e7447 --- /dev/null +++ b/chapters/id/chapter1/2.mdx @@ -0,0 +1,27 @@ +# Pemrosesan Bahasa Natural (Natural Language Processing) + + + +Sebelum mempelajari mengenai model-model Transformer, mari menyamakan persepsi mengenai _natural language processing_ (NLP) terlebih dahulu. + +## NLP itu apa? + +NLP merupakan cabang ilmu linguistik dan pembelajaran mesin (_machine learning_) yang bertujuan untuk memahami bahasa manusia sehari-hari. Tujuan dari penerapan NLP tidak terbatas pada pemahaman kata per kata saja, tapi juga mengenai konteks yang terkandung dalam setiap ucapan/kata. + +Beberapa penerapan NLP yang umum diterapkan beserta contohnya dapat dilihat dibawah: + +- **Klasifikasi kalimat secara utuh**: Mengetahui sentimen dari sebuah review, mendeteksi email spam, menentukan ketepatan tata bahasa sebuah kalimat atau mencari tahu keterkaitan antar 2 kalimat +- **Classifying each word in a sentence**: Identifying the grammatical components of a sentence (noun, verb, adjective), or the named entities (person, location, organization) +- **Klasifikasi setiap kata dalam sebuah kalimat**: Pengelompokkan unsur kalimat (kata benda, kata kerja, kata sifat), atau pengelompokkan subjek kalimat (orang, lokasi, organisasi) +- **Menciptakan/menambahkan/memperkaya kalimat**: Menyelesaikan kalimat dengan teks yang diciptakan secara otomatis, mengisi titik-titik pada sebuah kuis +- **Menjawab pertanyaan**: Dengan memberi model daftar pertanyaan beserta konteks, menjawab pertanyaan berdasar informasi yang tersedia +- **Menciptakan kalimat baru dari teks**: Menerjemahkan suatu bahasa ke bahasa lain, menyimpulkan kalimat + +Penerapan NLP tidak hanya terbatas pada teks. NLP juga dapat diterapkan untuk menangani kasus pengelan suara (_speech recognition_) dan penglihatan komputer (_computer vision_) seperti menciptakan transkrip dari sampel suara (audio) atau deskripsi gambar. + +## Tantangan-tantangan dalam penerapan NLP + +Komputer tidak dapat memahami informasi secara langsung maupun secara harfiah seperti manusia. Sebagai contoh, ketika membaca kalimat "Saya lapar", manusia dapat dengan mudah memahami maknanya. Begitu juga jika ketika membaca kalimat "Saya lapar" dan "Saya sedih", manusia dapat dengan memudah menentukan apakah kedua kalimat memiliki kemiripan atau tidak. Tapi hal-hal tersebut sulit dipahami oleh model pembelajaran mesin (_machine learning_ (ML)). Kalimat-kalimat tersebut perlu direkayasa (diolah) sedimikian rupa sehingga dapat dipelajari oleh model ML. Ditambah dengan keunikan setiap bahasa/teks, kompleksitas rekayasa yang perlu dilakukan menjadi tantangan tersendiri. Sudah ada banyak riset yang meneliti mengenai bagaiman merekayasa teks untuk penerapan ML dan anda akan mempelajarinya di bab-bab berikutnya. From 31ff22577c7797ac9f8bfd16ce8381844283b460 Mon Sep 17 00:00:00 2001 From: Gusti Adli Anshari <54521960+gstdl@users.noreply.github.com> Date: Fri, 28 Oct 2022 15:39:45 +0700 Subject: [PATCH 7/7] remove commented chapters --- chapters/id/_toctree.yml | 190 --------------------------------------- 1 file changed, 190 deletions(-) diff --git a/chapters/id/_toctree.yml b/chapters/id/_toctree.yml index c6c1780e9..09eb7b0e6 100644 --- a/chapters/id/_toctree.yml +++ b/chapters/id/_toctree.yml @@ -9,193 +9,3 @@ title: Pendahuluan - local: chapter1/2 title: Pemrosesan Bahasa Natural -# - local: chapter1/3 -# title: Transformers, what can they do? -# - local: chapter1/4 -# title: How do Transformers work? -# - local: chapter1/5 -# title: Encoder models -# - local: chapter1/6 -# title: Decoder models -# - local: chapter1/7 -# title: Sequence-to-sequence models -# - local: chapter1/8 -# title: Bias and limitations -# - local: chapter1/9 -# title: Summary -# - local: chapter1/10 -# title: End-of-chapter quiz -# quiz: 1 - -# - title: 2. Using πŸ€— Transformers -# sections: -# - local: chapter2/1 -# title: Introduction -# - local: chapter2/2 -# title: Behind the pipeline -# - local: chapter2/3 -# title: Models -# - local: chapter2/4 -# title: Tokenizers -# - local: chapter2/5 -# title: Handling multiple sequences -# - local: chapter2/6 -# title: Putting it all together -# - local: chapter2/7 -# title: Basic usage completed! -# - local: chapter2/8 -# title: End-of-chapter quiz -# quiz: 2 - -# - title: 3. Fine-tuning a pretrained model -# sections: -# - local: chapter3/1 -# title: Introduction -# - local: chapter3/2 -# title: Processing the data -# - local: chapter3/3 -# title: Fine-tuning a model with the Trainer API or Keras -# local_fw: { pt: chapter3/3, tf: chapter3/3_tf } -# - local: chapter3/4 -# title: A full training -# - local: chapter3/5 -# title: Fine-tuning, Check! -# - local: chapter3/6 -# title: End-of-chapter quiz -# quiz: 3 - -# - title: 4. Sharing models and tokenizers -# sections: -# - local: chapter4/1 -# title: The Hugging Face Hub -# - local: chapter4/2 -# title: Using pretrained models -# - local: chapter4/3 -# title: Sharing pretrained models -# - local: chapter4/4 -# title: Building a model card -# - local: chapter4/5 -# title: Part 1 completed! -# - local: chapter4/6 -# title: End-of-chapter quiz -# quiz: 4 - -# - title: 5. The πŸ€— Datasets library -# sections: -# - local: chapter5/1 -# title: Introduction -# - local: chapter5/2 -# title: What if my dataset isn't on the Hub? -# - local: chapter5/3 -# title: Time to slice and dice -# - local: chapter5/4 -# title: Big data? πŸ€— Datasets to the rescue! -# - local: chapter5/5 -# title: Creating your own dataset -# - local: chapter5/6 -# title: Semantic search with FAISS -# - local: chapter5/7 -# title: πŸ€— Datasets, check! -# - local: chapter5/8 -# title: End-of-chapter quiz -# quiz: 5 - -# - title: 6. The πŸ€— Tokenizers library -# sections: -# - local: chapter6/1 -# title: Introduction -# - local: chapter6/2 -# title: Training a new tokenizer from an old one -# - local: chapter6/3 -# title: Fast tokenizers' special powers -# - local: chapter6/3b -# title: Fast tokenizers in the QA pipeline -# - local: chapter6/4 -# title: Normalization and pre-tokenization -# - local: chapter6/5 -# title: Byte-Pair Encoding tokenization -# - local: chapter6/6 -# title: WordPiece tokenization -# - local: chapter6/7 -# title: Unigram tokenization -# - local: chapter6/8 -# title: Building a tokenizer, block by block -# - local: chapter6/9 -# title: Tokenizers, check! -# - local: chapter6/10 -# title: End-of-chapter quiz -# quiz: 6 - -# - title: 7. Main NLP tasks -# sections: -# - local: chapter7/1 -# title: Introduction -# - local: chapter7/2 -# title: Token classification -# - local: chapter7/3 -# title: Fine-tuning a masked language model -# - local: chapter7/4 -# title: Translation -# - local: chapter7/5 -# title: Summarization -# - local: chapter7/6 -# title: Training a causal language model from scratch -# - local: chapter7/7 -# title: Question answering -# - local: chapter7/8 -# title: Mastering NLP -# - local: chapter7/9 -# title: End-of-chapter quiz -# quiz: 7 - -# - title: 8. How to ask for help -# sections: -# - local: chapter8/1 -# title: Introduction -# - local: chapter8/2 -# title: What to do when you get an error -# - local: chapter8/3 -# title: Asking for help on the forums -# - local: chapter8/4 -# title: Debugging the training pipeline -# local_fw: { pt: chapter8/4, tf: chapter8/4_tf } -# - local: chapter8/5 -# title: How to write a good issue -# - local: chapter8/6 -# title: Part 2 completed! -# - local: chapter8/7 -# title: End-of-chapter quiz -# quiz: 8 - -# - title: 9. Building and sharing demos -# new: true -# subtitle: I trained a model, but how can I show it off? -# sections: -# - local: chapter9/1 -# title: Introduction to Gradio -# - local: chapter9/2 -# title: Building your first demo -# - local: chapter9/3 -# title: Understanding the Interface class -# - local: chapter9/4 -# title: Sharing demos with others -# - local: chapter9/5 -# title: Integrations with the Hugging Face Hub -# - local: chapter9/6 -# title: Advanced Interface features -# - local: chapter9/7 -# title: Introduction to Blocks -# - local: chapter9/8 -# title: Gradio, check! -# - local: chapter9/9 -# title: End-of-chapter quiz -# quiz: 9 - -# - title: Course Events -# sections: -# - local: events/1 -# title: Live sessions and workshops -# - local: events/2 -# title: Part 2 release event -# - local: events/3 -# title: Gradio Blocks party