Instructions to use Ronin48LLC/selma-lora-adapter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Ronin48LLC/selma-lora-adapter with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.3-70B-Instruct") model = PeftModel.from_pretrained(base_model, "Ronin48LLC/selma-lora-adapter") - Transformers
How to use Ronin48LLC/selma-lora-adapter with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ronin48LLC/selma-lora-adapter") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Ronin48LLC/selma-lora-adapter", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Ronin48LLC/selma-lora-adapter with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ronin48LLC/selma-lora-adapter" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ronin48LLC/selma-lora-adapter", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Ronin48LLC/selma-lora-adapter
- SGLang
How to use Ronin48LLC/selma-lora-adapter with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Ronin48LLC/selma-lora-adapter" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ronin48LLC/selma-lora-adapter", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Ronin48LLC/selma-lora-adapter" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ronin48LLC/selma-lora-adapter", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Ronin48LLC/selma-lora-adapter with Docker Model Runner:
docker model run hf.co/Ronin48LLC/selma-lora-adapter
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:
- Statute Identification โ which federal and/or state criminal statutes may have been violated, cited by title, chapter, and section
- Element Analysis โ the elements of each identified offense, mapped to specific facts in the incident
- Charge Classification โ felony/misdemeanor, degree, jurisdiction, mandatory minimums and maximums
- Legal Reasoning โ transparent chain-of-thought explaining why each statute applies or does not
- 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.binis 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
Model tree for Ronin48LLC/selma-lora-adapter
Base model
meta-llama/Llama-3.1-70B