Instructions to use OmsinghRotele/finance-tech-mistral-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use OmsinghRotele/finance-tech-mistral-7b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.3") model = PeftModel.from_pretrained(base_model, "OmsinghRotele/finance-tech-mistral-7b") - Transformers
How to use OmsinghRotele/finance-tech-mistral-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OmsinghRotele/finance-tech-mistral-7b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("OmsinghRotele/finance-tech-mistral-7b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OmsinghRotele/finance-tech-mistral-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OmsinghRotele/finance-tech-mistral-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OmsinghRotele/finance-tech-mistral-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/OmsinghRotele/finance-tech-mistral-7b
- SGLang
How to use OmsinghRotele/finance-tech-mistral-7b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "OmsinghRotele/finance-tech-mistral-7b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OmsinghRotele/finance-tech-mistral-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "OmsinghRotele/finance-tech-mistral-7b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OmsinghRotele/finance-tech-mistral-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use OmsinghRotele/finance-tech-mistral-7b with Docker Model Runner:
docker model run hf.co/OmsinghRotele/finance-tech-mistral-7b
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
Model tree for OmsinghRotele/finance-tech-mistral-7b
Base model
mistralai/Mistral-7B-v0.3 Finetuned
mistralai/Mistral-7B-Instruct-v0.3