Instructions to use saeruig/shakespeare_sonnet_maker with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use saeruig/shakespeare_sonnet_maker with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="saeruig/shakespeare_sonnet_maker")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("saeruig/shakespeare_sonnet_maker") model = AutoModelForCausalLM.from_pretrained("saeruig/shakespeare_sonnet_maker", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use saeruig/shakespeare_sonnet_maker with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "saeruig/shakespeare_sonnet_maker" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "saeruig/shakespeare_sonnet_maker", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/saeruig/shakespeare_sonnet_maker
- SGLang
How to use saeruig/shakespeare_sonnet_maker 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 "saeruig/shakespeare_sonnet_maker" \ --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": "saeruig/shakespeare_sonnet_maker", "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 "saeruig/shakespeare_sonnet_maker" \ --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": "saeruig/shakespeare_sonnet_maker", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use saeruig/shakespeare_sonnet_maker with Docker Model Runner:
docker model run hf.co/saeruig/shakespeare_sonnet_maker
Commit History
-
Upload config.json with huggingface_hub (#2)
- Upload config.json with huggingface_hub (a6a993637b97b89664372c83209096c5090d63df)e76a967 -
Upload generation_config.json with huggingface_hub (#3)
- Upload generation_config.json with huggingface_hub (43c6b569330753c07beabe1f65df444dde831ae3)ce1493e -
Upload training_args.bin with huggingface_hub (#5)
- Upload training_args.bin with huggingface_hub (bc9c14d9aff01bf3df988f1bcf230d0fce15cddf)23f37f2 -
Upload special_tokens_map.json with huggingface_hub (#7)
- Upload special_tokens_map.json with huggingface_hub (cbc2af74c302339cf53b0501c80c28ab08cc77ce)0fbaa94 -
Upload added_tokens.json with huggingface_hub (#8)
- Upload added_tokens.json with huggingface_hub (6dc74a8573a4f47af03845011e934ea36094c1b3)66552b7 -
Upload vocab.json with huggingface_hub (#9)
- Upload vocab.json with huggingface_hub (b627aa13ff39178688f65f2301d65c803e2f8ec6)340e234 -
Upload merges.txt with huggingface_hub (#10)
- Upload merges.txt with huggingface_hub (5013771f600d209338810fdc1451e5e52416a256)5e59fc4 -
Upload shakespeare.txt with huggingface_hub (#11)
- Upload shakespeare.txt with huggingface_hub (a4d8dea7fec0dc43191508754c51cbeddeecbafa)357da23 -
Upload config.json with huggingface_hub (#12)
- Upload config.json with huggingface_hub (89ba7c5f75ec7e37c3aa7ba65800c4c0f98124f3)1c79770 -
Upload generation_config.json with huggingface_hub (#13)
- Upload generation_config.json with huggingface_hub (68f96c64391fdf00656de6cc2be5a4f40d69772c)9141dd2 -
Upload pytorch_model.bin with huggingface_hub (#14)
- Upload pytorch_model.bin with huggingface_hub (f15977a49a39fca9fd95b06947861b23a9a64647)7ab851c -
Upload training_args.bin with huggingface_hub (#15)
- Upload training_args.bin with huggingface_hub (c3d3a5dede6f90a3dbafe44a0df1b7af5b9d94e7)8780443 -
Upload tokenizer_config.json with huggingface_hub (#16)
- Upload tokenizer_config.json with huggingface_hub (9a3065b41b2dd1d7194db2446f79c5a48b531d68)8e1b169 -
Upload added_tokens.json with huggingface_hub (#18)
- Upload added_tokens.json with huggingface_hub (25f88555defdce0015d210be0014892c04c3f1aa)7e9cda5 -
Upload tokenizer_config.json with huggingface_hub (#6)
- Upload tokenizer_config.json with huggingface_hub (eebca6b8b9fec4613fe99e015aebb301292ad0d4)ab30e9a -
Upload pytorch_model.bin with huggingface_hub (#4)
- Upload pytorch_model.bin with huggingface_hub (b1f03593990e622903ba1b59fc74aeabda4f254e)e2ffca7 -
Upload vocab.json with huggingface_hub (#19)
- Upload vocab.json with huggingface_hub (03b2a0db8b4c3ec7e1c338cfd310390dce37fc52)002a6bf -
Upload merges.txt with huggingface_hub (#20)
- Upload merges.txt with huggingface_hub (b317a0219ae989c1951226f2e26e5d60ef0839d5)44e2f2b -
Upload special_tokens_map.json with huggingface_hub (#17)
- Upload special_tokens_map.json with huggingface_hub (1c6c29baaf4be8cc91c30d638c2fc6b7525d0a1d)3a933de -
Delete shakespeare.txt
f9d8956 -
Upload shakespeare.txt with huggingface_hub (#1)
- Upload shakespeare.txt with huggingface_hub (2cb6558b9f28a10e4dcee762eedabe4ec548fdf9)1cc0624 -
initial commit
38b98ee