Update README.md
Browse files
README.md
CHANGED
|
@@ -1,39 +1,40 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
language:
|
| 4 |
-
- en
|
| 5 |
-
base_model:
|
| 6 |
-
- Qwen/Qwen3-Embedding-8B
|
| 7 |
-
---
|
| 8 |
-
## LEXA-8B
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
}
|
|
|
|
| 39 |
```
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
base_model:
|
| 6 |
+
- Qwen/Qwen3-Embedding-8B
|
| 7 |
+
---
|
| 8 |
+
## LEXA-8B
|
| 9 |
+

|
| 10 |
+
👉 **LEXA-8B**: LEXA: Legal Case Retrieval via Graph Contrastive Learning with Contextualised LLM Embeddings. More information is available in [**arXiv**](https://arxiv.org/abs/2405.11791) & [**GitHub**](https://github.com/yanran-tang/CaseGNN).
|
| 11 |
+
|
| 12 |
+
## Example Usage
|
| 13 |
+
|
| 14 |
+
```python
|
| 15 |
+
from transformers import AutoModel, AutoTokenizer
|
| 16 |
+
model = AutoModel.from_pretrained("AnnaStudy/LEXA-8B", torch_dtype="auto", device_map="auto")
|
| 17 |
+
tokenizer = AutoTokenizer.from_pretrained("AnnaStudy/LEXA-8B")
|
| 18 |
+
case_txt = "The following contains key components of a legal case. Legal facts..."
|
| 19 |
+
tokenized = tokenizer(case_txt, return_tensors='pt', padding=True, truncation=True, max_length=2048)
|
| 20 |
+
outputs = model(**tokenized)
|
| 21 |
+
case_embedding = outputs.last_hidden_state[:, -1]
|
| 22 |
+
```
|
| 23 |
+
## Base Model
|
| 24 |
+
|
| 25 |
+
ReaKase-8B is finetuned from **Qwen3-Embedding-8B**, which provides the underlying semantic representation capability.
|
| 26 |
+
|
| 27 |
+
Reference: [Qwen/Qwen3-Embedding-8B](https://huggingface.co/Qwen/Qwen3-Embedding-8B)
|
| 28 |
+
|
| 29 |
+
## Cite
|
| 30 |
+
If you find this repo useful, please cite
|
| 31 |
+
```
|
| 32 |
+
@article
|
| 33 |
+
{LEXA-8B,
|
| 34 |
+
author = {Yanran Tang, Ruihong Qiu, Xue Li, Zi Huang},
|
| 35 |
+
title = {LEXA: Legal Case Retrieval via Graph Contrastive Learning with Contextualised LLM Embeddings},
|
| 36 |
+
journal = {CoRR},
|
| 37 |
+
volume = {abs/2405.11791},
|
| 38 |
+
year = {2025}
|
| 39 |
+
}
|
| 40 |
```
|