๐Ÿ‰ Dragon Finance 7B

Status: the deployment artefact is built and verified; the shipped agent is not finished. The deployment shape, hardware envelope, knowledge architecture and evaluation are fixed and documented below.

A LoRA adapter is trained and published; the Q4_K_M build is published here as Dragon-Finance-7B-Q4_K_M.gguf (4,683,073,696 bytes) and its quantisation gate passed โ€” identical to the f16 control within one question in 60. On 60 frozen held-out questions it beats the base model on 4 of 4 tool-use metrics โ€” right tool 0.750 โ†’ 1.000, right arguments 0.117 โ†’ 0.900, answer correct 0.133 โ†’ 0.750. answer_ok misses the plan's 0.80 target, and The quantisation gate has run and passed (dragon-state:runs/dragon-lora-v7/quant/VERDICT_QUANT.json). What is not finished is the product: measured through the shipped agent, the same 60 questions score 0.483 (dragon-state:runs/dragon-lora-v7/quant/v1_test_60.json, 60 held-out questions, zero fabricated citations โ€” every cited accession was one a tool returned) against the benchmark's 0.767 โ€” corrected 2026-11-21: those two numbers were measured on different, non-reproducible question samples (a fresh seed=11 regeneration shares 1 question of 60 with the frozen file; two calls in one process reported 50 then 45 filers). The same instrument on a regenerated sample scores 0.500, so the sample difference is real but small and does not explain the gap. A like-for-like run over one frozen file is in flight. See docs/CORRECTION-2026-11-21-question-set.md, and no human has yet run it on the 8 GB target. See docs/03-CHECKPOINTS.md and docs/05-OPEN-WORK.md.

A 7B finance agent core built for one purpose: to run a complete agentic assistant on a small desktop, with no cloud account, no API key and no data leaving the machine.

New here? Read this first

How Dragon Finance 7B is built โ€” a plain, short account of what this model is, what it is not, why we did not train a base model, and how to check every claim on this page yourself. No marketing.

Every work, checkpoint and correction, in one numbered index: dragon-state/docs/00-START-HERE.md โ€” the history (02), the register of every run and checkpoint with hashes (03), how to verify any claim (04), what is still open (05), and what the older documents โ€” including RESUME.md โ€” get wrong (07).

Card reconciled with measurement 2026-11-21 โ€” four stale claims corrected: the deployment build's size (4.68 GB, not 3.5 GB), the roadmap boxes for the GGUF builds, the pre-redesign 59 %/0 % table, and the status line. Every figure on this page is reproduced from an artefact in dragon-state; the corrections are listed in dragon-state:docs/07-CORRECTIONS.md.

What this is for

Most models capable of driving a real agent need a datacentre, a rented GPU, or a paid API. This one is designed so that a single small-form-factor machine โ€” a mini-ITX board, the smallest current discrete GPU that can hold a 7B model, and an 8 TB NVMe โ€” is enough to be the reasoning core of an agentic harness such as OpenCode: reading files, editing code, running shell commands, and answering questions grounded in a multi-terabyte financial corpus held locally.

The constraint is the design. Everything below follows from it.

What that buys you

Local documents never leave the machine
Private no API key, no vendor telemetry, no retention policy to read
Free at the margin no per-token billing โ€” the only cost is electricity
Offline works with the network unplugged
Low latency no round trip to a provider
Small mini-ITX, one GPU, ordinary desktop parts
Quiet, low power a bandwidth-bound 8 GB card, not a compute furnace

The hardware envelope

The design targets the smallest card that can hold the model with usable context: 8 GB of VRAM. That is a mainstream, inexpensive, physically small GPU โ€” not a workstation card.

reference build
form factor mini-ITX (small cube / slim tower)
GPU 8 GB, current generation (~448 GB/s)
PSU SFX, ~145 W GPU
RAM 32โ€“96 GB (knowledge index lives here, not in VRAM)
storage 8 TB NVMe โ€” ~1 TB OS, ~7 TB local corpus
OS Windows or Linux
throughput ~60 tok/s at Q4 with 32k context
network none required at inference time

