takala/financial_phrasebank
Updated • 9.32k • 256
How to use winddude/mamba_financial_headline_sentiment with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="winddude/mamba_financial_headline_sentiment") # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("winddude/mamba_financial_headline_sentiment", dtype="auto")A sentment classifier for finacial headlines using mamba 2.8b as the base model.
Text is classified into 1 of 3 labels; positive, neutral, or negative.
prompt = f"""Classify the setiment of the following news headlines as either `positive`, `neutral`, or `negative`.\n
Headline: {headline}\n
Classification:"""
where headline is the text you want to be classified.
Base model
state-spaces/mamba-2.8b