Text Generation
Transformers
English
storylm
tiny
slm
small-language-model
from-scratch
llama
rope
swiglu
rmsnorm
tinystories
Instructions to use Compactbot/storylm-10m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Compactbot/storylm-10m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Compactbot/storylm-10m")# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Compactbot/storylm-10m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Compactbot/storylm-10m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Compactbot/storylm-10m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Compactbot/storylm-10m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Compactbot/storylm-10m
- SGLang
How to use Compactbot/storylm-10m with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Compactbot/storylm-10m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Compactbot/storylm-10m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Compactbot/storylm-10m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Compactbot/storylm-10m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Compactbot/storylm-10m with Docker Model Runner:
docker model run hf.co/Compactbot/storylm-10m
Download model.pt from Compactbot/storylm-10m: direct link, hf CLI and curl.
- Browser
- Download file 42 MB
-
https://huggingface.co/Compactbot/storylm-10m/resolve/main/model.pt
- Command line
-
hf download hf://Compactbot/storylm-10m/model.pt
-
curl -L -o model.pt https://huggingface.co/Compactbot/storylm-10m/resolve/main/model.pt
42 MB
- Xet hash:
- 587124216050ffd08cb5d7b2ce5704d3c931528eff140814e039ab22fac84f78
- Size of remote file:
- 42 MB
- SHA256:
- 276f248379bf2d582dac84f535ad462ddf9fbf99646dc239a7af4de628649454
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.