Downloads · 30 days
8
12% of all-time downloads
OmsinghRotele/finance-tech-mistral-7b
finance-tech-mistral-7b is a text generation model from OmsinghRotele. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
A LoRA adapter fine-tuned on top of mistralai/Mistral-7B-Instruct-v0.3 for finance and technology domain tasks, trained using TRL.
Downloads · 30 days
8
12% of all-time downloads
All-time downloads
66
Public
Repo size
137 MB
Likes
0
Public
Click a slice to open those files.
.pt109 MB · 64%
From the Hugging Face model README
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.
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"])
This model was trained with SFT (Supervised Fine-Tuning) on finance and technology domain data.
@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}
}