123 7 months ago

Schematron-8B is an ~8B-parameter, Llama-architecture instruction model (inference-net/Schematron-8B) packaged for Ollama with long-context metadata (131K) and two GGUF quantizations: Q4_K_M (recommended) and IQ4_XS (smaller/faster).

ollama run richardyoung/schematron-8b:Q4_K_M

Details

7 months ago

e3b95d59db8d · 4.9GB ·

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

Readme

Schematron 8B

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

🚀 Overview

schematron-8b is a quantized GGUF conversion of inference-net/Schematron-8B, 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. The 8B variant offers a marginal quality lift over Schematron-3B on harder and longer pages.

  • Base model: Meta Llama 3.1-8B-Instruct
  • Parameters: ~8B
  • Context length: 131,072 tokens (~128K)
  • 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-8B). Figures describe the original full-precision model; quantized GGUF builds may differ slightly.

Evaluation Metric Schematron-8B Reference
HTML→JSON extraction quality LLM-as-Judge (Gemini 2.5 Pro), 1–5 scale 4.64 GPT-4.1: 4.74
SimpleQA factuality (web retrieval + extraction) Accuracy 82.87% Gemini 2.5 Flash: 80.61%
SimpleQA factuality (paired w/ GPT-4.1) 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 ~128K tokens.
  • Frontier-level quality, competitive with much larger general-purpose models on HTML→JSON extraction at a fraction of the cost.
  • 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-8b.

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

💻 Quick Start

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

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

Example extraction prompt:

ollama run richardyoung/schematron-8b: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 (4.9GB) ~5 GB ~8 GB
iq4_xs (4.5GB) ~5 GB ~7 GB
  • Ollama installed.
  • Long-context extraction uses more memory as input grows toward 128K tokens; size headroom for your typical page length.
  • Runs on CPU; GPU/Metal acceleration recommended for throughput.

🔧 Technical Details

  • Architecture: Llama 3.1 family (decoder-only transformer)
  • Base model: Meta Llama 3.1-8B-Instruct
  • Finetune: inference-net/Schematron-8B
  • Parameters: ~8B
  • 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.1 Community License (inherited from the base model).


Built & maintained by Richard Young · DeepNeuro