Text Generation
MLX
Safetensors
English
base-model
pretrained
small-language-model
apple-silicon
from-scratch
research
Instructions to use OpenSML/OpenSML-Base-175M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use OpenSML/OpenSML-Base-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-Base-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-Base-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-Base-175M" --prompt "Once upon a time"
- Atomic Chat
File size: 753 Bytes
8f2ec8e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | {
"model_name": "OpenSML-Base-175M",
"parameters": 175611648,
"model": {
"attention_impl": "fast",
"bias": false,
"ce_impl": "metal",
"d_model": 768,
"ffn_impl": "packed-metal",
"loss_dtype": "float32",
"max_seq_len": 2048,
"mlp_multiple_of": 256,
"mlp_ratio": 4.0,
"n_heads": 12,
"n_kv_heads": 4,
"n_layers": 24,
"qk_norm": true,
"vocab_size": 32000,
"rope_base": 10000.0
},
"weight_sha256": "5151567e266244c9e32fd6e01775192633abe227320269ecdefe28ce43e9ccc3",
"weight_format": "BF16 safetensors",
"context_limit": 2048,
"serialization": "raw document-prefix completion",
"supported_runtime": "native MLX on Apple Silicon; not a Transformers or mlx-lm auto-loading export"
}
|