Run this model inference on single tenant GPU with unmatched speed and reliability at scale.
Run this model inference with full control and performance in your environment.
Get help setting up a custom Dedicated Endpoints.
Talk with our engineer to get a quote for reserved GPU instances with discounts.
README
License: apache-2.0What This Model Does
Takes two inputs from upstream agents:
- Analyst Report — fundamentals, news, social sentiment, macro context
- Risk Manager Report — technical indicators, support/resistance, risk assessment
Outputs a structured Trading Recommendation: Buy / Hold / Sell with entry zone, stop loss, target price, reasoning, and key risks.
Training Details
| Parameter | Value |
|---|---|
| Base model | Qwen/Qwen3-8B |
| Method | QLoRA (4-bit NF4) |
| LoRA rank | 16 |
| LoRA alpha | 32 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Training examples | 150 (30 tickers × 5 question variants) |
| Train/eval split | 135 / 15 |
| Epochs | 3 |
| Batch size | 2 × 4 grad accum = 8 effective |
| Learning rate | 2e-4 (cosine schedule) |
| Hardware | NVIDIA RTX 4070 (8GB VRAM) |
| Training time | ~9 hours |
| Trainable params | 43.6M / 8.2B (0.53%) |
Training Results
| Metric | Value |
|---|---|
| Initial train loss | 1.845 |
| Final train loss | 0.481 |
| Final eval loss | 0.534 |
Training Data
150 SFT examples generated by:
- Running Analyst (Qwen2.5-7B) + Risk Manager (Qwen2.5-7B) on 30 tickers across sectors (tech, finance, healthcare, energy, consumer, industrial)
- Sending report pairs to GPT-4o with varied user questions to generate gold-standard trader recommendations
- Formatting as chat-style JSONL (system + user + assistant)
Usage
python
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfigfrom peft import PeftModelimport torch# Load base model in 4-bitbase_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-8B",quantization_config=BitsAndBytesConfig(load_in_4bit=True,bnb_4bit_compute_dtype=torch.bfloat16,bnb_4bit_quant_type="nf4",),device_map="cuda:0",)# Load LoRA adaptermodel = PeftModel.from_pretrained(base_model, "abababab2003/trader-sft-lora")model = model.merge_and_unload()tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-8B")
Project
ActiveTrader — a multi-agent trading system built with LangGraph for CS 496 (Agent AI) at Northwestern University. Three agents collaborate: an Analyst, a Risk Manager, and this SFT-trained Trader.
- GitHub: Vio1etV/Trading-Agent
Framework Versions
- PEFT: 0.17.1
- Transformers: 4.57.6
- PyTorch: 2.6.0+cu124
- bitsandbytes: 0.48.2
Model provider
abababab2003
Model tree
Base
Qwen/Qwen3-8B
Adapter
this model
Modalities
Input
Text
Output
Text
Pricing
Dedicated Endpoints
View detailsSupported Functionality
Model APIs
Dedicated Endpoints
Container
More information