Design rationale

Every decision is a deliberate response to that hardware constraint.

decision choice why
base Qwen2.5-Coder-7B-Instruct code priors โ€” cannot be cheaply learned post-hoc; strong tool-calling
dense, not MoE dense 7B experts must be resident; a sparse design was costed and rejected (below)
no pretraining inherit the base pretraining a 7B to competitive quality is ~17 GPU-years on target-class hardware
knowledge in a database retrieval, not weights a 7B has a fixed, small capacity ceiling; an index has none and costs zero VRAM
4-bit quantised Q4_K_M GGUF 4.68 GB measured (4,683,073,696 B) โ€” fits 8 GB with room for 32k+ context
quantised KV cache -ctk q8_0 -ctv q8_0 this, not the weights, is what makes long context fit

Why not Mixture-of-Experts

A sparse design was costed and rejected on three independent grounds for this target:

  1. Memory. Experts are resident. To fit 8 GB the experts must be ~0.8M params each, below any shipped MoE design (Qwen3-MoE ~4.7M; DeepSeek-V3 ~44M per expert).
  2. Data exposure. With E experts and top-k, each expert sees k/E of tokens. At 80 experts / top-2 that is 2.5% โ€” requiring ~40x the tokens for equal exposure.
  3. Latency. Agents make dozens of sequential calls per task; expert routing and paging dominate wall-clock exactly where responsiveness matters most.

Knowledge architecture

Knowledge is retrieved, never memorised โ€” which is what lets a small machine hold a large corpus.

Dragon-Finance-Corpus         134,899,262 chunks (512-token windows, 64 overlap)
        โ”‚
        โ”œโ”€ embed โ”€โ”€โ”€โ”€โ”€โ”€โ–บ vector index   (on disk)
        โ”œโ”€ index โ”€โ”€โ”€โ”€โ”€โ”€โ–บ full-text      (keywords)
        โ””โ”€ store โ”€โ”€โ”€โ”€โ”€โ”€โ–บ chunk text + source path
                              โ”‚
                    search_knowledge(query, k)
                              โ”‚
                    agent loop (OpenCode)

The index lives on disk and CPU and consumes zero VRAM, so a multi-terabyte knowledge base never competes with the model for the 8 GB.

Evaluation

Scored against Dragon-Finance-Eval โ€” 5,499 long-tail items over eight quarters plus a 1,303-item large-cap split, every answer re-derived from the SEC's own financial statement data data. This makes the retrieval and filtering decisions falsifiable rather than assumed.

Usage (once weights ship)

llama-server \
  -m Dragon-Finance-7B-Q4_K_M.gguf \
  -c 32768 -fa on -ctk q8_0 -ctv q8_0 \
  -ngl 999 --jinja --alias dragon-finance-7b

Then point the harness at http://127.0.0.1:8080/v1.

What the benchmark actually measures

fact_lookup dominates (4,740 of 5,499 long-tail items), and every item is answerable from structured data. The eval therefore measures entity resolution, tag selection, period and unit discipline โ€” not language or reasoning. The corpus's filing prose is not tested by it.

Two consequences worth stating plainly:

  1. The harness matters more than the model. On the large-cap split, a 4B model matches an 8B and beats a 14B on the tool-context task, and ~94% of remaining failures are the right magnitude with the wrong tag chosen from a ~95-row candidate set. Narrowing that candidate set is the lever.
  2. So this model ships with two tools, not one: search_knowledge (prose retrieval above) and query_financials (SQL over the XBRL fact tables, keyed adsh, tag, ddate, qtrs, uom).

The plan, and why

Read PLAN.md โ€” what remains, in what order, and the measurement that justifies each step.

This model is not yet at the state it should be, and that is stated plainly rather than hidden. The tool layer is finished and verified; the model's job is to drive it correctly, and the current adapter does not yet do so:

