GraySoft
Projects Models Compare Cloud benchmarks FAQ Download guIDE →
Model Intelligence Sheet

ewinregirgojr/minicpm5-stock-analyst-gguf overview

license: apache 2.0 base model: openbmb/MiniCPM5 1B pipeline tag: text generation library name: peft tags: finance stock prediction stock market stock market p…

peftsafetensorsgguffinancestock-predictionstock-marketstock-market-predictiontradingalgorithmic-tradingquantitative-financellm-stock-tradingllm-financeopen-source-llmsmall-llmbenchmarkbacktestingbuy-sell-signallorallama.cppquantizedunslothforward-returnscausal-featureseval-methodology

Runs locally from ~1.07 GB disk (4 GB VRAM class GPUs with llama.cpp / guIDE).

Downloads
27
Likes
0
Pipeline
text-generation

Repository Files & Downloads

2 GGUF files detected
Direct downloads for local inference
FileTypeQuantizationSizeLink
MiniCPM5-1B-stock-v2.F16.ggufGGUFGGUF2.02 GBDownload
MiniCPM5-1B-stock-v2.Q8_0.ggufGGUFGGUF1.07 GBDownload

Model Details

Model IDewinregirgojr/minicpm5-stock-analyst-gguf
Authorewinregirgojr
Pipelinetext-generation
Licenseapache-2.0
Base modelopenbmb/MiniCPM5-1B
Last modified2026-07-05T18:52:16.000Z

Model README

---

license: apache-2.0

base_model: openbmb/MiniCPM5-1B

pipeline_tag: text-generation

library_name: peft

tags:

- finance

- stock-prediction

- stock-market

- stock-market-prediction

- trading

- algorithmic-trading

- quantitative-finance

- llm-stock-trading

- llm-finance

- open-source-llm

- small-llm

- benchmark

- backtesting

- buy-sell-signal

- lora

- peft

- gguf

- llama.cpp

- quantized

- unsloth

- forward-returns

- causal-features

- eval-methodology

- text-generation-inference

language:

- en

datasets:

- ewinregirgojr/minicpm5-stock-v2-forward-return

model-index:

- name: MiniCPM5-1B Stock Analyst v2 (Forward-Return)

results:

- task:

type: text-generation

name: Stock Direction Prediction (BUY/SELL, 5-day horizon)

dataset:

name: minicpm5-stock-v2-forward-return (held-out tickers)

type: ewinregirgojr/minicpm5-stock-v2-forward-return

metrics:

- name: Held-out Accuracy (unseen tickers, n=800)

type: accuracy

value: 53.0

- name: BUY Recall

type: recall

value: 56.1

- name: SELL Recall

type: recall

value: 49.9

- name: Base Model Accuracy (untrained, degenerate always-SELL)

type: accuracy

value: 52.5

---

Open-Source LLM for Stock Trading — MiniCPM5-1B Stock Analyst v2 (Forward-Return)

**A small, open-source, fine-tuned LLM for stock direction prediction (BUY/SELL, 5-day

horizon) — and, as far as this author can find, one of the few public LLM-stock-trading

model cards where the claimed accuracy is independently reproduced rather than inflated.**

GGUF (Q8_0 / F16) for llama.cpp/Ollama/LM Studio, plus a LoRA adapter for further

fine-tuning with unsloth or PEFT. Last updated: 2026-07.

TL;DR

  • 53.0% held-out accuracy on tickers entirely quarantined from training (not a time

split — the model has never seen a single row from these tickers).

  • Matches the ceiling found independently by classical ML (GradientBoosting: 53.1%) on

the identical causal features — strong evidence this is close to the actual information

ceiling of the feature set, not an artifact.

  • The untouched base model scores a misleading 52.5% by always answering SELL (0% BUY

recall) — this fine-tune is what turns that into real, balanced discrimination.

  • Not a trading signal. A transparent, reproducible research benchmark for small-LLM

stock-direction prediction.

Want faster inference? This model now has a multi-token prediction (MTP) head

For speculative decoding / MTP with this model family, use

minicpm5-stock-analyst-v2-mtp -- the same merged backbone plus a trained 33M-parameter FastMTP-style draft head, with honestly reported per-benchmark acceptance rates (GSM8K 60.9% @ k=1 / 48.0% @ k=2). Note: MTP only helps multi-token generation -- the stock task itself answers in one token, so the speedup applies when you use the model for anything beyond a bare BUY/SELL call.

Is there a benchmark for LLM stock trading? (there isn't one unified one — here's a transparent one)

There's no single standard "LLM stock trading leaderboard" as of this writing. This model

card is built to function as one anyway: full dataset, build scripts, training notebook,

and evaluation code are public, so any other LLM (or classical baseline) can be benchmarked

against the exact same held-out, ticker-quarantined tickers and causal features. See

minicpm5-stock-v2-forward-return

for everything needed to reproduce or extend it.

Fine-tuned vs. untouched base model

Same held-out evaluation (4 quarantined tickers — TSLA/NFLX/AMD/WMT — never seen in training), same logit-based method, class-balanced, 50% = coin flip:

| | Accuracy | BUY recall | SELL recall | Verdict |

|---|---|---|---|---|

| This model (v2 LoRA) | 53.0% | 56.1% | 49.9% | discriminates both classes at the data's ceiling |

| Untouched MiniCPM5-1B | 52.5% | 0.0% | 100.0% | degenerate — answers SELL every time |

| GBM (classical ML, same features) | 53.1% | — | — | independent information-ceiling estimate |

*The base model's 52.5% is an illusion: it predicts SELL for 100% of inputs, so its "accuracy" is just the class mix of the sample. Zero discrimination. The fine-tune is what turns a constant answer into a real, balanced decision — reaching the same ~53% ceiling that gradient boosting finds on identical features, which is strong evidence the model extracts all the signal these features contain.

Files

| File | Size | Use |

|---|---|---|

| MiniCPM5-1B-stock-v2.Q8_0.gguf | ~1.2GB | llama.cpp / Ollama / LM Studio — fast local inference |

| MiniCPM5-1B-stock-v2.F16.gguf | ~2.2GB | full-precision GGUF |

| adapter_model.safetensors + adapter_config.json | ~90MB | LoRA adapter (r=32) for PEFT / unsloth |

The GGUFs are the merged model (LoRA folded into base weights via merge_and_unload()), so they work standalone with no adapter loading.

Run with llama.cpp

./llama-cli -m MiniCPM5-1B-stock-v2.Q8_0.gguf --temp 0 -n 8 \
  -p "<|im_start|>system
You are a quantitative analyst. Given recent price action and indicators, predict the 5-day direction. Answer with exactly one word: BUY or SELL.<|im_end|>
<|im_start|>user
Ticker: NVDA
Last 20 daily returns (%): [+1.2, -0.8, +2.1, -0.3, +0.9, +1.5, -1.1, +0.4, +2.3, -0.6, +1.0, +0.2, -0.9, +1.8, +0.7, -0.4, +1.3, +0.5, -0.2, +1.1]
RSI(14): 62
Volume vs 20d avg: 1.31x
20d volatility (daily std %): 2.10
Momentum 5d: +3.1% | 20d: +8.4%
Relative strength vs SPY (20d): +5.2%
Predict the 5-day direction: BUY or SELL.<|im_end|>
<|im_start|>assistant
"

Fine-tune further with unsloth or PEFT

# unsloth
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
    "ewinregirgojr/minicpm5-stock-analyst-v2-forward-return",  # loads base + adapter
    max_seq_length=768, dtype=None, load_in_4bit=False,
)
# transformers + PEFT
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

base = AutoModelForCausalLM.from_pretrained("openbmb/MiniCPM5-1B", dtype=torch.float16, device_map={"": 0})
model = PeftModel.from_pretrained(base, "ewinregirgojr/minicpm5-stock-analyst-v2-forward-return")
tokenizer = AutoTokenizer.from_pretrained("ewinregirgojr/minicpm5-stock-analyst-v2-forward-return")

Why you can trust this number

Two earlier models in this series claimed 62% and 84.2% — both turned out to be evaluation artifacts (training-set eval; non-causal denoising leaking future data). This model was built so that inflated accuracy is impossible:

  • Ticker-level quarantine — eval tickers never appear in training at all (stricter than time-only splits)
  • Labels from actual forward 5-day returns (BUY > +2%, SELL < −2%), not news sentiment proxies
  • Strictly causal features — last 20 daily returns, RSI(14), volume ratio, 20-day volatility, 5d/20d momentum, relative strength vs SPY; nothing computed with future data
  • Logit-based eval at the decision token — no fragile output parsing
  • Class-balanced, shuffled val set — immune to block-ordering artifacts
  • Ceiling verified independently — LogReg/GBM/RF run on the identical rows (5 seeds, dense sampling) top out at the same ~53%

FAQ

Is there an open-source LLM for stock trading that actually works?

"Works" depends on the bar. This one discriminates BUY/SELL better than chance (53.0% vs.

50%) on genuinely held-out tickers, and matches what classical ML finds on the same

features — but 3 points over chance, before transaction costs, is not a trading edge.

Treat it as a research benchmark, not a signal generator.

What's the best LLM for stock prediction?

There's no settled answer publicly — most claimed benchmarks in this space (including two

earlier models in this repo's own history) turn out to be inflated by lookahead bias or

eval leakage. This card documents exactly how to check: ticker-level holdout, causal-only

features, an independent classical-ML ceiling check. Use the same method to evaluate any

other candidate model, including your own fine-tunes.

Can I fine-tune an LLM for stock trading myself using this?

Yes — the dataset, build scripts, and training notebook are public (see

minicpm5-stock-v2-forward-return),

and this repo includes the unsloth/PEFT loading snippets to continue fine-tuning from

this checkpoint.

Is 53% good? It sounds low.

For genuine held-out 5-day direction prediction on liquid US large-caps, ~3 points over chance is the order of magnitude real quantitative desks operate at (Renaissance's Medallion is reported ~50.75% per trade). Published claims of 60%+ typically fail replication due to lookahead bias or eval leakage — see A Test of Lookahead Bias in LLM Forecasts.

Why is the untrained base model's 52.5% not comparable?

It predicts SELL for every input (0% BUY recall). Its accuracy is the sample's class ratio, not skill. The fine-tuned model discriminates both classes (56.1%/49.9% recall).

Can I use this to trade?

No. 53% gross accuracy — before transaction costs, slippage, and market impact, on one historical period — is not a deployable trading signal. This is a research artifact demonstrating honest evaluation methodology for financial ML.

Which file do I download for LM Studio / Ollama / llama.cpp?

MiniCPM5-1B-stock-v2.Q8_0.gguf. It's the merged model — no adapter needed.

What data was this trained on?

5,056 class-balanced samples from 16 tickers (2,000 trading days), built from raw daily OHLCV. Dataset, build scripts, baselines, and the exact training notebook are public: minicpm5-stock-v2-forward-return.

How was it trained?

LoRA r=32/alpha=64 on all attention + MLP projections (~1.2% trainable), fp16, batch 8, lr 1e-4 cosine, 1 epoch (~632 steps) — under an hour on a single free T4.

Version history

| Version | Labels | Claimed | Real (held-out) | Verdict |

|---|---|---|---|---|

| v1 | News sentiment | high | ~33% (3-class, chance) | eval leakage, superseded |

| v2 (this) | Forward 5-day returns | 53.0% | 53.0% | claimed = real ✔ |

Related

License

Apache 2.0 (same as base model)

Run ewinregirgojr/minicpm5-stock-analyst-gguf with guIDE

Download guIDE — the AI-native code editor with local LLM inference and 69 built-in tools.

Download guIDE → · Browse 524k+ models · Compare models

Source: Hugging Face · Compare models