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.19.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

unitorch-0.0.0.19-py3-none-any.whl (736.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: unitorch-0.0.0.19.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.18

File hashes

Hashes for unitorch-0.0.0.19.tar.gz
Algorithm Hash digest
SHA256 2e5f9d255880605204bdb23b5979e2c209255a228c44fba53232eadc70d3cf6b
MD5 e3c4bd5a351cd746adff16e0dc128040
BLAKE2b-256 07d39545c997782c4672c65ff362cd0014b35bd16b941756f64e1a88f5383c32

See more details on using hashes here.

File details

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

File metadata

  • Download URL: unitorch-0.0.0.19-py3-none-any.whl
  • Upload date:
  • Size: 736.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.18

File hashes

Hashes for unitorch-0.0.0.19-py3-none-any.whl
Algorithm Hash digest
SHA256 ff193731e81a3786ea19b779d7b2ca1d3e2b705c5a63a093b4c1d4678c57bb9b
MD5 b911ce698874f4acb38edf0e1bde9727
BLAKE2b-256 7ac6e8b8507fc8db3ab319371d3e505d769338ee1d4584e33ba6f5118a7e3797

See more details on using hashes here.

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