fiduciary-qwen3-4b / README.md
albertobarnabo's picture
Card: clarify 4B params (MLX 4-bit uint32 packing confuses the param counter)
bba268d verified
|
Raw
History Blame Contribute Delete
3.95 kB
metadata
license: apache-2.0
language:
  - en
base_model: Qwen/Qwen3-4B-Instruct-2507
pipeline_tag: text-generation
library_name: mlx
tags:
  - mlx
  - apple-silicon
  - qwen3
  - finance
  - financial-advisor
  - financial-literacy
  - personal-finance
  - local-llm
  - privacy
  - self-hosted
  - lora

Nota sui parametri: questo repo contiene i pesi Qwen3-4B quantizzati 4-bit via MLX (uint32 packing). Il contatore di parametri di Hugging Face legge i tensori impacchettati e mostra un valore errato: il modello ha 4B parametri, non 0.6B.

fiduciary-qwen3-4b πŸ¦‰

A personal-finance advisor LLM that lives on your Mac β€” not in someone else's cloud. This is the MLX 4-bit build (2.3 GB) of Fiduciary, a Qwen3-4B-Instruct-2507 fine-tune for Apple silicon. It reads the portfolio you keep in a local JSON file, explains investing concepts like a patient senior advisor, and never sends a byte of your finances anywhere.

⚠️ Educational tool, not financial advice. Fiduciary explains and discusses; it does not know your full situation and can be wrong. Decisions are yours.

Not on a Mac? Use the GGUF build for Ollama / LM Studio / llama.cpp. This repo's weights are MLX-quantized and load with mlx-lm β€” they will not load with plain πŸ€— transformers.

Why would I run a financial advisor locally?

Because the alternative is uploading your portfolio, your balances, and your money anxieties to an API. A 4B model on your own machine is private by construction: you own the weights (Apache-2.0), you own the data (a plain portfolio.json on disk), and you can read every tool it calls in the GitHub repo β€” the agent runtime that fetches live prices and news lives there, in auditable Python, not in the weights.

How do I run it on my Mac?

pip install mlx-lm
mlx_lm.chat --model albertobarnabo/fiduciary-qwen3-4b
from mlx_lm import load, generate
model, tokenizer = load("albertobarnabo/fiduciary-qwen3-4b")
prompt = tokenizer.apply_chat_template(
    [{"role": "user", "content": "I'm 28 and can save 800€/month. Walk me through index funds vs stock picking for someone like me."}],
    add_generation_prompt=True, tokenize=False)
print(generate(model, tokenizer, prompt, max_tokens=512))

For the full advisor experience (portfolio file, live prices, news) clone the runtime repo and follow its README.

How was it trained?

LoRA (rank 16, first 16 layers) on Qwen3-4B-Instruct-2507 with mlx-lm on a 16 GB MacBook β€” the whole fine-tune ran on consumer Apple silicon. Data: synthetic advisor dialogues (portfolio reviews, tool-calling traces, financial-literacy explanations), generated and curated in the runtime repo; mask_prompt: true so only advisor turns contribute to the loss, expanded per assistant turn. Final validation loss 0.046 β€” read that as a training-sanity signal on a small validation set, not a benchmark; this model makes no benchmark claims.

The Fiduciary family

artifact for
this repo Apple silicon via MLX (4-bit, 2.3 GB)
fiduciary-qwen3-4b-GGUF Ollama, LM Studio, llama.cpp, Jan β€” every other machine
fiduciary-qwen3-4b-lora the raw LoRA adapter (56 MB)

Limitations

  • English-first; terminology skews US/EU retail investing.
  • 4B parameters: articulate, occasionally confidently wrong β€” verify numbers.
  • Weights know nothing after the base model's cutoff; live market data comes from the runtime's tools, not the model.
  • Trained on synthetic dialogues, not real client conversations β€” and it shows in breadth: niche instruments and tax specifics are weak spots.