Run this model with HF Jobs
Run superbird-labs/l-01-document-extractor on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/superbird-labs/l-01-document-extractor. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/superbird-labs/l-01-document-extractor on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/superbird-labs/l-01-document-extractor. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/superbird-labs/l-01-document-extractor. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use superbird-labs/l-01-document-extractor with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use superbird-labs/l-01-document-extractor with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-0.8B") model = PeftModel.from_pretrained(base_model, "superbird-labs/l-01-document-extractor") - Notebooks
- Google Colab
- Kaggle
L-01 Β· Document Extractor
superbird labs Β· Language unit Β· 0.8B
Reads a document and hands back exactly the JSON your schema asks for. On a laptop, so the document never leaves.
Watch real runs | Docs and full recipe | Run it offline | All superbird models | Custom models for your company
Open source. Apache-2.0 weights, the full training recipe and the exact prompt are all public. Use it, ship it, retrain it.
Spec plate
| Serial | L-01 Β· 0.8B |
| Frame | DA-24 Β· Qwen3.5 hybrid Β· 24 layers in a 3:1 rhythm: 18 gated DeltaNet (fast running memory) + 6 full attention (the deep look back), width 1024 |
| Mission | Reads a document and returns the JSON object its own JSON schema describes. 30 document types, 16 languages, 6 to 13 top-level fields each. |
| Held-out documents | 500, the whole test split |
| Before β after | 67.6% β 87.8% Fields right |
| Training | 60 GRPO steps Β· one L40S Β· 27 min |
| Recipe | LoRA r16 Β· 16 documents Γ 8 rollouts Β· answers up to 512 tokens Β· thinking off |
| Datasets | LiquidAI/structured-extraction (apache-2.0), 5,888 training documents |
Reward: The share of top-level fields that match after normalising (dates yyyy-mm-dd, times hh:mm, amounts as numbers). Broken JSON scores 0.
Where it earns its keep
| Inbox to crm | Signatures, badge scans and contact emails into clean contact records. |
| Receipts and invoices to rows | Dates, totals and currencies normalised the way your schema asks. |
| Private documents, offline | It runs on a laptop, so contracts and patient letters never leave the machine. |
Mission log
Real missions from the held-out set. Same question, before and after training.
A Japanese chat log about a cracked sofa β support ticket JSON
Before training:
"category": "technical",
"issue_start_date": "2026-11-02"
Uses the date the email was sent.
After, L-01:
"category": "product_defect",
"issue_start_date": "2026-10-31"
A German event badge scan β contact JSON
Before training:
{"title": "Contact card / email signature", "type": "object",
"properties": {"full_name": "Nadja WΓΌthrich", β¦}}
Hands back the schema with values inside it. Scores zero.
After, L-01:
{"full_name": "Nadja WΓΌthrich",
"job_title": "Senior Immobilienberaterin",
"company": "Limmatblick Immobilien AG", β¦}
A Korean school notice β start time
Before training:
"2023.04.14T08:40"
Adds a date the schema did not ask for.
After, L-01:
"08:40"
Receipts
| fields right (500 held-out) | |
|---|---|
| Base Qwen3.5-0.8B | 67.6% |
| step 20 | 84.5% |
| step 40 | 86.4% |
| step 60 (L-01) | 87.8% |
Greedy decoding, same prompt and budget as training, one run. The highlighted checkpoint ships.
Outside check. Plain transformers + peft on the first 48 test documents: 77.6% β 91.6%. 2 of the 48 got worse.
Scars
What it cost to get here, and what we learned.
- The base kept answering with the form instead of filling it in. Most of the jump is it learning to hand back the object, not the schema.
- 14 test documents don't fit 2k tokens. They count as wrong before and after. No cherry-picking.
The prompt
Trained with this exact system prompt. Use it word for word: small models are picky.
Extract the data in the user's document into a JSON object that matches this JSON Schema:
{your JSON Schema here}
Pilot's manual
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
tok = AutoTokenizer.from_pretrained("Qwen/Qwen3.5-0.8B")
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-0.8B", torch_dtype="bfloat16")
model = PeftModel.from_pretrained(base, "superbird-labs/l-01-document-extractor")
Use the system prompt from environments/doc-extract with your own schema, enable_thinking=False.
Weak spots
- Scored on top-level fields. Inside lists (attendees, line items) one slip costs the whole field.
- Documents up to ~2,000 tokens, what it trained on.
- One run, one seed.
Built with
One GPU and the open-source surogate engine (Apache-2.0). The whole kit (configs, environment, reward, walkthrough) is open, so you can rebuild this unit or point it at your own task: docs.surogate.ai/engine/examples/kits/extract. Also published as cetusian/spinnex-0.8b.
The fleet
| Serial | Unit | Mission | Before β after |
|---|---|---|---|
L-01 |
l-01-document-extractor | document β the JSON your schema asks for | 67.6% β 87.8% |
L-02 |
l-02-policy-guard | written policy + message β safe / unsafe | 54.4% β 78.1% |
L-42 |
l-42-galaxy-guide | explains anything, offline | the guide |
A-01 |
a-01-function-caller | phone request β exact function calls | 74.2% β 85.3% |
A-02 |
a-02-database-agent | questions answered through a live MCP database | 48.4% β 81.5% |
A-03 |
a-03-solver | countdown arithmetic, every step written | 1% β 69.5% |
Nobody built a model for it. So we did.
superbirdlabs.com: open small models for every industry, free to run offline, and custom models built for companies. Docs | All models | Work with us | hello@superbirdlabs.com
- Downloads last month
- 34
Model tree for superbird-labs/l-01-document-extractor
Dataset used to train superbird-labs/l-01-document-extractor
Collection including superbird-labs/l-01-document-extractor
Evaluation results
- fields right on LiquidAI/structured-extraction test (500 documents)self-reported87.800
