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
- Hermes Agent new
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
- 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"} ] }'
Fiduciary — Qwen3-4B (Senior Personal Financial Advisor)
Fiduciary is a fine-tuned Qwen3-4B-Instruct-2507 that acts as a senior personal financial advisor: it reviews your portfolio, checks the latest news, and reasons about how it affects your holdings — running entirely locally on Apple Silicon via MLX.
This is the fused, standalone 4-bit model (2.3GB) — runnable with one
command, no adapter needed. The LoRA adapter alone (56MB) is at
albertobarnabo/fiduciary-qwen3-4b-lora.
Quick start
pip install mlx-lm
python -m mlx_lm generate \
--model albertobarnabo/fiduciary-qwen3-4b \
--prompt "How's my portfolio doing?"
How it works
The split is deliberate: the model owns behavior, live tools own facts — because no fine-tune can know today's prices or this morning's headlines.
- Senior-advisor voice — leads with the answer, exact per-position P&L, risk-first framing (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 figure in it. - Knows when not to call tools — answers knowledge questions directly.
- Guardrails — refuses "guaranteed winners", insider-trading bait, declines to execute trades (advice-only).
To use it as an agent, run a small loop: generate → parse the <tool_call> →
execute the tool → append the <tool_response> → generate again. 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.
Example (agent loop, live data)
you Any news today that could affect my holdings?
Fiduciary
→ analyze_portfolio() → search_news(query='market news', limit=6)
Yes — there's news worth connecting to your holdings. ...
**Impact on your portfolio:**
- **Technology (51.6% of your equity — NVDA, AAPL, MSFT):** ...
**Bottom line:** None of this justifies reactive trading. ...
Training
LoRA (rank 16) on ~1,200 fully synthetic advisor conversations, fused back into
4-bit weights (group size 64). Data is expanded one example per assistant
turn so multi-turn tool calls are learned (mlx-lm's mask_prompt only trains
the final assistant message). Every number in every answer is computed from the
tool response in the same conversation. 1,200 iters, cosine LR 5e-5 → 5e-6,
validation loss 0.046. Trained on an Apple M5 (16GB).
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. Quote/news endpoints in the reference runtime are unofficial and degrade gracefully.
- Downloads last month
- 8,248
4-bit
Model tree for albertobarnabo/fiduciary-qwen3-4b
Base model
Qwen/Qwen3-4B-Instruct-2507