Text Generation
Transformers
Safetensors
English
simple_stories_4m
text-generation-inference
custom_code
Instructions to use broskicodes/simple-stories-4M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use broskicodes/simple-stories-4M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="broskicodes/simple-stories-4M", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("broskicodes/simple-stories-4M", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use broskicodes/simple-stories-4M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "broskicodes/simple-stories-4M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "broskicodes/simple-stories-4M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/broskicodes/simple-stories-4M
- SGLang
How to use broskicodes/simple-stories-4M 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 "broskicodes/simple-stories-4M" \ --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": "broskicodes/simple-stories-4M", "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 "broskicodes/simple-stories-4M" \ --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": "broskicodes/simple-stories-4M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use broskicodes/simple-stories-4M with Docker Model Runner:
docker model run hf.co/broskicodes/simple-stories-4M
Commit History
Update README with usage instructions 1724f13
Upload tokenizer 2b13532
Upload model 8ac9b44
use local imports e19b1b8
Rename config_4m.py to configuration_ss4m.py 4a81a9e
Upload model 54f9606
Update model_4m.py 0e0495d
Update model_4m.py 5889dba
Upload model 34bd6ea
Update README.md e9bb729
Update README.md 2a434e9
Create README.md 2cdbbd8
Upload model f3478a1
initial commit 09ebec9
Braeden Hall commited on