Instructions to use ml6team/gpt-2-medium-conditional-quote-generator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ml6team/gpt-2-medium-conditional-quote-generator with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ml6team/gpt-2-medium-conditional-quote-generator")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ml6team/gpt-2-medium-conditional-quote-generator") model = AutoModelForCausalLM.from_pretrained("ml6team/gpt-2-medium-conditional-quote-generator") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ml6team/gpt-2-medium-conditional-quote-generator with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ml6team/gpt-2-medium-conditional-quote-generator" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ml6team/gpt-2-medium-conditional-quote-generator", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ml6team/gpt-2-medium-conditional-quote-generator
- SGLang
How to use ml6team/gpt-2-medium-conditional-quote-generator 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 "ml6team/gpt-2-medium-conditional-quote-generator" \ --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": "ml6team/gpt-2-medium-conditional-quote-generator", "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 "ml6team/gpt-2-medium-conditional-quote-generator" \ --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": "ml6team/gpt-2-medium-conditional-quote-generator", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ml6team/gpt-2-medium-conditional-quote-generator with Docker Model Runner:
docker model run hf.co/ml6team/gpt-2-medium-conditional-quote-generator
- Xet hash:
- efdd0c4fbacbbc64da17d79c428e8dc8f93895c11d381e426fe92ad86e140a43
- Size of remote file:
- 1.42 GB
- SHA256:
- 8d5dd4e1ea784f3fbbfc5d92f2d814bd11acf2d68b1b4d82ac91c7f82d1c0840
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.