Downloads · 30 days
89
4% of all-time downloads
VMware/flan-ul2-alpaca-lora
flan-ul2-alpaca-lora is a text generation model from VMware. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as other.
- Model name: Flan-UL2-Alpaca-LoRA - Model type: - Text2Text Generation - Parent Model: google/flan-ul2 - Training dataset: Alpaca - Language: English - Framework: PyTorch - Model version: 1.0
Downloads · 30 days
89
4% of all-time downloads
All-time downloads
2.4K
Public
Parameters
19.7B
158 GB on disk
Likes
17
Public
Click a slice to open those files.
.bin78.9 GB · 50%
From the Hugging Face model README
We take the instruction-tuned Flan models (trained on Academic datasets) and perform style transfer using the Alpaca dataset.
We released the code for LORA fine-tuning Seq2Seq models along with code walkthrough medium article here:
We fine-tuned the google/flan-ul2 model on the Alpaca dataset using PEFT-LORA.
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-ul2-alpaca-lora",
device_map = 'auto',
torch_dtype=dtype
)
prompt = "YOUR PROMPT HERE"
output = model(prompt, max_length=2048, 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.float16, torch.bfloat16, torch.float32
model = pipeline(model="VMware/flan-ul2-alpaca-lora",device_map = 'auto',torch_dtype=dtype )
prompt_template = """
Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
{instruction}
### Response:"""
prompt = "YOUR INSTRUCTION HERE"
output = model(prompt_template.format(instruction=prompt), max_length=2048)
The model was trained on 3xV100 GPUs using PEFT-LORA and Deepspeed
The model is based on a large and diverse dataset, but it may still have limitations and biases in certain areas. Some limitations include:
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.