Downloads · 30 days
0
ybelkada/flan-t5-large-financial-phrasebank-lora
flan-t5-large-financial-phrasebank-lora is a machine learning model from ybelkada. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Downloads · 30 days
0
Access
Public
Updated Feb 14, 2023
Repo size
6.6 GB
Likes
4
Public
Click a slice to open those files.
.bin19 MB · 100%
From the Hugging Face model README

This repository contains the LoRA (Low Rank Adapters) of flan-t5-large that has been fine-tuned on financial_phrasebank dataset.
Use this adapter with peft library
# pip install peft transformers
import torch
from peft import PeftModel, PeftConfig
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
peft_model_id = "ybelkada/flan-t5-large-financial-phrasebank-lora"
config = PeftConfig.from_pretrained(peft_model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(
config.base_model_name_or_path,
torch_dtype='auto',
device_map='auto'
)
tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
# Load the Lora model
model = PeftModel.from_pretrained(model, peft_model_id)
Enjoy!