Giter VIP home page Giter VIP logo

huggingface-trainer's Introduction

huggingface-trainer

Install Dependencies

poetry install --no-root

Execute Training

CUDA_VISIBLE_DEVICES="0" poetry run python3 ./src/run_clm.py \
  --model_name_or_path=rinna/japanese-gpt2-small \
  --train_file=./dataset/it-life-hack_train.txt \
  --validation_file=./dataset/it-life-hack_val.txt \
  --do_train \
  --do_eval \
  --num_train_epochs=10 \
  --save_steps=500 \
  --block_size 512 \
  --save_total_limit=3 \
  --per_device_train_batch_size=1 \
  --per_device_eval_batch_size=1 \
  --output_dir=models/it-life-hack \
  --overwrite_output_dir \
  --use_fast_tokenizer=False \
  --logging_steps=5

Inference

Prompt


poetry run python3 src/inference.py  \
  --model_name_or_path=rinna/japanese-gpt2-small \
  --output_dir=models/it-life-hack \
  --use_fast_tokenizer=False \
  --prompt="今日、我々は家電量販店に"

The Output


completion 0 :  今日、我々は家電量販店に集った。私はすぐに店に入ったが、店員は驚いた。私もレジでミスをし、私の代わりに行ったが、全然覚えてくれなかった。店員の一番下のおばさんが、少し長い腕振りをしてレジに立っているが、誰も、私に何か質問をされたようには見えなかった。

huggingface-trainer's People

Contributors

kevin-tofu avatar

Watchers

 avatar

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.