Model Card for finance-tech-mistral

A LoRA adapter fine-tuned on top of mistralai/Mistral-7B-Instruct-v0.3 for finance and technology domain tasks, trained using TRL.

⚠️ This is a LoRA adapter, not a standalone model. You must load the base Mistral-7B-Instruct-v0.3 model first and apply this adapter on top.

Quick Start

Install dependencies:

pip install transformers peft torch accelerate

Load and run:

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

base_model_id = "mistralai/Mistral-7B-Instruct-v0.3"

tokenizer = AutoTokenizer.from_pretrained(base_model_id)
model = AutoModelForCausalLM.from_pretrained(base_model_id, device_map="auto")

# Apply the LoRA adapter
model = PeftModel.from_pretrained(model, "OmsinghRotele/finance-tech-mistral-7b")

question = "What is a P/E ratio and how is it used in stock analysis?"
generator = pipeline("text-generation", model=model, tokenizer=tokenizer)
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
print(output["generated_text"])

Training Procedure

This model was trained with SFT (Supervised Fine-Tuning) on finance and technology domain data.

Framework Versions

  • PEFT 0.19.1
  • TRL: 1.5.0
  • Transformers: 5.0.0
  • Pytorch: 2.11.0+cu128
  • Datasets: 4.8.5
  • Tokenizers: 0.22.2

Citations

@software{vonwerra2020trl,
  title   = {{TRL: Transformers Reinforcement Learning}},
  author  = {von Werra, Leandro and Belkada, Younes and Tunstall, Lewis and Beeching, Edward and Thrush, Tristan and Lambert, Nathan and Huang, Shengyi and Rasul, Kashif and Gallouédec, Quentin},
  license = {Apache-2.0},
  url     = {https://github.com/huggingface/trl},
  year    = {2020}
}
Downloads last month
8
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for OmsinghRotele/finance-tech-mistral-7b

Adapter
(901)
this model