Giter Site home page Giter Site logo

encodermodel_task's Introduction

EncoderModel_Task

Masked Language Model 학습하기

AutoModelForMaskedLM를 사용하여 모델 학습
main.py 실행

폴더 경로

├── config
│   └── train_config.yaml
├── data # 추가 필요
│   └── train.txt # 추가 필요
│   └── val.txt # 추가 필요
├── dataset.py
├── infer.py
├── main.py
├── model.py
└── train.py

실험 결과

실험 결과

원래 문장:다음은 상품에 대한 리뷰입니다. "이거 완전 좋은데?" 해당 리뷰의 감정은 [MASK]입니다.
'>>> 다음은 상품에 대한 리뷰입니다. "이거 완전 좋은데?" 해당 리뷰의 감정은 감동입니다.'
'>>> 다음은 상품에 대한 리뷰입니다. "이거 완전 좋은데?" 해당 리뷰의 감정은 공감입니다.'
'>>> 다음은 상품에 대한 리뷰입니다. "이거 완전 좋은데?" 해당 리뷰의 감정은 동감입니다.'
'>>> 다음은 상품에 대한 리뷰입니다. "이거 완전 좋은데?" 해당 리뷰의 감정은 순수입니다.'
'>>> 다음은 상품에 대한 리뷰입니다. "이거 완전 좋은데?" 해당 리뷰의 감정은 그대로입니다.'

다른 방법

!mkdir ./test-mlm
!wget -O run_mlm.py https://raw.githubusercontent.com/huggingface/transformers/72aee83ced5f31302c5e331d896412737287f976/examples/pytorch/language-modeling/run_mlm.py

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.