L

Lsg Legal Small Uncased 4096

Developed by ccdv
A compact version of LEGAL-BERT, employing Local+Sparse+Global attention mechanism (LSG) for efficient long-sequence processing
Downloads 1,088
Release Time : 3/2/2022

Model Overview

This model is a compact version of LEGAL-BERT, specifically optimized for processing long legal text sequences. It utilizes an innovative Local+Sparse+Global attention mechanism (LSG), outperforming traditional long-sequence models like Longformer or BigBird in both speed and performance.

Model Features

Efficient Long-Sequence Processing
Utilizes LSG attention mechanism to efficiently process sequences up to 4096 tokens, outperforming traditional long-sequence models
Flexible Configuration
Supports adjustment of global tokens, block size, sparse factor, and other parameters to adapt to different task requirements
Multiple Sparse Patterns
Offers 6 sparse selection types (bos_pooling/norm/pooling/lsh/stride/block_stride) for different scenarios
Adaptive Padding
Automatically pads sequences shorter than block size, recommended to be used with tokenizer truncation and padding functions

Model Capabilities

Long text processing
Legal text analysis
Masked language modeling
Sequence classification

Use Cases

Legal Text Processing
Legal Document Classification
Automatic classification of lengthy legal documents
Capable of processing document sequences up to 4096 tokens
Legal Term Prediction
Predicting missing terms in legal texts
Examples demonstrate accurate prediction of terms like 'capital' and 'happiness'
General NLP Tasks
Long Text Classification
Handling classification tasks requiring long-context understanding
Model outputs include classification logits
Featured Recommended AI Models
AIbase
Empowering the Future, Your AI Solution Knowledge Base
Š 2025AIbase