takala/financial_phrasebank
Updated • 9.81k • 269
How to use SUFEHeisenberg/Fin-RoBERTa with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="SUFEHeisenberg/Fin-RoBERTa") # Load model directly
from transformers import AutoTokenizer, AutoModelForMaskedLM
tokenizer = AutoTokenizer.from_pretrained("SUFEHeisenberg/Fin-RoBERTa")
model = AutoModelForMaskedLM.from_pretrained("SUFEHeisenberg/Fin-RoBERTa", device_map="auto")We collects financial domain terms from Investopedia's Financia terms dictionary, NYSSCPA's accounting terminology guide and Harvey's Hypertextual Finance Glossary to expand RoBERTa's vocab dict.
Based on added-financial-terms RoBERTa, we pretrained our model on multilple financial corpus:
In continual pretraining step, we apply following experiments settings to achieve better finetuned results on Four Financial Datasets: