Model Card for Model ID

Model Details

Model Description

Finance LLaMA-2-7B Chat LoRA (QLoRA, 4-bit quantized) โ€“ a LoRA fine-tuned version of meta-llama/Llama-2-7b-chat-hf, trained on a finance-specific dataset. This model also integrates the Yahoo Finance API to fetch live stock market data for real-time responses.

  • Developed by: Aayush Pandey
  • Model type: Causal Language Model (LLM)
  • Language(s) (NLP): English
  • License: MIT
  • Finetuned from model: meta-llama/Llama-2-7b-chat-hf
  • Libraries used: PEFT, Transformers, BitsAndBytes, Gradio

Uses

Direct Use

  • Answer finance-related questions
  • Provide real-time stock data insights using Yahoo Finance
  • Serve as an AI assistant for stock market queries

Downstream Use

  • Can be integrated into web apps, dashboards, or chatbots
  • Can be fine-tuned further for domain-specific financial analysis

Out-of-Scope Use

  • Non-finance related tasks may produce nonsensical outputs
  • Real-time trading advice should not be treated as financial advice

Bias, Risks, and Limitations

  • Model may reflect biases present in training data
  • Model outputs may be inaccurate or outdated for financial decisions
  • Not suitable for critical or high-stakes trading decisions

Recommendations

Users should verify any financial information generated and be aware that the model is not a substitute for professional advice.

How to Get Started with the Model

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch

adapter_repo = "aaysush16/finance-llama-2-7b-lora"
base_model = "meta-llama/Llama-2-7b-chat-hf"

tokenizer = AutoTokenizer.from_pretrained(adapter_repo)
model = AutoModelForCausalLM.from_pretrained(base_model, device_map="auto")
model = PeftModel.from_pretrained(model, adapter_repo)
model.eval()

prompt = "Tell me about AAPL stock"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for aaysush16/finance-llama-2-7b-lora

Adapter
(1202)
this model

Spaces using aaysush16/finance-llama-2-7b-lora 2