Sentence Similarity
sentence-transformers
Safetensors
greenleaf_embed
embeddings
legal
retrieval
feature-extraction
mteb
mleb
legal-tech
case-law
contracts
judicialmind
custom_code
Instructions to use judicialmind/greenleaf-law-embed-tiny with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use judicialmind/greenleaf-law-embed-tiny with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("judicialmind/greenleaf-law-embed-tiny", trust_remote_code=True) sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
| { | |
| "architectures": [ | |
| "GreenLeafEmbedModel" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "auto_map": { | |
| "AutoConfig": "configuration.GreenLeafEmbedConfig", | |
| "AutoModel": "modeling.GreenLeafEmbedModel" | |
| }, | |
| "bos_token_id": null, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 151643, | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 1024, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "layer_types": [ | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention" | |
| ], | |
| "max_position_embeddings": 32768, | |
| "max_window_layers": 28, | |
| "model_type": "greenleaf_embed", | |
| "num_attention_heads": 16, | |
| "num_hidden_layers": 28, | |
| "num_key_value_heads": 8, | |
| "pad_token_id": 151643, | |
| "rms_norm_eps": 1e-06, | |
| "rope_parameters": { | |
| "rope_theta": 1000000, | |
| "rope_type": "default" | |
| }, | |
| "sliding_window": null, | |
| "tie_word_embeddings": true, | |
| "transformers.js_config": { | |
| "use_external_data_format": { | |
| "model.onnx": 2, | |
| "model_q4.onnx": 1, | |
| "model_quantized.onnx": 1 | |
| } | |
| }, | |
| "transformers_version": "5.15.1", | |
| "use_bidirectional_attention": true, | |
| "use_cache": false, | |
| "use_sliding_window": false, | |
| "vocab_size": 151936 | |
| } | |