Text Generation
Transformers
PyTorch
TensorBoard
gpt2
Generated from Trainer
text-generation-inference
Instructions to use bhsu/my_awesome_eli5_clm-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bhsu/my_awesome_eli5_clm-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bhsu/my_awesome_eli5_clm-model")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("bhsu/my_awesome_eli5_clm-model") model = AutoModelForCausalLM.from_pretrained("bhsu/my_awesome_eli5_clm-model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bhsu/my_awesome_eli5_clm-model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bhsu/my_awesome_eli5_clm-model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bhsu/my_awesome_eli5_clm-model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bhsu/my_awesome_eli5_clm-model
- SGLang
How to use bhsu/my_awesome_eli5_clm-model 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 "bhsu/my_awesome_eli5_clm-model" \ --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": "bhsu/my_awesome_eli5_clm-model", "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 "bhsu/my_awesome_eli5_clm-model" \ --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": "bhsu/my_awesome_eli5_clm-model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bhsu/my_awesome_eli5_clm-model with Docker Model Runner:
docker model run hf.co/bhsu/my_awesome_eli5_clm-model
Download training_args.bin from bhsu/my_awesome_eli5_clm-model: direct link, hf CLI and curl.
- Browser
- Download file 4.03 kB
-
https://huggingface.co/bhsu/my_awesome_eli5_clm-model/resolve/main/training_args.bin
- Command line
-
hf download hf://bhsu/my_awesome_eli5_clm-model/training_args.bin
-
curl -L -o training_args.bin https://huggingface.co/bhsu/my_awesome_eli5_clm-model/resolve/main/training_args.bin
4.03 kB
- Xet hash:
- 0149243cee471d990bc0c95b028256cafca4f8294fd1b9704f2fb1877ba8677c
- Size of remote file:
- 4.03 kB
- SHA256:
- f5104b9c424bfd88a3de6c293310981336f3d089a0d20dcef00a7976c8119fd3
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.