Update README.md
Browse files
README.md
CHANGED
@@ -20,7 +20,7 @@ model-index:
|
|
20 |
|
21 |
# LexSG - Singapore Legal Assistant Model
|
22 |
|
23 |
-
A specialized AI assistant trained on Singapore statutes and
|
24 |
|
25 |
## Model Details
|
26 |
|
@@ -64,6 +64,7 @@ The model can be integrated into legal research tools, educational platforms, or
|
|
64 |
## Bias, Risks, and Limitations
|
65 |
|
66 |
- **Training data limitations:** Responses are based on training data and may not reflect the most recent legal changes
|
|
|
67 |
- **Legal complexity:** Legal interpretations can be highly context-dependent and nuanced
|
68 |
- **Professional consultation required:** Complex legal matters require consultation with qualified legal professionals
|
69 |
- **Potential biases:** May reflect biases present in legal training data
|
@@ -74,14 +75,15 @@ Users should be made aware of the risks, biases and limitations of the model. Al
|
|
74 |
|
75 |
## How to Get Started with the Model
|
76 |
|
77 |
-
### Ollama
|
78 |
|
79 |
-
-
|
80 |
-
|
81 |
-
- The model file `llama-3.1-8b-lexsg-q4_k_m.gguf` in the same directory
|
82 |
|
83 |
### Running the Model
|
84 |
|
|
|
|
|
85 |
1. Build the model from the Modelfile:
|
86 |
```bash
|
87 |
ollama create lexsg -f Modelfile
|
@@ -127,9 +129,6 @@ The model was fine-tuned on Singapore legal documents and statutes, including bu
|
|
127 |
- **Context length:** 4,096 tokens
|
128 |
- **Max generation:** 1,024 tokens
|
129 |
|
130 |
-
## Evaluation
|
131 |
-
|
132 |
-
[Add evaluation results if available]
|
133 |
|
134 |
## Technical Specifications
|
135 |
|
@@ -143,28 +142,22 @@ The model was fine-tuned on Singapore legal documents and statutes, including bu
|
|
143 |
- **Memory requirements:** ~6GB RAM recommended for inference
|
144 |
- **Platform support:** Cross-platform via Ollama
|
145 |
|
146 |
-
###
|
|
|
|
|
147 |
|
148 |
-
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
- Repeat penalty: 1.1 (reduces repetition)
|
153 |
|
154 |
## Model Card Authors
|
155 |
|
156 |
Chang Sau Sheong
|
157 |
|
158 |
-
## Glossary
|
159 |
-
|
160 |
-
- **Legal Assistant:** AI system designed to help with legal information and document understanding
|
161 |
-
- **Singapore Law:** Legal framework and statutes specific to Singapore jurisdiction
|
162 |
-
- **Quantization:** Model compression technique to reduce size while maintaining performance
|
163 |
-
|
164 |
## More Information
|
165 |
|
166 |
-
For more details about Singapore
|
167 |
-
- [Singapore Statutes Online](https://sso.agc.gov.sg/)
|
168 |
|
169 |
---
|
170 |
|
|
|
20 |
|
21 |
# LexSG - Singapore Legal Assistant Model
|
22 |
|
23 |
+
A specialized AI assistant trained on Singapore statutes and subsidiary legislation, built on the Llama 3.1 8B Instruct architecture and optimized for legal text generation.
|
24 |
|
25 |
## Model Details
|
26 |
|
|
|
64 |
## Bias, Risks, and Limitations
|
65 |
|
66 |
- **Training data limitations:** Responses are based on training data and may not reflect the most recent legal changes
|
67 |
+
- **Legislation only:** Training data is Singapore statutes and subsidiary legislation only, without any Singapore legal cases
|
68 |
- **Legal complexity:** Legal interpretations can be highly context-dependent and nuanced
|
69 |
- **Professional consultation required:** Complex legal matters require consultation with qualified legal professionals
|
70 |
- **Potential biases:** May reflect biases present in legal training data
|
|
|
75 |
|
76 |
## How to Get Started with the Model
|
77 |
|
78 |
+
### llama.cpp/Ollama
|
79 |
|
80 |
+
The model file `llama-3.1-8b-lexsg-q4_k_m.gguf` is formatted in GGUF and can be used in any llama.cpp compatible library or application.
|
81 |
+
Specifically it has been tested in Ollama [Ollama](https://ollama.com/), with the given Modelfile
|
|
|
82 |
|
83 |
### Running the Model
|
84 |
|
85 |
+
To use this with Ollama:
|
86 |
+
|
87 |
1. Build the model from the Modelfile:
|
88 |
```bash
|
89 |
ollama create lexsg -f Modelfile
|
|
|
129 |
- **Context length:** 4,096 tokens
|
130 |
- **Max generation:** 1,024 tokens
|
131 |
|
|
|
|
|
|
|
132 |
|
133 |
## Technical Specifications
|
134 |
|
|
|
142 |
- **Memory requirements:** ~6GB RAM recommended for inference
|
143 |
- **Platform support:** Cross-platform via Ollama
|
144 |
|
145 |
+
### Inference parameters
|
146 |
+
|
147 |
+
The following are the inference parameters in the model file. You can change it accordingly.
|
148 |
|
149 |
+
- Temperature: 0.3 (conservative, factual responses)
|
150 |
+
- Top-p: 0.9 (nucleus sampling for quality)
|
151 |
+
- Top-k: 40 (controlled vocabulary selection)
|
152 |
+
- Repeat penalty: 1.1 (reduces repetition)
|
|
|
153 |
|
154 |
## Model Card Authors
|
155 |
|
156 |
Chang Sau Sheong
|
157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
## More Information
|
159 |
|
160 |
+
For more details about Singapore legislation, refer to [Singapore Statutes Online](https://sso.agc.gov.sg/)
|
|
|
161 |
|
162 |
---
|
163 |
|