The table below is superseded by measurement (2026-11-20) โ€” see the Measured 2026-11-20 section at the foot of this card. It reports the state before the trace redesign: the adapter now reaches 100 % right tool / 90 % right arguments / 75 % answer correct on the same held-out fillets, so the 59 % and the two 0 % rows no longer describe the artefact. They are kept here because deleting a superseded measurement is how a project loses its history.

measure today target
right tool on a held-out question 100% (was 59%) 95%+
right arguments 90% (was 0%) 80%+
strict tool call (both correct) 0% 80%+
harness accuracy, no model involved 99.8% 99.8%

The zero on arguments is a known, diagnosed defect โ€” and it is not a model limitation. The first adapter was trained on traces where the accession number was supplied in the question, so it learned to emit one rather than find one, and it hallucinated 0001564590-โ€ฆ for three different companies. The fix is a training-data fix: traces must encode the trajectory (resolve_filer โ†’ candidate_tags), and never hand the model an identifier it is supposed to look up.

Nothing is published until the held-out benchmark says it helped. If the adapter does not beat the base, we ship the base plus the harness and say so.

On credit. The foundation of this work was not built here โ€” it was published: a 5.57 TB corpus with content hashes and documentation that volunteers its own defects, and a 6,802-item evaluation whose answers were re-derived by a verifier written separately from its generator.

That evaluation is why any of this is checkable. When the first adapter produced hallucinated accessions, the eval is what caught it. A project that ships a falsifiable benchmark is worth more than one that ships a model.

PLAN.md says more.

Verified results

Every number below was produced by a command that ran. Nothing here is projected.

Evaluation โ€” full Dragon-Finance-Eval, 6,802 items, no model involved

task items accuracy
fact_lookup 6,029 99.8%
arithmetic 419 100.0%
period_trap 187 100.0%
unit_trap 167 100.0%
overall 6,802 99.8% (6,791)

By split: long-tail 99.8% (5,488/5,499) ยท large-cap 100.0% (1,303/1,303). Oracle ceiling (ground-truth keys): 100.0% (5,499/5,499 long-tail).

Progression measured at each stage:

strategy accuracy
arbitrary tag from the candidate set 1.7%
lexical narrowing only 11.7%
concept map, single tags 90.0%
concept map as priority lists + two formulas 99.8%
oracle 100.0%

Tag candidate set per filing+period: min 1, median 43, p90 73, max 132; 98% of items have more than one candidate.

Reproduced, after the container was relaunched (2026-11-19). The script that produced the table above (run_final.py) was never published and died with the box, which left the headline number unreproducible. It has been reconstructed and the reconstruction is published: dragon-state/state/run_harness.py re-derives all 6,802 items from facts.duckdb with no model in the loop and returns 6,791/6,802 = 99.8%, agreeing with the published per-item verdicts on 6,802/6,802 items - down to the same 11 fact_lookup misses, all in the ambiguous-revenue-tag family.

Two changes are required, and both are the changes the card already describes:

variant overall
resolve() as written in the notebook 52.7%
... with the or True removed from the else-branch 93.0%
... with the concept map as priority lists + two formulas 99.8%

The or True is the whole first gap: it fires the net-margin formula on every item, hijacking 3,412 ordinary lookups (in this notebook period_trap and unit_trap scored 8% and 6% as a result). It was unnecessary - the 207 net-margin items say "net profit margin", so re.search(r"margin", q) already catches them. The second change is the priority-list narrowing the evaluation section above already records. Audit and per-item evidence: dragon-state/workplan/HARNESS-AUDIT.md.

Caveat, unchanged: the harness is fitted to this eval, exactly as it always was. Quote it as "on Dragon-Finance-Eval, harness tuned on it".

Tool calls โ€” executed, output recorded

