Text Generation
MLX
Safetensors
English
small-language-model
from-scratch
conversational
apple-silicon
research
Instructions to use OpenSML/Solstice-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use OpenSML/Solstice-1 with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("OpenSML/Solstice-1") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use OpenSML/Solstice-1 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "OpenSML/Solstice-1"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "OpenSML/Solstice-1" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenSML/Solstice-1", "messages": [ {"role": "user", "content": "Hello"} ] }' - Atomic Chat
Download tokenizer/corpus.json from OpenSML/Solstice-1: direct link, hf CLI and curl.
- Browser
- Download file 1.55 kB
-
https://huggingface.co/OpenSML/Solstice-1/resolve/main/tokenizer/corpus.json
- Command line
-
hf download hf://OpenSML/Solstice-1/tokenizer/corpus.json
-
curl -L -o corpus.json https://huggingface.co/OpenSML/Solstice-1/resolve/main/tokenizer/corpus.json
1.55 kB
| { | |
| "max_bytes": 200000, | |
| "max_rows_per_source": 5000000, | |
| "min_chars": 200, | |
| "name": "sml-v2-educational-prose-v1", | |
| "seed": 7337, | |
| "shuffle_buffer": 10000, | |
| "sources": [ | |
| { | |
| "config": "fineweb-edu-dedup", | |
| "label": "web", | |
| "license": "ODC-BY; preserve underlying source notices", | |
| "repo": "HuggingFaceTB/smollm-corpus", | |
| "revision": "3ba9d605774198c5868892d7a8deda78031a781f", | |
| "split": "train", | |
| "text_field": "text", | |
| "weight": 55 | |
| }, | |
| { | |
| "label": "dclm", | |
| "license": "CC-BY-4.0", | |
| "min_score": { | |
| "field": "edu_int_score", | |
| "value": 3 | |
| }, | |
| "repo": "HuggingFaceTB/dclm-edu", | |
| "revision": "dbad8ad71224482740cd9c9d353591adbf62fe04", | |
| "split": "train", | |
| "text_field": "text", | |
| "weight": 25 | |
| }, | |
| { | |
| "config": "en", | |
| "label": "wiki", | |
| "license": "CC-BY-SA-4.0 / GFDL", | |
| "repo": "HuggingFaceFW/finewiki", | |
| "revision": "8bd13e72e6a002407649b3e898535f42ceb1aeb9", | |
| "split": "train", | |
| "text_field": "text", | |
| "weight": 10 | |
| }, | |
| { | |
| "config": "cosmopedia-v2", | |
| "format_contains": [ | |
| "textbook", | |
| "tutorial", | |
| "blog", | |
| "educational" | |
| ], | |
| "label": "cosmopedia", | |
| "license": "ODC-BY; synthetic content; preserve provenance", | |
| "repo": "HuggingFaceTB/smollm-corpus", | |
| "revision": "3ba9d605774198c5868892d7a8deda78031a781f", | |
| "split": "train", | |
| "text_field": "text", | |
| "weight": 10 | |
| } | |
| ], | |
| "split_buckets": 10000 | |
| } | |