136 7 months ago

Schematron-3B is a 3.2B-parameter Llama-architecture chat model (inference-net/Schematron-3B) converted to GGUF for llama.cpp/Ollama, with two published quantizations: Q4_K_M (recommended balance) and IQ4_XS (smaller). It supports up to 131,072 context

ollama run richardyoung/schematron-3b:Q4_K_M

Details

7 months ago

afadbfff8e3e Β· 2.0GB Β·

llama
Β·
3.21B
Β·
Q4_K_M
<|begin_of_text|>{{ if .System }}<|start_header_id|>system<|end_header_id|> {{ .System }}<|eot_id|>{
{ "stop": [ "<|eot_id|>" ] }

Readme

Schematron 3B

Structured-output finetune for converting noisy HTML into clean, schema-conformant JSON. GGUF builds for Ollama / llama.cpp.

πŸš€ Overview

schematron-3b is a quantized GGUF conversion of inference-net/Schematron-3B, a long-context extraction model purpose-trained to turn messy, real-world HTML into strictly valid JSON that conforms to a user-supplied schema.

You provide cleaned HTML plus a JSON Schema; the model returns JSON that adheres to that schema with no narration. It is built for web scraping, data ingestion, and turning arbitrary web pages into typed records, running locally with no API calls.

  • Base model: Meta Llama 3.2-3B-Instruct
  • Parameters: ~3.2B
  • Context length: 131,072 tokens (~131K)
  • Task: HTML β†’ schema-constrained JSON extraction
  • Format: GGUF (Q4_K_M and IQ4_XS quantizations)

πŸ“Š Benchmarks

Reported by the upstream model authors (inference-net/Schematron-3B). Figures describe the original full-precision model; quantized GGUF builds may differ slightly.

Evaluation Metric Schematron-3B Reference
HTMLβ†’JSON extraction quality LLM-as-Judge, 1–5 scale 4.41 GPT-4.1: 4.74
SimpleQA factuality (paired w/ GPT-4.1 + web retrieval) Accuracy 85.58% ,

🎯 Key Features

  • Schema-faithful output, emits JSON that conforms to a supplied JSON Schema (extractable from Pydantic/Zod), with no prose or narration.
  • Long context, handles lengthy, noisy HTML up to ~131K tokens.
  • Compact, ~3.2B params; quantized builds run on modest hardware.
  • Local & private, runs fully offline via Ollama; no data leaves your machine.
  • Drop-in for pipelines, designed for web scraping, ingestion, and RAG-style retrieval-to-JSON workflows.

🏷️ Available Versions

Tags below are listed exactly as published on ollama.com/richardyoung/schematron-3b.

Tag Size BPW Notes
Q4_K_M 2.0GB ~4.83 Recommended, best quality/size balance
iq4_xs 1.8GB ~4.25 Smallest download; slightly lower fidelity

πŸ’» Quick Start

# Recommended build
ollama run richardyoung/schematron-3b:Q4_K_M

# Smallest build
ollama run richardyoung/schematron-3b:iq4_xs

Example extraction prompt:

ollama run richardyoung/schematron-3b:Q4_K_M "Extract data from the HTML below into JSON matching this schema.

Schema:
{\"type\":\"object\",\"properties\":{\"title\":{\"type\":\"string\"},\"price\":{\"type\":\"number\"}},\"required\":[\"title\",\"price\"]}

HTML:
<div class=\"product\"><h1>Widget Pro</h1><span class=\"amt\">\$19.99</span></div>"

πŸ› οΈ Use Cases

  • Web scraping, convert product, listing, or article pages into typed records.
  • Data ingestion, normalize heterogeneous HTML sources into a single schema.
  • RAG / retrieval, structure fetched web content before indexing or grounding.
  • Page-to-record ETL, batch-transform crawled pages into JSON for databases.

πŸ“‹ System Requirements

Quantization Disk Min RAM/VRAM (approx.)
Q4_K_M (2.0GB) ~2 GB ~4 GB
iq4_xs (1.8GB) ~2 GB ~4 GB
  • Ollama installed.
  • Long-context extraction uses more memory as input grows toward 131K tokens; size headroom for your typical page length.
  • Runs on CPU; GPU/Metal acceleration recommended for throughput.

πŸ”§ Technical Details

  • Architecture: Llama 3.2 family (decoder-only transformer)
  • Base model: Meta Llama 3.2-3B-Instruct
  • Finetune: inference-net/Schematron-3B
  • Parameters: ~3.2B
  • Max context: 131,072 tokens
  • Quantizations: Q4_K_M, IQ4_XS
  • Format: GGUF (llama.cpp / Ollama)
  • Input: cleaned HTML + JSON Schema β†’ Output: schema-conformant JSON

⚠️ Disclaimer

This is a quantized GGUF redistribution of a third-party model for local use. Quantization can change outputs versus the original full-precision weights; benchmark figures above describe the upstream model, not these GGUF builds. Always validate generated JSON against your schema before use in production. The model may produce incorrect or incomplete extractions; do not rely on it for safety-critical decisions without human review.

πŸ™ Acknowledgments

Licensed under the Llama 3.2 Community License (inherited from the base model).


Built & maintained by Richard Young Β· DeepNeuro