tunib-ai / parallelformers

Parallelformers: An Efficient Model Parallelization Toolkit for Deployment
https://tunib-ai.github.io/parallelformers
Apache License 2.0
779 stars 61 forks source link

freeze_support() #22

Closed psinha30 closed 2 years ago

psinha30 commented 2 years ago

How to reproduce

from transformers import AutoModelForCausalLM, AutoTokenizer
from parallelformers import parallelize
import torch
model = AutoModelForCausalLM.from_pretrained("./2.7B")
tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neo-2.7B")

print("Model Loaded")

parallelize(model, num_gpus=2, fp16=True, verbose='detail')

Environment

psinha30 commented 2 years ago

Error image

vinnitu commented 1 year ago

how to fix?