Skip to main content

GPT4 - Pytorch

Project description

Multi-Modality

GPT4

The open source implementation of the base model behind GPT-4 from OPENAI [Language + Multi-Modal], click here for the Research Paper

Installation

pip install gpt4-torch

Usage

Here's an illustrative code snippet that showcases GPT-3 in action:

import torch
from gpt4 import GPT4

# Generate a random input sequence
x = torch.randint(0, 256, (1, 1024)).cuda()

# Initialize GPT-3 model
model = GPT4()

# Pass the input sequence through the model
output = model(x)

MultiModal Iteration

  • Pass in text and and image tensors into GPT4
import torch
from gpt4.gpt4 import GPT4MultiModal

#usage
img = torch.randn(1, 3, 256, 256)
text = torch.randint(0, 20000, (1, 1024))


model = GPT4MultiModal()
output = model(text, img)

📚 Training

from gpt4 import train

train()

For further instructions, refer to the Training SOP.

  1. Set the environment variables:

    • ENTITY_NAME: Your wandb project name
    • OUTPUT_DIR: Directory to save the weights (e.g., ./weights)
    • MASTER_ADDR: For distributed training
    • MASTER_PORT For master port distributed training
    • RANK- Number of nodes services
    • WORLD_SIZE Number of gpus
  2. Configure the training:

    • Accelerate Config
    • Enable Deepspeed 3
    • Accelerate launch train_distributed_accelerate.py

For more information, refer to the Training SOP.

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

gpt4_torch-0.0.3.tar.gz (28.8 kB view details)

Uploaded Source

Built Distribution

gpt4_torch-0.0.3-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file gpt4_torch-0.0.3.tar.gz.

File metadata

  • Download URL: gpt4_torch-0.0.3.tar.gz
  • Upload date:
  • Size: 28.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0

File hashes

Hashes for gpt4_torch-0.0.3.tar.gz
Algorithm Hash digest
SHA256 04801544de0ad4c9a2a1b8b91d07b9f363774077921a2df48dfaad9fecc8ea5a
MD5 3466f84d98ffe8327c03339e3f2aae69
BLAKE2b-256 ac00bd320b816761bdd79d7170151b4e04a1224e893550c632761c0b3c743bad

See more details on using hashes here.

File details

Details for the file gpt4_torch-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: gpt4_torch-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 28.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0

File hashes

Hashes for gpt4_torch-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ce7dec810c55b4022634ca276e7f5a82939b845e57287e508b23bdb6fb533d39
MD5 c215fe941a9acdd2486d4f8523fd0315
BLAKE2b-256 6eb3b670acb4b361f07ff2756939d3676db22d2d42ce2883a45ce0cd3dbd2586

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