kl3m-003-1.7b is a small language model (SLM) trained on clean, legally-permissible data. Originally
developed by 273 Ventures and donated to the ALEA Institute,
kl3m-003-1.7b was part of the first LLM family to obtain the Fairly Trained L-Certification
for its ethical training data and practices. The model is designed for legal, regulatory, and financial workflows,
with a focus on low toxicity and high efficiency.
Given its small size and lack of training data for instruction alignment, kl3m-003-1.7b is best suited for use either in
SLM fine-tuning or as part of training larger models without using unethical data or models.
Hardware Requirements: Runs real-time in bf16 on consumer NV/AMD GPUs
Use Cases
kl3m-003-1.7b is particularly effective for:
Basic regulatory question answering
Contract provision drafting
Structured JSON information extraction
Foundation for downstream optimization
Base model for domain-specific fine-tuning
Performance
Perplexity Scores
Dataset
Score
Wiki
18.25
CNN/Daily Mail
9.61
Legal Domain
2.00
The model demonstrates particularly strong per-parameter performance on legal domain content, outperforming many
larger models as of its training data.
Key Features
Clean Training Data: Built on what was originally referred to as the Kelvin Legal DataPack, ensuring all training data is ethically sourced and legally permissible.
Enterprise Focus: Specifically designed for legal, regulatory, and financial workflows.
Efficient Deployment: Optimized for real-time inference on consumer hardware.
Usage
Basic usage for text generation:
python
1import json
2from transformers import pipeline
34# Load the model and tokenizer5p = pipeline('text-generation','alea-institute/kl3m-003-1.7b', device='cuda')67# Example usage on GPU8text ="Under this"9print(10 json.dumps(11[12 r.get("generated_text")13for r in p(text, do_sample=True, temperature=0.5, num_return_sequences=3, max_new_tokens=32)14],15 indent=216)17)
json
1[2"Under this section, any person who is a party to the proceeding may be required to file ",3"Under this subsection, the term **eligible entity** means a State, a political subdivision of ",4"Under this section, the Secretary shall— (1)\nmake a grant to the National Academy of Sc"5]
Contract Example
python
1text ="Governing Law. "2print(3 json.dumps(4[5 r.get("generated_text")6for r in p(text, do_sample=True, temperature=0.5, num_return_sequences=3, max_new_tokens=32)7],8 indent=29)10)
json
1[2"Governing Law. The validity, construction, enforcement and interpretation of this Agreement and of the War",3"Governing Law. This Agreement shall be governed by and construed in accordance with the laws of",4"Governing Law. This Agreement shall be governed by and construed and enforced in accordance"5]
Generation Parameters
The model supports various parameters to control the generation process:
temperature: Controls randomness (lower = more deterministic)
top_p: Nucleus sampling parameter (lower = more focused)
top_k: Limits vocabulary selection to top k tokens
max_new_tokens: Maximum number of tokens to generate
do_sample: Whether to use sampling vs. greedy decoding
num_return_sequences: Number of different sequences to generate
Training
The model was originally trained between January-February 2024 on an 8xA100-80G node in DDP. A similar model is
being provided with complete source and data replication as part of the kl3m-004 family to be released in Q4 2024.
The model implements several techniques during training:
Hybrid NTP and SFT cotraining
Dynamic, document-aware segmentation
Randomized padding
Traditional fixed-attention mechanisms
Training Data
While the original training data collection and training infrastructure relies on software that was not donated by
273 Ventures, ALEA Institute is open-sourcing an improved dataset, including both replication and an API.
Data is available upon request at this time via S3 under a Requester Pays model. We are actively working on a
zero-cost distribution model as soon as we can obtain additional support.
This model, the original kl3m-003-1.7b model, was trained on a US-only subset of the Kelvin Legal DataPack that
we believe is 100% public domain material. However, so as to enforce maximum transparency to all
downstream users in the event of any future determination otherwise, we are licensing this model under CC-BY 4.0.
Intended Usage
This model is intended for use in:
Legal and regulatory document processing systems
Contract drafting assistance
Financial and enterprise document workflows
Educational contexts for learning about domain-specific language models
Research on efficient language models for domain-specific applications
Special Tokens
kl3m-003-1.7b uses standard special tokens from the GPT-NeoX architecture.
Limitations
As a small language model (1.7B parameters), it has limited general knowledge
Not instruction-tuned or aligned with human preferences
May generate plausible-sounding but incorrect legal or regulatory text
Not a substitute for professional legal advice or domain expertise
Performance is optimized for legal and financial domains; general performance may be lower
Ethical Considerations
This model should not be used to generate legal advice without human expert review
The model may reflect biases present in the training data despite efforts to use clean data
Generated text should be reviewed by qualified professionals before use in formal legal contexts
While trained on ethically sourced data, users should verify outputs for accuracy and appropriateness
Additional tokenizer, dataset, and model publications are pending.
Citation
bibtex
1@misc{kl3m-003-1.7b,
2 author = {ALEA Institute},
3 title = {kl3m-003-1.7b: A Small Language Model for Legal and Regulatory Text},
4 year = {2024},
5 publisher = {Hugging Face},
6 howpublished = {\url{https://huggingface.co/alea-institute/kl3m-003-1.7b}}
7}
89@article{bommarito2025kl3m,
10 title={KL3M Tokenizers: A Family of Domain-Specific and Character-Level Tokenizers for Legal, Financial, and Preprocessing Applications},
11 author={Bommarito, Michael J and Katz, Daniel Martin and Bommarito, Jillian},
12 journal={arXiv preprint arXiv:2503.17247},
13 year={2025}
14}
License
This model was originally developed by 273 Ventures and has been donated to the ALEA Institute.
The model weights are released under the CC-BY 4.0 License.
Contact
The KL3M model family is now maintained by the ALEA Institute. For technical support, collaboration opportunities, or general inquiries: