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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

unitorch-0.0.1.5-py3-none-any.whl (792.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for unitorch-0.0.1.5.tar.gz
Algorithm Hash digest
SHA256 f0902b83e7c8f0b6eea27c0ffdd557faabf131a53d642d30b676cbeaa8e83cf6
MD5 3632967e828184a0f243809883d06fc5
BLAKE2b-256 9c82846fa3a2d8308704f6d62bae9a63934352b46f96e0a30604d51e75681601

See more details on using hashes here.

File details

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

File metadata

  • Download URL: unitorch-0.0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 792.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for unitorch-0.0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1acab1761f1fae2a0dfdfcbe268be087598a961d163f2f8bf2f32cb3882b387f
MD5 84bc8c3026ddfd8ca01436b935e56709
BLAKE2b-256 cc40d2aae4bd56db5274b401fb25165520cc6888cc5dd93fe636021c2b5b1e48

See more details on using hashes here.

Supported by

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