Instructions to use FahrenheitResearch/FR-Lex-1.7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use FahrenheitResearch/FR-Lex-1.7B 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("FahrenheitResearch/FR-Lex-1.7B") 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 FahrenheitResearch/FR-Lex-1.7B with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "FahrenheitResearch/FR-Lex-1.7B"
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": "FahrenheitResearch/FR-Lex-1.7B" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use FahrenheitResearch/FR-Lex-1.7B 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 "FahrenheitResearch/FR-Lex-1.7B"
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 FahrenheitResearch/FR-Lex-1.7B
Run Hermes
hermes
- MLX LM
How to use FahrenheitResearch/FR-Lex-1.7B with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "FahrenheitResearch/FR-Lex-1.7B"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "FahrenheitResearch/FR-Lex-1.7B" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FahrenheitResearch/FR-Lex-1.7B", "messages": [ {"role": "user", "content": "Hello"} ] }'
FR-Lex-1.7B
A Thin Language Model for law. Grounded, jurisdiction-aware, and running on your laptop.
GROUNDED. JURISDICTIONAL. LOCAL.
Contents
Overview
FR-Lex-1.7B is a Thin Language Model (TLM) for law, by Fahrenheit Research. Sibling to FR-Forge (manufacturing). It is a small, 4-bit, MLX model fine-tuned with LoRA adapters on a balanced, multi-jurisdiction legal corpus, designed to run locally on Apple Silicon.
It is built to process legal text you give it, not to recall case law from memory. Version 0.3 covers the United States and Australia as primary jurisdictions, adds experimental German support that works well, and includes Swedish on a limited, best-effort basis.
Where a Thin Language Model fits
specialization
▲
│ ● FR-Lex 1.7B
│ narrow · local · cheap
│
│ ● Frontier LLM
│ broad · hosted · costly
└──────────────────────────────────────────────▶ generality
How it works
FR-Lex runs standalone for narrow legal tasks, or as a Lens that sits in front of a larger general LLM, enriching a query before the expensive computation.
Court document / legal query
│
▼
┌─────────────────────────────────────────────────────┐
│ FR-Lex 1.7B │
└─────────────────────────────────────────────────────┘
│
┌────────┴─────────┐
▼ ▼
STANDALONE LENS (enrich, then route)
│ │
├─ summarize ├─ detect jurisdiction
├─ extract holding ├─ extract citations
├─ spot issues └─▶ Frontier LLM (expensive reasoning)
└─ explain plainly
│
▼
Grounded, local answer (supply the source text for factual output)
It is an assistant, not a certified authority. It is not a substitute for a licensed attorney or the controlling law.
Specifications
| Base | Qwen3-1.7B (4-bit, MLX) |
| Parameters | 1.7B · 4-bit |
| Method | LoRA adapters, fused |
| Runtime | MLX (Apple Silicon) |
| Languages | English · German (experimental); Swedish (limited) — answers in source language |
| Version | 0.3 |
| License | Apache-2.0 |
Quickstart
Runs locally with MLX on Apple Silicon. Supply the source text as context for factual output.
pip install -U mlx-lm
python3 -m mlx_lm generate \
--model FahrenheitResearch/FR-Lex-1.7B \
--max-tokens 400 \
--prompt "Summarize the holding of the following case:
<paste judgment text>"
from mlx_lm import load, generate
model, tok = load("FahrenheitResearch/FR-Lex-1.7B")
prompt = "Summarize the holding of the following case:\n\n<paste judgment text>"
print(generate(model, tok, prompt=prompt, max_tokens=400))
Pin a specific release with load("FahrenheitResearch/FR-Lex-1.7B", revision="v0.3").
Intended use
Grounded legal-text processing over court documents:
FR-Lex covers
├─ Grounded summarization condense judgments and filings
├─ Holding extraction isolate the operative ruling
├─ Issue spotting flag the legal questions at stake
├─ Plain-language explanation translate legalese for non-lawyers
└─ Citation extraction pull and normalize references
Best results come from supplying the source text as context.
Coverage
Jurisdiction maturity (qualitative tiers, not a benchmark)
United States ████████████████████ primary · strongest
Australia ████████████████████ primary · strongest
Germany ██████████████░░░░░░ experimental · works well (answers in German)
Sweden ██████░░░░░░░░░░░░░░ limited · best-effort
India ████░░░░░░░░░░░░░░░░ pipeline only (not in weights)
UAE ████░░░░░░░░░░░░░░░░ pipeline only (not in weights)
- United States, Australia — primary, strongest quality.
- Germany — experimental but reliable; answers in German.
- Sweden — limited / best-effort. Openly licensed Swedish domestic case law is scarce (the available corpus is largely EU translations), so Swedish output is the weakest and can be rough. Use with caution.
- India, UAE — supported in the pipeline (citation and jurisdiction detection) but not yet in these trained weights.
Limitations
Not legal advice. Outputs are legal information for research and drafting assistance only. Consult a licensed attorney.
- European coverage is uneven. German is experimental but reliable; Swedish is limited and often rough, bottlenecked by the scarcity of openly licensed Swedish domestic case law. India and the UAE are in the pipeline but not yet in these trained weights.
- Not a knowledge base. Ungrounded recall will confabulate; always supply the source text for factual output.
- Small model. For anything that must be exact (clause text, citation strings), verify against the controlling source.
Training
Multi-jurisdiction legal corpus ─┐
US caselaw (CAP / Common Pile) │
Open Australian Legal Corpus ├─▶ LoRA fine-tune (MLX) ─▶ fuse adapters ─▶ FR-Lex 1.7B
German court decisions (OLD) │ balanced; German/Swedish upweighted
Swedish SweLaw corpus ─┘
Base, method, data, and targets
- Base model:
mlx-community/Qwen3-1.7B-4bit(Qwen3 architecture, 4-bit), fine-tuned with LoRA via MLX on Apple Silicon. - Data, by source license:
- Public-domain US caselaw — Caselaw Access Project via the Common Pile.
- Open Australian Legal Corpus — CC BY 4.0.
- German court decisions — Open Legal Data, MIT.
- Swedish SweLaw corpus — CC0 (filtered toward domestic decisions; limited).
- Balanced across jurisdictions, with German and Swedish upweighted in v0.3.
- Targets: teacher-distilled summaries, holdings, issues, and plain-language explanations; rule-based citation targets.
Citation
Apache-2.0. Base model mlx-community/Qwen3-1.7B-4bit is Apache-2.0. Built on Qwen3 (Alibaba Cloud, Apache 2.0). Training data per source licenses; see the project repository for full attribution.
@software{fr_lex_2026,
title = {FR-Lex-1.7B: a thin language model for law},
author = {Fahrenheit Research},
year = {2026},
note = {Fine-tuned from Qwen3-1.7B (4-bit) with MLX/LoRA}
}
FAHRENHEIT RESEARCH
Thin Language Models for specialized domains.
- Downloads last month
- 138
4-bit