call result
resolve_filer("3M CO") CIK 66740
resolve_filer("WALMART INC") CIK 104169
candidate_tags("0000066740-23-000092","20220930",1) 26 candidates
resolve("what is gross profit?", <that filing>) 3891.0 via formula:gross_profit
query_financials("3M CO", form="10-Q", ddate="20220930", qtrs=1) facts returned
search_knowledge("AMREP Corporation Schedule 13D reporting persons") the actual AMREP SC 13D filings, with source/file/chunk
CLI dragon filer "3M CO" `66740

3891.0 is the exact expected answer for that item โ€” (8619000000 - 4728000000) / 1e6.

MCP layer โ€” through the protocol, not just the Python API

check result
server construction MCPServer, name dragon-harness
tools published 5
call_tool("resolve_filer_tool", โ€ฆ) CIK 66740
call_tool("resolve_question_tool", โ€ฆ) value 3891.0, method formula:gross_profit

Verified on MCP 2.3.0 (MCPServer); the server also falls back to FastMCP on MCP 1.x.

Adapter training โ€” completed run

layers wrapped 196
trainable params 1,170,939,392 (15.2%)
traces 599, contamination-clean
steps 60
wall clock 39 s
loss 0.3832 โ†’ 0.2494
artifact lora/adapter.pt (162 MB)

Index build โ€” throughput

measured embedding rate 832 chunks/s (real 512-token chunks)
corpus index after the full 184-shard pass 3,665,826 chunks
deepening toward 40,000,000 chunks; per-shard offsets, one indexer at a time
projection for all 134.9M chunks ~45 h

The 3,665,826 figure reproduces the count the pre-relaunch run had reached - the same number, rebuilt from the public corpus after the vectors were lost. index_corpus.py records only which shards are done, so a finished pass cannot be extended by re-running it; index_corpus_deep.py adds per-shard offsets so passes compose (0-20k, 20-40k, ...).

Coverage of the evaluation's own filings is measured too, and it is currently 0%: at 10,485,826 chunks, 0 of 120 sampled eval filings appear anywhere in the index (ground truth from the eval's own provenance.adsh; matching digit-normalised). The indexed material is the first ~40k lines of each of 184 shards - 7.8% of the corpus - and those slices skew old (1998 tarball members, 2020 accessions). So prose retrieval cannot ground Dragon-Finance-Eval answers at this index size, which is consistent with the eval card's own note that the corpus's filing prose is not what the eval tests. dragon-state/state/retrieval_recall.py re-measures this every 120 minutes against index size.

Contamination

Traces were generated only from filings absent from the evaluation set โ€” all 2,039 eval accessions excluded before sampling, asserted in code, and reported as CONTAMINATION: clean. The evaluation remains a genuine held-out test.

Re-audited after the relaunch, against the restored trace files: 2,039 eval accessions and 150 benchmark filers scanned across tool_traces.jsonl (599 traces) and tool_traces_v2.jsonl (8,545 traces) - no eval accession, no benchmark filer, and no accession leaked into any question text (the property that matters: v1 handed the accession over, v2 makes the model find it). The quarantine held in the artifacts that survived.

After the box relaunch โ€” what survived

/home/marimo is an overlay filesystem and did not survive the relaunch. Everything below was restored from dragon-state, re-verified, and re-published during the resume.

restored 48 state files (facts.duckdb, adapters, traces, split, results, checkpoints) + ops/training scripts from dragon-harness
facts.duckdb num 28,176,037 ยท consolidated 13,031,109 ยท sub 55,635 - the documented counts
harness reproduced item-for-item (above)
corpus index pass 1 complete at 3,665,826 chunks (exact), deepening
traces contamination re-audit clean
index coverage of the eval's filings 0/120 sampled at 10.5M chunks โ€” measured, tracked every 2 h
lost for good train_agent_metric.py, bench_agent.py, cpu_lane.py, merge_and_quant.py, eval_sweep.py, holdout_eval.py, distill.py, tool_traces_all.jsonl โ€” never published, so the SFT, benchmark, quantisation and distillation lanes are gone and 24 of 26 remaining workplan jobs cannot run
durability added the notebook itself is now snapshotted every sync pass (state/notebook.py); state_manifest.json (which was missing, so sync_state.py could not run at all) was reconstructed; box_runner.py supervises the surviving jobs

Full inventories: dragon-state/workplan/RELAUNCH-STATUS.md and dragon-state/workplan/HARNESS-AUDIT.md.

Limitations

  • Not a source of truth. The model reasons over retrieved text; it does not contain the corpus. Verify financial figures against primary filings.
  • Not investment advice.
  • 7B ceiling. It will not match frontier models on open-ended financial reasoning. It is designed to be excellent at retrieval-grounded finance tasks on small hardware.
  • Local โ‰  cheap at high volume. Suitable for personal and small-team use; a high-throughput production service still wants a larger model on larger hardware.
  • Inherits base-model biases and the composition of the Dragon Finance Corpus (91% SEC EDGAR; filer-concentrated โ€” see the corpus card).

Roadmap

  • Design fixed: base, hardware envelope, quantisation, knowledge architecture
  • Knowledge layer: chunk โ†’ embed โ†’ vector + full-text index, scaffolded
  • Evaluation against Dragon-Finance-Eval โ€” reproduced item-for-item by dragon-state/state/run_harness.py after the relaunch
  • [~] LoRA adapter on agentic tool-use traces โ€” the trace-trained adapter shipped; the agent-metric trainer (train_agent_metric.py) was lost with the box and no longer exists
  • Dragon-Finance-7B-Q4_K_M.gguf (4,683,073,696 B) + Q8_0 (8,098,525,344 B) builds โ€” published, hash-recorded
  • [~] OpenCode harness integration: the config exists; the end-to-end path measured 0.483 vs the benchmark's 0.767 and search_knowledge is withheld until the index clears its row floor

Using it

This is the model half. The half that does the work is the harness:

artifact what it is
dragon-harness the tool layer โ€” CLI, MCP server, SQL + retrieval tools
dragon-harness/QUICKSTART.md five minutes, clone to working
dragon-harness/training/ index builder, trace generator, LoRA trainer

Quick version:

pip install "dragon-harness @ git+https://huggingface.co/dragonlimited/dragon-harness"
dragon filer "3M CO"
python -m dragon_harness.mcp_server          # expose the tools to your harness

Related

artifact what
Dragon-Finance-Corpus 5.57 TB, 134.9M chunks, 55 sources
Dragon-Finance-Eval 5,499 long-tail + 1,303 large-cap Q/A items
DEVELOPMENT.md how it was built, and what it is not
RESUME.md engineering handoff and current state

Measured 2026-11-20 โ€” the adapter drives the tools (held-out, 60 frozen questions)

This section is appended by the pipeline, not written by hand, and it supersedes the earlier "right tool 59% / right arguments 0%" row by measurement. Both arms answered the same 60 frozen questions (held-out filers, every Dragon-Finance-Eval accession excluded), temperature 0:

metric base adapter v7 delta target met
right tool (resolve_first) 0.750 1.000 +0.250 0.95 yes
right arguments (args_ok) 0.117 0.900 +0.783 0.80 yes
reaches candidate_tags 0.417 1.000 +0.583 โ€” โ€”
answer correct (answer_ok) 0.133 0.750 +0.617 0.80 no

Trained on 39,000 contamination-clean traces (final, audited as one merged corpus), LoRA r=32 on 196 layers, 80.7 M trainable parameters. The harness score (99.8 %, no model in the loop) is the in-sample one and is unchanged by this.

Quantisation gate: not yet run - treat the numbers below as bf16 adapter scores, not as verified Q4_K_M behaviour.

Reproduce it: dragon-state:runs/verdict-v7/ holds VERDICT.md, VERDICT.json, both arms' per-item results and the frozen question file. The adapter is dragon-state:runs/dragon-lora-v7/adapter_best.pt. The measurement above is on held-out filers with the eval's accessions excluded, so it is a tool-use measurement, not a generalisation claim.

Downloads last month
46
GGUF
Model size
8B params
Architecture
qwen2
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for dragonlimited/Dragon-Finance-7B

Base model

Qwen/Qwen2.5-7B
Quantized
(292)
this model