Text Generation
MLX
Safetensors
English
qwen3
apple-silicon
finance
financial-advisor
financial-literacy
personal-finance
local-llm
privacy
self-hosted
lora
conversational
4-bit precision
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 @earendil-works/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
- 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
- Atomic Chat
- OpenClaw
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"
| 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](https://huggingface.co/albertobarnabo/fiduciary-qwen3-4b-GGUF) | |
| 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](https://github.com/albertobarnabo/fiduciary) β 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? | |
| ```bash | |
| pip install mlx-lm | |
| mlx_lm.chat --model albertobarnabo/fiduciary-qwen3-4b | |
| ``` | |
| ```python | |
| 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](https://github.com/albertobarnabo/fiduciary) 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](https://huggingface.co/albertobarnabo/fiduciary-qwen3-4b-GGUF) | Ollama, LM Studio, llama.cpp, Jan β every other machine | | |
| | [fiduciary-qwen3-4b-lora](https://huggingface.co/albertobarnabo/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. | |