Skip to content
 
 

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

🔥 unitorch provides efficient implementation of popular unified NLU / NLG / CV / CTR / MM / RL models with PyTorch. It automatically optimizes training / inference speed based on pupular DeepLearning toolkits (transformers, fairseq, detectron2, fastseq, datasets, etc) without accuracy loss. All these can be easily done (no need to change any code/model/data if using our command line tool, or simply add one-line code import unitorch if using source code).


What's New Model


Features

  • GPU-Based Block N-Gram Repeats
  • Asynchronous Pipeline For Postprocess
  • DeepSpeed Supports

Installation

pip3 install unitorch

Quick Examples

Source Code

import unitorch

# import unilm model
from unitorch.models.unilm import UnilmForGeneration
unilm_model = UnilmForGeneration("path/to/unilm/config.json")

# use the configuration class
from unitorch.cli import CoreConfigureParser
config = CoreConfigureParser("path/to/config.ini")

Multi-GPU Training

python3 -m torch.distributed.launch --use_env --no_python --nproc_per_node 4 \
	unitorch-train examples/configs/generation/mass.ini \
	--train_file path/to/train.tsv --dev_file path/to/dev.tsv

Single-GPU Inference

unitorch-infer examples/configs/generation/mass.ini --test_file path/to/test.tsv

Find more details in the Tutorials section of the documentation.

License

Code released under MIT license.

About

🔥 SOTA DeepLearning NLP / CV / MM / CTR / RL Models Powered By PyTorch.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages