Views
No views yet
mlx-lm-lora.<think> </think> tags, then gives a clear final answer.
Coverage spans the whole investment sector — fiat markets, equities, derivatives, macro,
accounting, and crypto / DeFi / trading (SMC, ICT, FVG, etc.).mlx-community/gemma-4-12B-it-bf16 (← google/gemma-4-12b-it)mlx-lm). model_type: gemma4.| Stage | Data | Notes |
|---|---|---|
| SFT (v4) | ~30k examples: financial CoT (Fino1 FinQA+CoT, fin-alpaca-r1, Finance-Instruct, TAT-QA CoT), crypto trading, an industry/security corpus, and FalseReject de-refusal | broad + balanced |
| GRPO | 12k verifiable items (FinQA-style numerics + crypto BUY/HOLD/SELL labels) | rewards: think_format + numeric_or_label_accuracy, 200 iters |
| Model | FinQA | ConvFinQA |
|---|---|---|
base gemma-4-12B-it | 27.5% | — (often refuses) |
| SFT v4 | 61% | 59% |
| this model (SFT→GRPO v4) | 64% | 60% |
| Fin-R1 (paper reference) | 76% | 85% |
The model is intentionally broad rather than benchmark-maximized: it trades a few FinQA points versus a narrow FinQA-tuned model (Fin-R1) for crypto/trading coverage that Fin-R1 does not have (e.g. Fin-R1 does not know SMC/ICT terms like Fair Value Gap).
1from mlx_lm import load, generate
2
3model, tokenizer = load("z0n3x/gemma-4-12b-fin-grpo-v4")
4
5system = ("You are a financial reasoning assistant covering the whole investment "
6 "sector — fiat markets, equities, derivatives, macro, accounting, and "
7 "crypto/DeFi. Reason step by step inside <think> </think> tags, then give "
8 "a clear, correct final answer.")
9messages = [
10 {"role": "system", "content": system},
11 {"role": "user", "content": "What is a Fair Value Gap (FVG) and how do traders use it?"},
12]
13prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
14print(generate(model, tokenizer, prompt=prompt, max_tokens=800))<think> … </think> then the answer out of the box — you don't need to pass a system
message (pass your own to override it). The reasoning markers are <think> / </think>
(this model was trained on those tags, not Gemma's native <|channel>thought format).<think> (start) and
</think> (end) to fold the chain-of-thought into a collapsible block.Note on loading: these are brand-new Gemma 4 "unified" weights. With somemlx-lmversions you may need a small load-time shim that (a) resolvesmodel_type: gemma4and (b) drops unused multimodal tensors. This is a text-only checkpoint.
mlx-lm; not validated under transformers.1@article{liu2025finr1,
2 title={Fin-R1: A Large Language Model for Financial Reasoning through Reinforcement Learning},
3 author={Liu, Zhaowei and others},
4 journal={arXiv preprint arXiv:2503.16252},
5 year={2025}
6}