Dedicated Endpoints

Run this model inference on single tenant GPU with unmatched speed and reliability at scale.

Learn more
Container

Run this model inference with full control and performance in your environment.

Learn more

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.0

What This Model Does

Takes two inputs from upstream agents:

  1. Analyst Report — fundamentals, news, social sentiment, macro context
  2. 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

ParameterValue
Base modelQwen/Qwen3-8B
MethodQLoRA (4-bit NF4)
LoRA rank16
LoRA alpha32
Target modulesq_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
Training examples150 (30 tickers × 5 question variants)
Train/eval split135 / 15
Epochs3
Batch size2 × 4 grad accum = 8 effective
Learning rate2e-4 (cosine schedule)
HardwareNVIDIA RTX 4070 (8GB VRAM)
Training time~9 hours
Trainable params43.6M / 8.2B (0.53%)

Training Results

MetricValue
Initial train loss1.845
Final train loss0.481
Final eval loss0.534

Training Data

150 SFT examples generated by:

  1. Running Analyst (Qwen2.5-7B) + Risk Manager (Qwen2.5-7B) on 30 tickers across sectors (tech, finance, healthcare, energy, consumer, industrial)
  2. Sending report pairs to GPT-4o with varied user questions to generate gold-standard trader recommendations
  3. Formatting as chat-style JSONL (system + user + assistant)

Usage

python

from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
import torch
# Load base model in 4-bit
base_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 adapter
model = 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.

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 details

Supported Functionality

Model APIs

Dedicated Endpoints

Container

More information

Explore FriendliAI today