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
Finalize source archive, report links and integrity manifests
Browse files- PACKAGING_VERIFICATION.json +1 -1
- SHA256SUMS +4 -4
- TECHNICAL_REPORT.md +5 -5
- inference.py +1 -1
- native_bundle.zip +2 -2
PACKAGING_VERIFICATION.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
"weight_file": "model.safetensors",
|
| 6 |
"weight_bytes": 351242342,
|
| 7 |
"weight_sha256": "781597baeb9b51d535fc27cd6f941dbc202e01d62c8d963587a3f3d565128560",
|
| 8 |
-
"native_bundle_sha256": "
|
| 9 |
"runtime": "stock MLX 0.32.3; Apple Silicon; Python 3.11",
|
| 10 |
"requests": 60,
|
| 11 |
"raw_runtime_matches": 60,
|
|
|
|
| 5 |
"weight_file": "model.safetensors",
|
| 6 |
"weight_bytes": 351242342,
|
| 7 |
"weight_sha256": "781597baeb9b51d535fc27cd6f941dbc202e01d62c8d963587a3f3d565128560",
|
| 8 |
+
"native_bundle_sha256": "c54fd408f6b7ec0c6e80377ee8b6eeffe3bfbf76389e56fdad4c78f54828e2d1",
|
| 9 |
"runtime": "stock MLX 0.32.3; Apple Silicon; Python 3.11",
|
| 10 |
"requests": 60,
|
| 11 |
"raw_runtime_matches": 60,
|
SHA256SUMS
CHANGED
|
@@ -3,19 +3,19 @@
|
|
| 3 |
9a4fb5f559d82ed0120a57139eb1e1c616bfdb18c39cca7b1e9bcab24ef968bc INFERENCE_VERIFICATION.json
|
| 4 |
74a074f90bd5e7a26d5f6cd5757ddc1fbfcc72e259e0b23a210fa48d91b35fdb JSONLITE_RESULTS.json
|
| 5 |
c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSE
|
| 6 |
-
|
| 7 |
2728c5efa01d9d59fb1def12a543980c300edcf557fabfa921b08dc0712e68cb README.md
|
| 8 |
5ee8f11f0e87becf1a29c44e2b0f3dacc2c779712b635558be57dd7ef44455d3 RUN_GUIDE.md
|
| 9 |
c6191baf937bce61f1b747acfbcb975a17eef6e8a598682a751a1031d1cfee23 SOURCE_NOTICE.md
|
| 10 |
-
|
| 11 |
e4e44da050abbd930748ec91731ddf1be16be83a4aa59bd8c4fc63478b384a03 THIRD_PARTY_NOTICES.md
|
| 12 |
663087d32872824f7f2fec425ad4054f308913c43da7c3f83521c7011967fdbe checkpoint_metadata.json
|
| 13 |
a365a7697b463bacc6e44e26d11a1e62d43d96b5d52c70c2e9df8d4513f86537 checkpoint_provenance.json
|
| 14 |
ecec6f191822d16a3da0b571fa129f5016e1243ca7d567de476a9d0e8ad66646 complete-request-exact.svg
|
| 15 |
981e02e7777980705770cacf19f16d76ea74e85e7edb018f875ddb4766afe19d config.json
|
| 16 |
-
|
| 17 |
781597baeb9b51d535fc27cd6f941dbc202e01d62c8d963587a3f3d565128560 model.safetensors
|
| 18 |
-
|
| 19 |
641fe860d6fd24547fe4d15bd852190f00ddec31bd74eb7ca9eeae74031c2f0c pretraining-training-loss.png
|
| 20 |
c7b1a3c0efb09ef3b5416a24072e48b25e2cc1f122fb5ed638c0f95b72594af9 requirements.txt
|
| 21 |
e095f0413a11fa91fbb58f37d00e4c6bcda59beb89b28f6f680db1436a7e8891 tokenizer.json
|
|
|
|
| 3 |
9a4fb5f559d82ed0120a57139eb1e1c616bfdb18c39cca7b1e9bcab24ef968bc INFERENCE_VERIFICATION.json
|
| 4 |
74a074f90bd5e7a26d5f6cd5757ddc1fbfcc72e259e0b23a210fa48d91b35fdb JSONLITE_RESULTS.json
|
| 5 |
c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSE
|
| 6 |
+
f53194e53a2af5ec857337e8213397ea4f81a7e02d2dbcf0384a00cf1cf7f76f PACKAGING_VERIFICATION.json
|
| 7 |
2728c5efa01d9d59fb1def12a543980c300edcf557fabfa921b08dc0712e68cb README.md
|
| 8 |
5ee8f11f0e87becf1a29c44e2b0f3dacc2c779712b635558be57dd7ef44455d3 RUN_GUIDE.md
|
| 9 |
c6191baf937bce61f1b747acfbcb975a17eef6e8a598682a751a1031d1cfee23 SOURCE_NOTICE.md
|
| 10 |
+
6088771ab13fa1080c0ca0f31649deb9f417597d7c2055b0f388e86f41f2c415 TECHNICAL_REPORT.md
|
| 11 |
e4e44da050abbd930748ec91731ddf1be16be83a4aa59bd8c4fc63478b384a03 THIRD_PARTY_NOTICES.md
|
| 12 |
663087d32872824f7f2fec425ad4054f308913c43da7c3f83521c7011967fdbe checkpoint_metadata.json
|
| 13 |
a365a7697b463bacc6e44e26d11a1e62d43d96b5d52c70c2e9df8d4513f86537 checkpoint_provenance.json
|
| 14 |
ecec6f191822d16a3da0b571fa129f5016e1243ca7d567de476a9d0e8ad66646 complete-request-exact.svg
|
| 15 |
981e02e7777980705770cacf19f16d76ea74e85e7edb018f875ddb4766afe19d config.json
|
| 16 |
+
8c0f0f5a91079699d090986d5d241385309b10579f34f271c02f05dca6ddd4bf inference.py
|
| 17 |
781597baeb9b51d535fc27cd6f941dbc202e01d62c8d963587a3f3d565128560 model.safetensors
|
| 18 |
+
c54fd408f6b7ec0c6e80377ee8b6eeffe3bfbf76389e56fdad4c78f54828e2d1 native_bundle.zip
|
| 19 |
641fe860d6fd24547fe4d15bd852190f00ddec31bd74eb7ca9eeae74031c2f0c pretraining-training-loss.png
|
| 20 |
c7b1a3c0efb09ef3b5416a24072e48b25e2cc1f122fb5ed638c0f95b72594af9 requirements.txt
|
| 21 |
e095f0413a11fa91fbb58f37d00e4c6bcda59beb89b28f6f680db1436a7e8891 tokenizer.json
|
TECHNICAL_REPORT.md
CHANGED
|
@@ -58,7 +58,7 @@ The same architecture is retained across pretraining and all inherited SFT stage
|
|
| 58 |
| FFN implementation | Packed Metal SwiGLU |
|
| 59 |
| Training CE implementation | Metal cross entropy, FP32 reductions |
|
| 60 |
|
| 61 |
-
Implementation evidence: [`model.py`](.
|
| 62 |
|
| 63 |
The base initialization is recorded as `normal-0.02-residual-scaled-v1`. Earlier OpenSML-150M **weights** were not used to initialize the base; its frozen tokenizer was reused.
|
| 64 |
|
|
@@ -102,7 +102,7 @@ Source weights below are intended processed-token sampling weights, not measured
|
|
| 102 |
|
| 103 |
Public source cards: [SmolLM corpus](https://huggingface.co/datasets/HuggingFaceTB/smollm-corpus/blob/3ba9d605774198c5868892d7a8deda78031a781f/README.md), [DCLM-Edu](https://huggingface.co/datasets/HuggingFaceTB/dclm-edu/blob/dbad8ad71224482740cd9c9d353591adbf62fe04/README.md), [FineWiki](https://huggingface.co/datasets/HuggingFaceFW/finewiki/blob/8bd13e72e6a002407649b3e898535f42ceb1aeb9/README.md). The Python-Edu upstream subset identifies files; this run used the configured text mirror. The mirror's pinned README could not be retrieved during report preparation, so its provenance statement here comes from the local corpus specification, not a newly completed external audit.
|
| 104 |
|
| 105 |
-
The exact corpus specification is [`configs/corpus_20b.json`](.
|
| 106 |
|
| 107 |
The content-split policy hashes identity into 10,000 buckets: 97% training, 1% validation, 1% final and 1% tokenizer development. Identity checks do not establish that a supervised benchmark article never appeared elsewhere in pretraining web data.
|
| 108 |
|
|
@@ -168,9 +168,9 @@ The four inherited foundation stages remain unchanged: grounded evidence QA (15,
|
|
| 168 |
|
| 169 |
The native JSON foundation has 12,115 distinct SNIPS TRAIN requests, with 12,115 canonical string-array schemas, 1,443 renamed-key views and 1,442 nullable-string views. Source text, field definitions and the complete schema are input; complete JSON and stop tokens are the assistant target. Original CC0 SNIPS chunk annotations provide source spans. Metadata fidelity and schema validation do not establish perfect semantic annotation. Frozen tokenizer and architecture are unchanged.
|
| 170 |
|
| 171 |
-
###
|
| 172 |
|
| 173 |
-
This completed continuation starts from the native JSON foundation. It adds matched zero/one/two/three-value supervision for artists and cities, including zero-primary-value cases where an album or country is explicitly present. It retains original JSON TRAIN replay and adds frozen-parent distribution distillation on replay assistant tokens. Every model batch has 24 replay and 8 new views.
|
| 174 |
|
| 175 |
| Setting | Value |
|
| 176 |
|---|---|
|
|
@@ -188,7 +188,7 @@ This completed continuation starts from the native JSON foundation. It adds matc
|
|
| 188 |
| Weight decay / clipping |0.01 /1.0|
|
| 189 |
| Seed |20261119|
|
| 190 |
|
| 191 |
-
The
|
| 192 |
|
| 193 |
For every row, CE is averaged over supervised assistant tokens within each sequence, then averaged across sequences. On original TRAIN replay add 1.0×KL(frozen foundation || student), using the full 32,000-token distribution, temperature 1 and teacher-forced ground-truth histories. Only assistant JSON and turn/document-stop positions participate. The reference network is frozen/stop-gradient; new authored rows use CE alone. This regularizer is training-only: no teacher is needed for inference, and it does not guarantee retention or repair parent errors.
|
| 194 |
|
|
|
|
| 58 |
| FFN implementation | Packed Metal SwiGLU |
|
| 59 |
| Training CE implementation | Metal cross entropy, FP32 reductions |
|
| 60 |
|
| 61 |
+
Implementation evidence: [`model.py`](checkpoint_provenance.json), [`precision.py`](checkpoint_provenance.json), and the final bundle's `recipe.model` metadata. Weight count and file size are consistent with BF16 parameters plus the safetensors header. GPU allocation readings are not equivalent to file size, total process RSS or system RAM requirements.
|
| 62 |
|
| 63 |
The base initialization is recorded as `normal-0.02-residual-scaled-v1`. Earlier OpenSML-150M **weights** were not used to initialize the base; its frozen tokenizer was reused.
|
| 64 |
|
|
|
|
| 102 |
|
| 103 |
Public source cards: [SmolLM corpus](https://huggingface.co/datasets/HuggingFaceTB/smollm-corpus/blob/3ba9d605774198c5868892d7a8deda78031a781f/README.md), [DCLM-Edu](https://huggingface.co/datasets/HuggingFaceTB/dclm-edu/blob/dbad8ad71224482740cd9c9d353591adbf62fe04/README.md), [FineWiki](https://huggingface.co/datasets/HuggingFaceFW/finewiki/blob/8bd13e72e6a002407649b3e898535f42ceb1aeb9/README.md). The Python-Edu upstream subset identifies files; this run used the configured text mirror. The mirror's pinned README could not be retrieved during report preparation, so its provenance statement here comes from the local corpus specification, not a newly completed external audit.
|
| 104 |
|
| 105 |
+
The exact corpus specification is [`configs/corpus_20b.json`](checkpoint_provenance.json). Training preserves source text and code indentation. NFC/whitespace normalization is used for identity hashing and partitioning, not to rewrite model input.
|
| 106 |
|
| 107 |
The content-split policy hashes identity into 10,000 buckets: 97% training, 1% validation, 1% final and 1% tokenizer development. Identity checks do not establish that a supervised benchmark article never appeared elsewhere in pretraining web data.
|
| 108 |
|
|
|
|
| 168 |
|
| 169 |
The native JSON foundation has 12,115 distinct SNIPS TRAIN requests, with 12,115 canonical string-array schemas, 1,443 renamed-key views and 1,442 nullable-string views. Source text, field definitions and the complete schema are input; complete JSON and stop tokens are the assistant target. Original CC0 SNIPS chunk annotations provide source spans. Metadata fidelity and schema validation do not establish perfect semantic annotation. Frozen tokenizer and architecture are unchanged.
|
| 170 |
|
| 171 |
+
### Prior cardinality/replay extraction SFT
|
| 172 |
|
| 173 |
+
This completed continuation starts from the native JSON foundation. It adds matched zero/one/two/three-value supervision for artists and cities, including zero-primary-value cases where an album or country is explicitly present. It retains original JSON TRAIN replay and adds frozen-parent distribution distillation on replay assistant tokens. Every model batch has 24 replay and 8 new views. This is an inherited ancestor of the current main checkpoint.
|
| 174 |
|
| 175 |
| Setting | Value |
|
| 176 |
|---|---|
|
|
|
|
| 188 |
| Weight decay / clipping |0.01 /1.0|
|
| 189 |
| Seed |20261119|
|
| 190 |
|
| 191 |
+
The current weights inherit only this ancestor’s selected prefix; updates after that ancestor are not part of these weights. The endpoint's actual learning rate is recorded by the cosine schedule, not the planned final LR. Presentation counts include multiple schemas for the same text and do not mean distinct user queries.
|
| 192 |
|
| 193 |
For every row, CE is averaged over supervised assistant tokens within each sequence, then averaged across sequences. On original TRAIN replay add 1.0×KL(frozen foundation || student), using the full 32,000-token distribution, temperature 1 and teacher-forced ground-truth histories. Only assistant JSON and turn/document-stop positions participate. The reference network is frozen/stop-gradient; new authored rows use CE alone. This regularizer is training-only: no teacher is needed for inference, and it does not guarantee retention or repair parent errors.
|
| 194 |
|
inference.py
CHANGED
|
@@ -12,7 +12,7 @@ import tempfile
|
|
| 12 |
import zipfile
|
| 13 |
|
| 14 |
ROOT = Path(__file__).resolve().parent
|
| 15 |
-
BUNDLE_SHA256 = "
|
| 16 |
|
| 17 |
def main():
|
| 18 |
archive = ROOT / "native_bundle.zip"
|
|
|
|
| 12 |
import zipfile
|
| 13 |
|
| 14 |
ROOT = Path(__file__).resolve().parent
|
| 15 |
+
BUNDLE_SHA256 = "c54fd408f6b7ec0c6e80377ee8b6eeffe3bfbf76389e56fdad4c78f54828e2d1"
|
| 16 |
|
| 17 |
def main():
|
| 18 |
archive = ROOT / "native_bundle.zip"
|
native_bundle.zip
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c54fd408f6b7ec0c6e80377ee8b6eeffe3bfbf76389e56fdad4c78f54828e2d1
|
| 3 |
+
size 12831619
|