Downloads · 30 days
0
llk010502/llama3.1-8B-financial_sentiment
llama3.1-8B-financial_sentiment is a text generation model from llk010502. Use it when you need the model to write or continue text. It is set up for transformers.
This model is a fine-tuned version of Meta's Llama-3.1-8B, tailored for financial sentiment analysis tasks. It leverages LoRA and 8-bit quantization techniques to achieve efficient performance while reducing computati…
Downloads · 30 days
0
Access
Public
Updated Dec 11, 2024
Repo size
83.9 MB
Likes
1
Public
Click a slice to open those files.
.safetensors83.9 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of Meta's Llama-3.1-8B, tailored for financial sentiment analysis tasks. It leverages LoRA and 8-bit quantization techniques to achieve efficient performance while reducing computational overhead.
The model can be directly used for financial sentiment analysis tasks, including:
Use the following code to load the model:
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Base and fine-tuned model
base_model = "meta-llama/Llama-3.1-8B"
peft_model = "llk010502/llama3.1-8B-financial_sentiment"
# Load the base model
model = AutoModelForCausalLM.from_pretrained(
base_model,
trust_remote_code=True,
device_map="auto"
)
# Load the tokenizer
tokenizer = AutoTokenizer.from_pretrained(base_model, trust_remote_code=True)
# Load the fine-tuned model
model = PeftModel.from_pretrained(model, peft_model)
model = model.eval()