Views
No views yet
For every analysis: (1) Identify which data features are most influential, (2) Explain the directional impact of each, (3) Provide your strategy recommendation with reasoning, (4) Express confidence and risk factors.
| Parameter | Value |
|---|---|
| Base Model | mistralai/Mistral-7B-Instruct-v0.3 |
| Method | QLoRA (4-bit NF4 + double quantization) |
| LoRA Rank | 64 |
| LoRA Alpha | 128 |
| Target Modules | All linear layers (q/k/v/o/gate/up/down_proj) |
| Learning Rate | 2e-4 (cosine schedule) |
| Epochs | 2 |
| Effective Batch Size | 16 (2 × 8 gradient accumulation) |
| Max Sequence Length | 2048 |
| Optimizer | paged_adamw_8bit |
| Precision | bf16 |
| Dataset | Size | Content |
|---|---|---|
| sujet-ai/Sujet-Finance-Instruct-177k | 177K | Sentiment analysis, NER, financial Q&A, classification |
| gbharti/finance-alpaca | 68K | Financial Q&A (includes options, investing, markets) |
| Josephgflowers/Finance-Instruct-500k | 500K | Broad financial instruction-following |
messages format with financial expert system prompts.1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3import torch
4
5# Load base model + LoRA adapter
6base_model = AutoModelForCausalLM.from_pretrained(
7 "mistralai/Mistral-7B-Instruct-v0.3",
8 torch_dtype=torch.bfloat16,
9 device_map="auto",
10)
11model = PeftModel.from_pretrained(base_model, "Saksham7772/FinOptions-Mistral-7B")
12tokenizer = AutoTokenizer.from_pretrained("Saksham7772/FinOptions-Mistral-7B")
13
14# Ask about options / market prediction
15messages = [
16 {"role": "user", "content": """
17 AAPL is trading at $185. Earnings are in 5 days.
18 IV Rank is at 82%, Put/Call ratio is 1.3, and the stock dropped 2.5% today.
19 RSI is at 35. What options strategy would you recommend and why?
20 Which of these data points matter most for the prediction?
21 """}
22]
23
24inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
25outputs = model.generate(inputs, max_new_tokens=512, temperature=0.7, do_sample=True)
26print(tokenizer.decode(outputs[0], skip_special_tokens=True))train.py1# Install dependencies
2pip install torch transformers trl peft bitsandbytes datasets trackio accelerate
3
4# Set your HF token
5export HF_TOKEN=your_token_here
6
7# Run training (requires GPU with 24GB+ VRAM, e.g. A100/A10G)
8python train.py