SELMA โ€” Specified Encapsulated Limitless Memory Archive

"Justice will not be served until those who are unaffected are as outraged as those who are." โ€” Benjamin Franklin

An open-source LoRA adapter trained for law enforcement.

SELMA is a QLoRA adapter on top of Meta Llama 3.3 70B Instruct. Given an incident description or fact pattern, it identifies potentially applicable federal and state criminal statutes, breaks each offense into its elements, maps those elements to the facts at hand, and shows its reasoning in plain language โ€” so the officer can evaluate the analysis rather than accept it.

SELMA was built on the conviction that good tools should be open, accountable, and freely available to every agency regardless of budget. It does not replace prosecutors, attorneys, or judicial review; it is a force-multiplier for the investigator who needs a place to start.


Model Details

Field Value
Base Model meta-llama/Llama-3.3-70B-Instruct
Adapter Type LoRA (QLoRA)
LoRA Rank / Alpha / Dropout 64 / 128 / 0.05
Target Modules q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
Task Statute identification, element analysis, charge classification
Training Method QLoRA supervised fine-tuning via SFTTrainer (trl)
License Apache 2.0 (adapter weights)
Maintainer Ronin48LLC

Capabilities

Given an incident description, SELMA can:

  1. Statute Identification โ€” which federal and/or state criminal statutes may have been violated, cited by title, chapter, and section
  2. Element Analysis โ€” the elements of each identified offense, mapped to specific facts in the incident
  3. Charge Classification โ€” felony/misdemeanor, degree, jurisdiction, mandatory minimums and maximums
  4. Legal Reasoning โ€” transparent chain-of-thought explaining why each statute applies or does not
  5. Cross-Reference โ€” related statutes, lesser included offenses, concurrent jurisdiction, federal/state overlap

Jurisdictions: U.S. Code Title 18 as the federal baseline, with state criminal codes layered on top. Priority states: Georgia (O.C.G.A. Title 16), California, Texas, New York, Florida.


Constitutional Override

The U.S. Constitution is the supreme law of the land, and SELMA is trained to know it. No statute, regulation, or agency policy overrides the Bill of Rights. Where SELMA identifies a potential charge that implicates constitutional protections โ€” an unlawful search, a coerced confession, a due process violation โ€” it says so plainly:

โš  CONSTITUTIONAL CONCERN โ€” evidence obtained through this method may be subject to suppression under the [Amendment]. SELMA recommends consulting with the prosecuting attorney before charging.

This is not a limitation. It is the feature.


Intended Use

For sworn law enforcement officers, detectives, and special agents:

  • Identifying potential charges from the facts of an incident
  • Understanding offense elements for report writing and probable-cause affidavits
  • Preliminary research on unfamiliar statutes
  • Training and scenario-based learning

SELMA outputs must be reviewed by a prosecutor or attorney before use in charging documents, arrest affidavits, or court filings.

Limitations

Read LIMITATIONS.md before deploying in any operational context. In short:

  • SELMA is not a licensed attorney; its outputs are not legal advice.
  • It has a training-data cutoff and cannot reflect later legislation or case law.
  • It does not model prosecutorial discretion, local diversion programs, or municipal ordinances.
  • It may reflect one federal circuit's view without flagging a split.
  • It works only from what you tell it, and it can hallucinate statute numbers and case citations โ€” verify every citation against a primary source.

Usage

This is a PEFT LoRA adapter. Load it on top of the base model:

from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

base_model = AutoModelForCausalLM.from_pretrained(
    "meta-llama/Llama-3.3-70B-Instruct",
    load_in_4bit=True,
    device_map="auto",
)
model = PeftModel.from_pretrained(base_model, "Ronin48LLC/selma-lora-adapter")
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.3-70B-Instruct")

Note: Access to the base model requires accepting Meta's license on Hugging Face.

A prompt-only 8B stand-in (Llama 3.1 8B Instruct with SELMA's system prompt, no fine-tuning) is published as Ronin48LLC/selma.


Training

  • Framework: PyTorch + Transformers + TRL + PEFT, 4-bit quantized base
  • Adapter config: rank 64, alpha 128, dropout 0.05, all seven attention and MLP projections (see adapter_config.json)
  • Run details: training_args.bin is preserved in this repository; the step count and loss curve were not recorded in the upload

Training Data Sources

Source Description Size License
U.S. Code Title 18 Federal criminal statutes (USLM XML) ~2,700 sections Public Domain
O.C.G.A. Title 16 Georgia criminal code ~500 sections Fair Use
ALEA US Courts Federal court filings with NOS codes 491K examples Open
LegalBench Legal reasoning benchmark tasks 91.8K examples Open
CaseHOLD Legal holding classification 585K examples Open
Digital Forensics Case Law CFAA prosecutions, digital search and seizure ~5K opinions Public Domain
Synthetic Generated incident-to-statute mappings ~50K examples Apache 2.0

Related Models โ€” the Ronin 48 suite

Model Domain Use whenโ€ฆ
SELMA (this adapter) Law enforcement Statute identification, charge elements, constitutional flags
ATTICUS Public defense SELMA's counterpart โ€” every capability it gives law enforcement, in the hands of the public defender
ABBY Forensic investigation Digital and physical evidence, chain of custody, admissibility
BONES EMS Patient assessment, protocols, drug dosing, triage
BRUNO Fire service Fireground tactics, size-up, hazmat, extrication, ICS

Source

github.com/CryptoJones/SELMA โ€” training pipeline, data collection, multi-state architecture, OWASP evaluation.

License

Adapter weights: Apache 2.0 โ€” Copyright 2026 Ronin 48, LLC. Base model weights are subject to the Meta Llama 3.3 Community License.

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

Model tree for Ronin48LLC/selma-lora-adapter

Adapter
(443)
this model