Text Generation
MLX
Safetensors
English
information-extraction
structured-output
json
small-language-model
apple-silicon
from-scratch
post-training
research
Instructions to use OpenSML/OpenSML-JSONLite-175M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use OpenSML/OpenSML-JSONLite-175M with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("OpenSML/OpenSML-JSONLite-175M") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use OpenSML/OpenSML-JSONLite-175M with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "OpenSML/OpenSML-JSONLite-175M" --prompt "Once upon a time"
- Atomic Chat
Label prompt instruction and wrap its text for readability
Browse files- README.md +6 -4
- SHA256SUMS +1 -1
README.md
CHANGED
|
@@ -65,11 +65,13 @@ Supply source text and a flat object JSON Schema with 1–8 required properties
|
|
| 65 |
|
| 66 |
## Verified source/schema/output examples
|
| 67 |
|
| 68 |
-
These four observed examples are checked against the selected model and standalone runner. They demonstrate successes within a limited research scope; other requests can fail.
|
| 69 |
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
|
|
|
|
|
|
| 73 |
|
| 74 |
The user message is the instruction, a blank line, then compact `{"source_text":<query>,"schema":<schema>}`. No expected answer is included.
|
| 75 |
|
|
|
|
| 65 |
|
| 66 |
## Verified source/schema/output examples
|
| 67 |
|
| 68 |
+
These four observed examples are checked against the selected model and standalone runner. They demonstrate successes within a limited research scope; other requests can fail.
|
| 69 |
|
| 70 |
+
### Prompt instruction
|
| 71 |
+
|
| 72 |
+
The inference runner automatically includes this exact prompt instruction with every request:
|
| 73 |
+
|
| 74 |
+
> Extract information from the supplied source_text according to the supplied JSON Schema. Return exactly one JSON object, with no explanation or Markdown. Copy values exactly, preserving case and spelling; do not normalize dates or numbers. Include every required key and no other keys. For string arrays, include all matching source spans in source order, or [] when absent. For nullable strings, use the exact source span or null when absent.
|
| 75 |
|
| 76 |
The user message is the instruction, a blank line, then compact `{"source_text":<query>,"schema":<schema>}`. No expected answer is included.
|
| 77 |
|
SHA256SUMS
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
74a074f90bd5e7a26d5f6cd5757ddc1fbfcc72e259e0b23a210fa48d91b35fdb JSONLITE_RESULTS.json
|
| 5 |
c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSE
|
| 6 |
f53194e53a2af5ec857337e8213397ea4f81a7e02d2dbcf0384a00cf1cf7f76f PACKAGING_VERIFICATION.json
|
| 7 |
-
|
| 8 |
5ee8f11f0e87becf1a29c44e2b0f3dacc2c779712b635558be57dd7ef44455d3 RUN_GUIDE.md
|
| 9 |
c6191baf937bce61f1b747acfbcb975a17eef6e8a598682a751a1031d1cfee23 SOURCE_NOTICE.md
|
| 10 |
6088771ab13fa1080c0ca0f31649deb9f417597d7c2055b0f388e86f41f2c415 TECHNICAL_REPORT.md
|
|
|
|
| 4 |
74a074f90bd5e7a26d5f6cd5757ddc1fbfcc72e259e0b23a210fa48d91b35fdb JSONLITE_RESULTS.json
|
| 5 |
c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSE
|
| 6 |
f53194e53a2af5ec857337e8213397ea4f81a7e02d2dbcf0384a00cf1cf7f76f PACKAGING_VERIFICATION.json
|
| 7 |
+
109004f107cec1aeefd8653b29194d344caca6891cff50cf0e75739438dd3bea README.md
|
| 8 |
5ee8f11f0e87becf1a29c44e2b0f3dacc2c779712b635558be57dd7ef44455d3 RUN_GUIDE.md
|
| 9 |
c6191baf937bce61f1b747acfbcb975a17eef6e8a598682a751a1031d1cfee23 SOURCE_NOTICE.md
|
| 10 |
6088771ab13fa1080c0ca0f31649deb9f417597d7c2055b0f388e86f41f2c415 TECHNICAL_REPORT.md
|