Data 49

Hugging Face, Training a causal language model from scratch

Training a causal language model from scratch - Hugging Face Course Up until now, we’ve mostly been using pretrained models and fine-tuning them for new use cases by reusing the weights from pretraining. As we saw in Chapter 1, this is commonly referred to as transfer learning, and it’s a very successful strategy for a huggingface.co Causal language model을 처음부터 학습시켜보는 강의 내용. 여기서 Text generation ..

Data/Information 2022.04.01

Hugging Face, Summarization

Main NLP tasks - Hugging Face Course In this section we’ll take a look at how Transformer models can be used to condense long documents into summaries, a task known as text summarization. This is one of the most challenging NLP tasks as it requires a range of abilities, such as understandin huggingface.co 문서를 요약하는 text summarization에 대해 알아보자. 필요한 데이터를 load하고 랜덤 샘플을 뽑아 출력해보았다. English와 Spanish의 b..

Data/Information 2022.03.25

Evaluating Student Writing_2nd Place Solution

2nd Place Solution - [CV741 Public727 Private740] Explore and run machine learning code with Kaggle Notebooks | Using data from multiple data sources www.kaggle.com 최근에 참여했던 캐글 공모전의 2nd place를 차지한 코드를 리뷰하고자 한다. 공모전 참여 기간 동안 노트북 작성자의 코드를 보며 많이 배웠기 때문에 최종 코드 또한 살펴보고 싶었다. 코드를 직접 돌려볼 수 있는 환경이 되지 않아서 코드를 읽고 분석하는 작업만 수행하고자 한다. Inference Script with Post Process The following Python script accepts a fi..

Data/코드 리뷰 2022.03.24

Hugging Face, Translation

Main NLP tasks - Hugging Face Course Let’s now dive into translation. This is another sequence-to-sequence task, which means it’s a problem that can be formulated as going from one sequence to another. In that sense the problem is pretty close to summarization, and you could adapt what we huggingface.co sequence-to-sequence task인 translation에 대해 학습해보자. task에 맞는 dataset을 불러오고 그 안의 샘플을 뽑아보았다. pipe..

Data/Information 2022.03.17

Hugging Face, Token classification

Main NLP tasks - Hugging Face Course The first application we’ll explore is token classification. This generic task encompasses any problem that can be formulated as “attributing a label to each token in a sentence,” such as: Of course, there are many other types of token classification huggingface.co 이전에 Tokenizer에 대해 학습하였는데 이제는 그것을 활용해서 토큰을 분류해주는 Token classification에 대해 학습해보고자 한다. 여기서 소개하는 것은..

Data/Information 2022.03.16

Data Augmentation (CSV&TXT) using Back Translation

Data Augmentation (CSV&TXT) using Back Translation Explore and run machine learning code with Kaggle Notebooks | Using data from multiple data sources www.kaggle.com 캐글 공모전에 참가하면서 분석한 상위 링크의 코드를 리뷰하고자 한다. NLP 문제에 대해 Data Augmentation을 적용해 Train 볼륨을 늘리는 코드이다. Data Augmentation을 위해 NLPaug 라는 라이브러리를 설치하고 관련 패키지를 불러온다. nlpaug — nlpaug 1.1.10 documentation © Copyright 2019, Edward Ma Revision bb2fc63..

Data/코드 리뷰 2022.03.15

TensorFlow LongFormer NER Baseline

TensorFlow - LongFormer - NER - [CV 0.633] Explore and run machine learning code with Kaggle Notebooks | Using data from multiple data sources www.kaggle.com 캐글 공모전에 참가하면서 분석한 상위 링크의 코드를 리뷰하고자 한다. NLP 문제에 대해 Longformer 모델을 TensorFlow 구문으로 학습한 코드이다. Furthermore this notebook is one fold. It trains with 90% data and validates on 10% data. We can convert this notebook to K-fold or train with 100% d..

Data/코드 리뷰 2022.03.15

two longformer is better than one

two longformers are better than 1 Explore and run machine learning code with Kaggle Notebooks | Using data from multiple data sources www.kaggle.com 캐글 공모전에 참가하면서 분석한 상위 링크의 코드를 리뷰하고자 한다. NLP 문제에 대해 2개의 롱포머 모델을 사용한 코드이다. 패키지 불러오기 + 캐시 비워주기 NER 토큰 맵 만들어주기 + 경로 설정(배치와 최대 길이) input_ids(시작과 끝 부분에 특수 토큰 만들어주기) 와 attention mask 만들어주기 배치를 하나씩 가져와서 패딩을 달리 해주는 dynamic padding tez.Model을 arg로 받는 함수. AutoC..

Data/코드 리뷰 2022.03.15