Text Generation
Transformers
PyTorch
English
gpt2
science fiction
text generation
text-generation-inference
Instructions to use MinzaKhan/HGWells with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MinzaKhan/HGWells with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MinzaKhan/HGWells")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MinzaKhan/HGWells") model = AutoModelForCausalLM.from_pretrained("MinzaKhan/HGWells", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MinzaKhan/HGWells with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MinzaKhan/HGWells" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MinzaKhan/HGWells", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MinzaKhan/HGWells
- SGLang
How to use MinzaKhan/HGWells 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 "MinzaKhan/HGWells" \ --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": "MinzaKhan/HGWells", "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 "MinzaKhan/HGWells" \ --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": "MinzaKhan/HGWells", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use MinzaKhan/HGWells with Docker Model Runner:
docker model run hf.co/MinzaKhan/HGWells
Commit History
-
Update README.md
77fa200 -
Update README.md
357aa51
-
Update README.md
8a5ef3b -
Upload tokenizer
9bcfaa1 -
Upload model
3d1871a -
Update README.md
626338a -
Update README.md
6839c00 -
Update README.md
d2e1cb3 -
Update README.md
ca8e410 -
Update README.md
5595ead -
Update README.md
af63ac0 -
Update README.md
f5d2d9e -
Update README.md
4afae7b -
Update README.md
ae12a21 -
Create README.md
0b56ecb -
Upload tokenizer
1c0ae23 -
Upload model
d1b6f43
-
Upload tokenizer
4a05fa1 -
Upload model
9fd74d7 -
Upload model
5d8277c -
initial commit
75a8f75