chrisjihee/DeepKNLP-25.08

AI Academy: A4021 (2025.08.26)

0

stars

34

commits

Python

primary language

Aug 27, 2025

updated

README

DeepKNLP

Transformer-based Korean Natural Language Processing

Code Reference

Data Reference

Model Reference

Installation

  1. Install Miniforge
    wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
    bash Miniforge3-$(uname)-$(uname -m).sh
    
  2. Clone the repository
    rm -rf DeepKNLP*; git clone https://github.com/chrisjihee/DeepKNLP-25.08.git; cd DeepKNLP*;
    
  3. Monitor Nvidia GPU
    watch -d -n 3 nvidia-smi
    
  4. Create a new environment
    conda search conda -c conda-forge | grep " 25."
    conda install -n base -c conda-forge conda=25.7.0 -y
    conda create -n DeepKNLP-25 python=3.12 -y
    conda install -n DeepKNLP-25 -c nvidia cuda=12.8 -y
    
  5. Install the required packages
    conda activate DeepKNLP-25  # MUST be activated
    pip list; echo ==========; conda --version; echo ==========; conda list
    pip install -e . --extra-index-url https://download.pytorch.org/whl/cu128
    rm -rf transformers; git clone https://github.com/chrisjihee/transformers.git; pip install -U -e transformers
    rm -rf ratsnlp;      git clone https://github.com/chrisjihee/ratsnlp.git;      pip install -U -e ratsnlp
    pip list | grep -E "torch|lightn|trans|accel|speed|flash|numpy|piece|chris|rats|prog|pydantic"
    
  6. Login to Hugging Face and link the cache
    hf auth whoami
    hf auth login
    rm -f .cache_hf; ln -s ~/.cache/huggingface ./.cache_hf
    
  7. Logout from Hugging Face
    hf auth logout
    rm -f ~/.huggingface/token
    rm -f ~/.cache/huggingface/token
    

Target Tasks

  • Sentence Classification: https://ratsgo.github.io/nlpbook/docs/doc_cls
    • python task1-cls/run_cls.py --help
    • python task1-cls/run_cls.py train
    • python task1-cls/run_cls.py test
    • python task1-cls/run_cls.py serve
  • Sequence Labelling: https://ratsgo.github.io/nlpbook/docs/ner
    • python task2-ner/run_ner.py --help
    • python task2-ner/run_ner.py train
    • python task2-ner/run_ner.py test
    • python task2-ner/run_ner.py serve
  • Sentence Generation: https://ratsgo.github.io/nlpbook/docs/generation
    • CUDA_VISIBLE_DEVICES=7 python task3-gen/infer_gen-1.py
    • CUDA_VISIBLE_DEVICES=6 python task3-gen/infer_gen-2.py
    • CUDA_VISIBLE_DEVICES=5 python task3-gen/infer_gen-3.py
    • CUDA_VISIBLE_DEVICES=7 python task3-gen/train_gen-1.py
    • CUDA_VISIBLE_DEVICES=6 python task3-gen/train_gen-2.py
    • CUDA_VISIBLE_DEVICES=5 python task3-gen/train_gen-3.py
    • CUDA_VISIBLE_DEVICES=7 python task3-gen/serve_gen-1.py
    • CUDA_VISIBLE_DEVICES=6 python task3-gen/serve_gen-2.py
    • CUDA_VISIBLE_DEVICES=5 python task3-gen/serve_gen-3.py
  • Question Answering: https://ratsgo.github.io/nlpbook/docs/qa
    • bash task4A-qa-ext/train_qa-1.sh
    • bash task4A-qa-ext/train_qa-2.sh
    • bash task4A-qa-ext/train_qa-3.sh
    • bash task4A-qa-ext/eval_qa-1.sh
    • bash task4A-qa-ext/eval_qa-2.sh
    • bash task4A-qa-ext/eval_qa-3.sh
    • python task4A-qa-ext/infer_qa.py
    • python task4A-qa-ext/serve_qa.py
  • Question Answering (seq2seq):
    • bash task4-qa/train_qa_seq2seq-1.sh
    • bash task4-qa/train_qa_seq2seq-2.sh
    • bash task4-qa/eval_qa_seq2seq-1.sh
    • bash task4-qa/eval_qa_seq2seq-2.sh
    • python task4-qa/infer_qa_seq2seq.py
    • python task4-qa/serve_qa_seq2seq.py

Contributors

chrisjihee

34 commits

chrisjihee/DeepKNLP-25.08

