Updated readme Example Usage to point to notebook on GitHub
Browse files
README.md
CHANGED
|
@@ -19,34 +19,16 @@ This model converts legalese into short, human-readable summaries, based on data
|
|
| 19 |
|
| 20 |
## 💡 Example Usage
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
| 24 |
|
| 25 |
-
|
| 26 |
-
"FlamingNeuron/llama381binstruct_summarize_short_merged",
|
| 27 |
-
device_map="auto"
|
| 28 |
-
)
|
| 29 |
|
| 30 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
| 31 |
-
"FlamingNeuron/llama381binstruct_summarize_short_merged"
|
| 32 |
-
)
|
| 33 |
|
| 34 |
-
|
|
|
|
| 35 |
|
| 36 |
-
Please convert the following legal content into a short human-readable summary<|eot_id|><|start_header_id|>user<|end_header_id|>
|
| 37 |
|
| 38 |
-
[LEGAL_DOC]by using our services you agree to these terms...[END_LEGAL_DOC]<|eot_id|><|start_header_id|>assistant<|end_header_id|>"""
|
| 39 |
-
|
| 40 |
-
# Tokenize and move to GPU
|
| 41 |
-
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
|
| 42 |
-
|
| 43 |
-
# Generate model response
|
| 44 |
-
outputs = model.generate(**inputs, max_new_tokens=128)
|
| 45 |
-
|
| 46 |
-
# Decode and print result
|
| 47 |
-
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 48 |
-
|
| 49 |
-
```
|
| 50 |
## 🏋️ Training Procedure
|
| 51 |
|
| 52 |
This model was trained using **Supervised Fine-Tuning (SFT)** on legal document summaries using the [legal_summarization](https://github.com/lauramanor/legal_summarization) dataset. LoRA adapters were applied during training and merged afterward using `merge_and_unload()`.
|
|
|
|
| 19 |
|
| 20 |
## 💡 Example Usage
|
| 21 |
|
| 22 |
+
For complete setup instructions and working inference examples, see:
|
| 23 |
+
👉 [GitHub Repo: LLaMA3-demo](https://github.com/BQ31X/LLaMA3-demo)
|
| 24 |
|
| 25 |
+
[](https://colab.research.google.com/github/BQ31X/LLaMA3-demo/blob/main/FlamingNeuron_ModelTest_20250418.ipynb)
|
|
|
|
|
|
|
|
|
|
| 26 |
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
+
This model expects Meta-style structured prompts with two fields: `original_text` and `reference_summary`.
|
| 29 |
+
The `original_text` contains the input passage, and the model generates a summary in place of the empty `reference_summary`.
|
| 30 |
|
|
|
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
## 🏋️ Training Procedure
|
| 33 |
|
| 34 |
This model was trained using **Supervised Fine-Tuning (SFT)** on legal document summaries using the [legal_summarization](https://github.com/lauramanor/legal_summarization) dataset. LoRA adapters were applied during training and merged afterward using `merge_and_unload()`.
|