Upload Maaza-SLM-360M-JSON-v1 - v1.0.0 production release
Browse files
README.md
CHANGED
|
@@ -183,6 +183,29 @@ Output:
|
|
| 183 |
- **Format**: JSON mode enforced
|
| 184 |
- **Platform**: CUDA (GPU) or CPU
|
| 185 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
## Limitations and Bias
|
| 187 |
|
| 188 |
### Known Limitations
|
|
@@ -206,6 +229,12 @@ Output:
|
|
| 206 |
- **Transparency**: 100% open training methodology, reproducible results
|
| 207 |
- **Accessibility**: Apache 2.0 license enables free commercial use
|
| 208 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 209 |
## How to Use
|
| 210 |
|
| 211 |
### Installation
|
|
|
|
| 183 |
- **Format**: JSON mode enforced
|
| 184 |
- **Platform**: CUDA (GPU) or CPU
|
| 185 |
|
| 186 |
+
### JSON Validation
|
| 187 |
+
|
| 188 |
+
After generation, validate the output:
|
| 189 |
+
|
| 190 |
+
```python
|
| 191 |
+
import json
|
| 192 |
+
from jsonschema import validate # pip install jsonschema
|
| 193 |
+
|
| 194 |
+
# Decode model output
|
| 195 |
+
output = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 196 |
+
|
| 197 |
+
# Parse JSON
|
| 198 |
+
try:
|
| 199 |
+
obj = json.loads(output)
|
| 200 |
+
# Validate against schema
|
| 201 |
+
validate(instance=obj, schema=your_json_schema)
|
| 202 |
+
print("✅ Valid JSON matching schema")
|
| 203 |
+
except json.JSONDecodeError:
|
| 204 |
+
print("❌ Invalid JSON")
|
| 205 |
+
except jsonschema.exceptions.ValidationError as e:
|
| 206 |
+
print(f"❌ Schema validation failed: {e.message}")
|
| 207 |
+
```
|
| 208 |
+
|
| 209 |
## Limitations and Bias
|
| 210 |
|
| 211 |
### Known Limitations
|
|
|
|
| 229 |
- **Transparency**: 100% open training methodology, reproducible results
|
| 230 |
- **Accessibility**: Apache 2.0 license enables free commercial use
|
| 231 |
|
| 232 |
+
## Links
|
| 233 |
+
|
| 234 |
+
- **EdgeJSON Benchmark**: [GitHub Repository](https://github.com/CycleCore/SLMBench) (evaluation harness & dataset)
|
| 235 |
+
- **Technical Documentation**: [SLMBench Docs](https://github.com/CycleCore/SLMBench/tree/main/benchmarks/edge_json)
|
| 236 |
+
- **Model Card (135M)**: [Maaza-MLM-135M-JSON](https://huggingface.co/CycleCoreTechnologies/Maaza-MLM-135M-JSON-v1)
|
| 237 |
+
|
| 238 |
## How to Use
|
| 239 |
|
| 240 |
### Installation
|