AI Academy: A4021 (2025.08.26)

0

stars

34

commits

Python

primary language

Aug 27, 2025

updated

README

DeepKNLP

Transformer-based Korean Natural Language Processing

Code Reference

Data Reference

Model Reference

Installation

  1. Install Miniforge
    wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
    bash Miniforge3-$(uname)-$(uname -m).sh
    
  2. Clone the repository
    rm -rf DeepKNLP*; git clone https://github.com/chrisjihee/DeepKNLP-25.08.git; cd DeepKNLP*;
    
  3. Monitor Nvidia GPU
    watch -d -n 3 nvidia-smi
    
  4. Create a new environment
    conda search conda -c conda-forge | grep " 25."
    conda install -n base -c conda-forge conda=25.7.0 -y
    conda create -n DeepKNLP-25 python=3.12 -y
    conda install -n DeepKNLP-25 -c nvidia cuda=12.8 -y
    
  5. Install the required packages
    conda activate DeepKNLP-25  # MUST be activated
    pip list; echo ==========; conda --version; echo ==========; conda list
    pip install -e . --extra-index-url https://download.pytorch.org/whl/cu128
    rm -rf transformers; git clone https://github.com/chrisjihee/transformers.git; pip install -U -e transformers
    rm -rf ratsnlp;      git clone https://github.com/chrisjihee/ratsnlp.git;      pip install -U -e ratsnlp
    pip list | grep -E "torch|lightn|trans|accel|speed|flash|numpy|piece|chris|rats|prog|pydantic"
    
  6. Login to Hugging Face and link the cache
    hf auth whoami
    hf auth login
    rm -f .cache_hf; ln -s ~/.cache/huggingface ./.cache_hf
    
  7. Logout from Hugging Face
    hf auth logout
    rm -f ~/.huggingface/token
    rm -f ~/.cache/huggingface/token
    

Target Tasks

  • Sentence Classification: https://ratsgo.github.io/nlpbook/docs/doc_cls
    • python task1-cls/run_cls.py --help
    • python task1-cls/run_cls.py train
    • python task1-cls/run_cls.py test
    • python task1-cls/run_cls.py serve
  • Sequence Labelling: https://ratsgo.github.io/nlpbook/docs/ner
    • python task2-ner/run_ner.py --help
    • python task2-ner/run_ner.py train
    • python task2-ner/run_ner.py test
    • python task2-ner/run_ner.py serve
  • Sentence Generation: https://ratsgo.github.io/nlpbook/docs/generation
    • CUDA_VISIBLE_DEVICES=7 python task3-gen/infer_gen-1.py
    • CUDA_VISIBLE_DEVICES=6 python task3-gen/infer_gen-2.py
    • CUDA_VISIBLE_DEVICES=5 python task3-gen/infer_gen-3.py
    • CUDA_VISIBLE_DEVICES=7 python task3-gen/train_gen-1.py
    • CUDA_VISIBLE_DEVICES=6 python task3-gen/train_gen-2.py
    • CUDA_VISIBLE_DEVICES=5 python task3-gen/train_gen-3.py
    • CUDA_VISIBLE_DEVICES=7 python task3-gen/serve_gen-1.py
    • CUDA_VISIBLE_DEVICES=6 python task3-gen/serve_gen-2.py
    • CUDA_VISIBLE_DEVICES=5 python task3-gen/serve_gen-3.py
  • Question Answering: https://ratsgo.github.io/nlpbook/docs/qa
    • bash task4A-qa-ext/train_qa-1.sh
    • bash task4A-qa-ext/train_qa-2.sh
    • bash task4A-qa-ext/train_qa-3.sh
    • bash task4A-qa-ext/eval_qa-1.sh
    • bash task4A-qa-ext/eval_qa-2.sh
    • bash task4A-qa-ext/eval_qa-3.sh
    • python task4A-qa-ext/infer_qa.py
    • python task4A-qa-ext/serve_qa.py
  • Question Answering (seq2seq):
    • bash task4-qa/train_qa_seq2seq-1.sh
    • bash task4-qa/train_qa_seq2seq-2.sh
    • bash task4-qa/eval_qa_seq2seq-1.sh
    • bash task4-qa/eval_qa_seq2seq-2.sh
    • python task4-qa/infer_qa_seq2seq.py
    • python task4-qa/serve_qa_seq2seq.py

Contributors

chrisjihee

34 commits

Languages

Python

94.3%

HTML

2.5%

Jupyter Notebook

2.1%

Shell

1.2%