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
Download PRETRAINING_SAMPLES.json from OpenSML/OpenSML-Base-175M: direct link, hf CLI and curl.
- Browser
- Download file 3.16 kB
-
https://huggingface.co/OpenSML/OpenSML-Base-175M/resolve/main/PRETRAINING_SAMPLES.json
- Command line
-
hf download hf://OpenSML/OpenSML-Base-175M/PRETRAINING_SAMPLES.json
-
curl -L -o PRETRAINING_SAMPLES.json https://huggingface.co/OpenSML/OpenSML-Base-175M/resolve/main/PRETRAINING_SAMPLES.json
3.16 kB
| { | |
| "kind": "qualitative-samples", | |
| "prompts_sha256": "46dce284e03534aa869a713a4e749349e69d7e0f20f3fc14fb9e7fe9f9c4b94d", | |
| "results": [ | |
| { | |
| "completion": " move it to a new building.\n\nThe library was built in the late 19th century, and it was designed by the architect, Jos\u00e9 Mar\u00eda de la Torre. The library was built in the style of the Spanish Renaissance, and it was designed to be a place where people could learn about the history of the", | |
| "prompt": "The library was closed for repairs, so Maya decided to", | |
| "status": "generated" | |
| }, | |
| { | |
| "completion": " it is the source of energy for all life on Earth.\n\nThe sun is the source of energy for all life on Earth.\n\nThe sun is the source of energy for all life on Earth.\n\nThe sun is the source of energy for all life on Earth.\n\nThe sun is the source", | |
| "prompt": "Plants need sunlight because", | |
| "status": "generated" | |
| }, | |
| { | |
| "completion": " use it in a sentence.\n\nFor example, if you are learning a new word, you can use it in a sentence:\n\n\"The word 'basketball' is a great game.\"\n\n\"The word 'basketball' is a great game.\"\n\n\"The word 'b", | |
| "prompt": "A useful way to remember a new word is to", | |
| "status": "generated" | |
| }, | |
| { | |
| "completion": " they were greeted by a group of people who were dressed in white. The train was stopped by a police officer who was wearing a white uniform. The police officer was not wearing a uniform. The train was stopped by a police officer who was wearing a white uniform. The police officer was not wearing a uniform. The", | |
| "prompt": "The train arrived late because of heavy snow. When the passengers stepped outside,", | |
| "status": "generated" | |
| }, | |
| { | |
| "completion": " it is the most important source of drinking water for the entire population.\n\nThe water supply of the country is very poor. The water supply is not sufficient to meet the demand of the population. The water supply is not sufficient to meet the demand of the population.\n\nThe water supply is not sufficient to meet", | |
| "prompt": "Clean drinking water is important because", | |
| "status": "generated" | |
| }, | |
| { | |
| "completion": "\n return len(text.split())\n\ndef count_words_with_space(text):\n \"\"\"Return the number of words with spaces.\"\"\"\n \n return len(text.split())\n\ndef count_words_with_spaces(text):\n \"\"\"", | |
| "prompt": "def count_words(text):\n \"\"\"Return the number of whitespace-separated words.\"\"\"\n ", | |
| "status": "generated" | |
| }, | |
| { | |
| "completion": "\n# In[ ]:\n\n\n# Create a dictionary\nd = {'name': 'John', 'age': 20, 'sex': 'male'}\nprint(d)\n\n\n# In[ ]:\n\n\n# Create a dictionary\nd = {'name': 'John', 'age", | |
| "prompt": "Explain what a Python dictionary is and give a short example.\n", | |
| "status": "generated" | |
| } | |
| ], | |
| "status": "complete", | |
| "step": 132005, | |
| "tokens": 17300111360, | |
| "weight_sha256": "5151567e266244c9e32fd6e01775192633abe227320269ecdefe28ce43e9ccc3", | |
| "scope": "Historical qualitative greedy samples; not correctness scores or a runtime-parity test." | |
| } | |