Instructions to use albertobarnabo/fiduciary-qwen3-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use albertobarnabo/fiduciary-qwen3-4b with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("albertobarnabo/fiduciary-qwen3-4b") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use albertobarnabo/fiduciary-qwen3-4b with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "albertobarnabo/fiduciary-qwen3-4b"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "albertobarnabo/fiduciary-qwen3-4b" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use albertobarnabo/fiduciary-qwen3-4b with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "albertobarnabo/fiduciary-qwen3-4b"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "albertobarnabo/fiduciary-qwen3-4b" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- MLX LM
How to use albertobarnabo/fiduciary-qwen3-4b with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "albertobarnabo/fiduciary-qwen3-4b"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "albertobarnabo/fiduciary-qwen3-4b" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "albertobarnabo/fiduciary-qwen3-4b", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use albertobarnabo/fiduciary-qwen3-4b with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "albertobarnabo/fiduciary-qwen3-4b"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default albertobarnabo/fiduciary-qwen3-4b
Run Hermes
hermes
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.
- Downloads last month
- 164
4-bit