Instructions to use albertobarnabo/fiduciary-qwen3-4b-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use albertobarnabo/fiduciary-qwen3-4b-lora with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("albertobarnabo/fiduciary-qwen3-4b-lora") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - PEFT
How to use albertobarnabo/fiduciary-qwen3-4b-lora with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use albertobarnabo/fiduciary-qwen3-4b-lora with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "albertobarnabo/fiduciary-qwen3-4b-lora" --prompt "Once upon a time"
Fiduciary β Qwen3-4B LoRA Adapter (Senior Personal Financial Advisor)
A LoRA adapter that turns Qwen3-4B-Instruct-2507 into Fiduciary, a senior personal financial advisor that reviews your portfolio, checks the latest news, and reasons about how it affects your holdings β running entirely locally on Apple Silicon via MLX.
This repo is the adapter only (~56MB). For a ready-to-run standalone model,
see the fused version: albertobarnabo/fiduciary-qwen3-4b.
What the fine-tune teaches
The split is deliberate: the adapter owns behavior, live tools own facts.
- Senior-advisor voice β leads with the answer, exact per-position P&L, risk-first framing (position sizing, concentration, time horizon), a "Bottom line" closer.
- Disciplined tool use β emits
<tool_call>{"name": ..., "arguments": ...}</tool_call>forget_portfolio,get_quotes,search_news,analyze_portfolio; reads the<tool_response>and grounds every number in it (never invents prices). - Knows when not to call tools β answers knowledge questions (tax-loss harvesting, duration, Roth vs. traditional) directly.
- Guardrails β refuses "guaranteed winners", insider-trading bait, and declines to execute trades (advice-only by design).
Usage
pip install mlx-lm
python -m mlx_lm generate \
--model mlx-community/Qwen3-4B-Instruct-2507-4bit \
--adapter-path ./fiduciary-qwen3-4b-lora \
--prompt "How's my portfolio doing?"
The adapter is designed to drive a small agent loop (parse tool call β run the
tool β feed back <tool_response> β repeat). A reference runtime with live
quote/news/portfolio tools (stdlib-only, no API keys) β plus the dataset
generator and training config β is on GitHub:
github.com/albertobarnabo/fiduciary.
Training
- Method: LoRA (rank 16, scale 20, dropout 0.05), 16 layers,
mask_prompt. - Data: ~565 fully synthetic advisor conversations expanded to ~1,200
examples β one per assistant turn (mlx-lm's
mask_prompttrains only on the final assistant message, so multi-turn tool calls must each be a final turn or the model never learns to emit them). Every number in every answer is computed from the tool response in the same conversation, so the model learns to read tool output, not memorize prices. - Schedule: 1,200 iters, cosine LR 5e-5 β 5e-6,
max_seq_length2816. - Result: validation loss 0.046.
- Hardware: Apple M5, 16GB. Peak memory ~6.9GB.
Limitations
Educational guidance, not individualized investment advice. Strong tool reflexes occasionally fire on a prompt that should be refused outright. Newsβimpact mapping is sector-heuristic, not a pricing model.
Quantized
Model tree for albertobarnabo/fiduciary-qwen3-4b-lora
Base model
Qwen/Qwen3-4B-Instruct-2507