/ Модель

Характеристики

Контекст
4 096 токенов
Параметры
134 млн
Лицензия
CC BY 4.0
Архитектура
gpt_neox · dense
Библиотека
transformers
Опубликована
8 ноя 2024

kl3m-002-170m

Генерация текстаТекст → текст3 профессии

Компактная англоязычная модель GPT-NeoX для генерации текста в юридических, регуляторных и финансовых сценариях, а также для специализированного дообучения.

610скачиваний за 30 дней3лайкавеса обновлены28 сен 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

kl3m-002-170m — компактная языковая модель ALEA Institute, первоначально разработанная 273 Ventures и переданная институту. Она предназначена для юридических, регуляторных и финансовых рабочих процессов, а также для дообучения под специализированные задачи и использования при обучении более крупных моделей. Модель основана на плотной архитектуре GPT-NeoX с причинным языковым моделированием; метаданные указывают 134,2 млн параметров, а карточка округляет размер до 170 млн. Контекст составляет 4096 токенов. Модель работает с текстом, обучена преимущественно на английском языке и распространяется под лицензией CC-BY 4.0.

Среди подходящих сценариев — черновики положений договоров, базовые ответы на регуляторные вопросы и извлечение структурированных данных в JSON. Разработчик отмечает низкую токсичность и эффективность запуска на потребительском оборудовании; модель получила сертификацию Fairly Trained L-Certification за практики работы с обучающими данными. Она небольшая и не настроена на следование инструкциям, поэтому её возможности общего назначения ограничены. Юридические и регуляторные ответы могут быть фактически неверными и требуют проверки специалистом; модель не заменяет профессиональную юридическую консультацию.

Сценарии применения

  • черновики положений договоров
  • базовые ответы на вопросы о регулировании
  • извлечение данных из документов в JSON
  • дообучение модели для юридических текстов
  • подготовка текстовой основы для обучения более крупной модели

Ограничения

Окно контекста ограничено 4096 токенами, а небольшой размер и отсутствие настройки на инструкции ограничивают общие возможности модели. Юридические и регуляторные ответы могут содержать ошибки, поэтому их следует проверять со специалистом.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

kl3m-002-170m

kl3m-002-170m is a (very) small language model (SLM) trained on clean, legally-permissible data. Originally developed by 273 Ventures and donated to the ALEA Institute, kl3m-002-170m was the first LLM 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 instruction-aligned training data, kl3m-002-170m is best suited for use either in SLM fine-tuning or as part of training larger models without using unethical data or models.

Model Details

  • Architecture: GPT-NeoX (i.e., ~GPT-3 architecture)
  • Size: 170 million parameters
  • Hidden Size: 1024
  • Layers: 16
  • Attention Heads: 16
  • Key-Value Heads: 8
  • Intermediate Size: 1024
  • Max Sequence Length: 4,096 tokens (true size, no sliding window)
  • Tokenizer: kl3m-001-32k BPE tokenizer (32,768 vocabulary size with unorthodox whitespace handling)
  • Language(s): Primarily English
  • Training Objective: Next token prediction
  • Developed by: Originally by 273 Ventures LLC, donated to ALEA Institute
  • License: CC-BY 4.0
  • Hardware Requirements: Runs real-time in fp32 on MacBook Air M1

Use Cases

kl3m-002-170m 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

DatasetScore
Wiki19.58
CNN/Daily Mail11.20
Legal Domain2.31

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.
  • Low Toxicity: Empirically lower toxicity and bias
  • 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:

import json
from transformers import pipeline

# Load the model and tokenizer
p = pipeline('text-generation', 'alea-institute/kl3m-002-170m', device='cpu')

# Example usage on CPU
text = "Under this"
print(
    json.dumps(
        [
            r.get("generated_text")
            for r in p(text, do_sample=True, temperature=0.5, num_return_sequences=3, max_new_tokens=32)
        ], 
        indent=2
    )
)
[
  "Under this proposed rule, the Federal agency must determine the effect on State, local, and",
  "Under this proposed rule, we are proposing to amend the definition of \u201ccovered product\u201d in ",
  "Under this proposed rule, the FAA is considering issuing this proposed rule after evaluating the information"
]

Contract Example

text = "Governing Law.\n"
print(
    json.dumps(
        [
            r.get("generated_text")
            for r in p(text, do_sample=True, temperature=0.3, num_return_sequences=3, max_new_tokens=32)
        ], 
        indent=2
    )
)
[
  "Governing Law.\n The provisions of the Plan shall be construed and enforced in accordance with",
  "Governing Law.\n The laws of the State of Delaware shall govern the validity, construction, and",
  "Governing Law.\n The laws of the State of New York shall govern the validity, construction, enforcement"
]

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 November 2023 and January 2024 on a 12xRTX4090 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.

https://github.com/alea-institute/kl3m-data

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-002-170m 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 small, efficient language models

Special Tokens

kl3m-002-170m uses the following special tokens:

  • <s> (ID: 0): Beginning of sequence token (BOS)
  • </s> (ID: 1): End of sequence token (EOS)
  • <pad> (ID: 2): Padding token

Limitations

  • Limited to a 4,096 token context window
  • As a small language model (170M 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
  • While trained on ethically sourced data, users should verify outputs for accuracy and appropriateness

Source

https://github.com/alea-institute/kl3m-model-research

References

Citation

@misc{kl3m-002-170m,
  author = {ALEA Institute},
  title = {kl3m-002-170m: A Small Language Model for Legal and Regulatory Text},
  year = {2024},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co/alea-institute/kl3m-002-170m}}
}

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:

logo

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
GPTNeoXForCausalLM
Ревизия весов
04eb705

0 моделей