Edit model card

Model Details

  • Model name: Flan-UL2-Alpaca-LORA
  • Model type: - Text2Text Generation
  • Parent Model: google/flan-t5-xl
  • Training dataset: Alpaca
  • Language: English
  • Framework: PyTorch
  • Model version: 1.0

We take the instruction-tuned Flan models (trained on Academic datasets) and perform style transfer using the Alpaca dataset.

License

How to Use

import torch
from transformers import pipeline

# Chose the model inference precision
dtype = torch.float16 # options are torch.float16, torch.bfloat16, torch.float32

model = pipeline(model="VMware/flan-t5-xl-alpaca",device_map = 'auto',torch_dtype=dtype )

prompt = "YOUR PROMPT HERE"

output = model(prompt, max_length=512, do_sample=True)

Using Alpaca prompt template might generate better outputs for certain prompts as the model was trained using the bellow template.

# Chose the model inference precision
import torch
from transformers import pipeline

dtype = torch.float16 # options are torch.bfloat16, torch.float32
model = pipeline(model="VMware/flan-t5-xl-alpaca",device_map = 'auto',torch_dtype=dtype )

prompt_template = "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Response:"

prompt = "YOUR PROMPT HERE"

output = model(prompt_template.format(instruction= prompt), max_length=512, do_sample=True)


Training Details

The model was trained on 3xV100 GPUs using Accelerate and Deepspeed

  • Hyperparameters:
  • learning_rate = 3e-4
  • batch_size = 128
  • epochs = 3



# Limitations and Bias

The model is based on a large and diverse dataset, but it may still have limitations and biases in certain areas. Some limitations include:

- Language: The model is designed to work with English text only and may not perform as well in other languages.


In addition, the model may have some bias in terms of the data it was trained on. The dataset includes questions from a variety of sources, but it may not be representative of all populations or perspectives. As a result, the model may perform better or worse for certain types of questions or on certain types of texts.
Downloads last month
3

Dataset used to train VMware/flan-t5-xl-alpaca