Skip to main content

unitorch provides efficient implementation of popular unified NLU / NLG / CV / CTR / MM / RL models with PyTorch.

Project description

Introduction

🔥 unitorch is a library that simplifies and accelerates the development of unified models for natural language understanding, natural language generation, computer vision, click-through rate prediction, multimodal learning and reinforcement learning. It is built on top of PyTorch and integrates seamlessly with popular frameworks such as transformers, peft, diffusers, and fastseq. With unitorch, you can use a single command line tool or a one-line code import unitorch import to leverage the state-of-the-art models and datasets without sacrificing performance or accuracy.


What's New Model


Features

  • User-Friendly Python Package
  • Faster & Streamlined Train/Inference
  • Deepspeed Integration for Large-Scale Models
  • CUDA Optimization
  • Extensive STOA Model & Task Supports

Installation

pip3 install unitorch

Quick Examples

Source Code

import unitorch

# import bart model
from unitorch.models.bart import BartForGeneration
model = BartForGeneration("path/to/bart/config.json")

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

Multi-GPU Training

torchrun --no_python --nproc_per_node 4 \
	unitorch-train examples/configs/generation/bart.ini \
	--train_file path/to/train.tsv --dev_file path/to/dev.tsv

Single-GPU Inference

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

Find more details in the Tutorials section of the documentation.

License

Code released under MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unitorch-0.0.0.7.tar.gz (301.6 kB view details)

Uploaded Source

Built Distribution

unitorch-0.0.0.7-py3-none-any.whl (322.5 kB view details)

Uploaded Python 3

File details

Details for the file unitorch-0.0.0.7.tar.gz.

File metadata

  • Download URL: unitorch-0.0.0.7.tar.gz
  • Upload date:
  • Size: 301.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.17

File hashes

Hashes for unitorch-0.0.0.7.tar.gz
Algorithm Hash digest
SHA256 855d75362a81c835eafacfd9b8afb1d6f630585bbed6b7fd75e3f1a50fb4b8dc
MD5 e7f85a930a381c4f1a35bc75ee68c776
BLAKE2b-256 cb136961c76da599af4dd3bcbf7a6653d11693ce09c54e01619bffa19d787721

See more details on using hashes here.

Provenance

File details

Details for the file unitorch-0.0.0.7-py3-none-any.whl.

File metadata

  • Download URL: unitorch-0.0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 322.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.17

File hashes

Hashes for unitorch-0.0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a40f166f7c2377a625217a134b993be592433b3e983f1a1ba9d572c564ff982d
MD5 c8c44958fd429fde34f61d58768e8622
BLAKE2b-256 45400d0d733b71ee89ccee2e289cd17df96335b98d552121fc3568402fe4294e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page