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")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MinzaKhan/HGWells") model = AutoModelForCausalLM.from_pretrained("MinzaKhan/HGWells") - 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
Librarian Bot: Update dataset YAML metadata for model
#1
by librarian-bot - opened
README.md
CHANGED
|
@@ -1,10 +1,11 @@
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
-
pipeline_tag: text-generation
|
| 5 |
tags:
|
| 6 |
- science fiction
|
| 7 |
- text generation
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
This model has been fine-tuned on the novels written by H G Wells. H G Wells is a famous author and is well known for his science fiction novels. He is known as the father of science fiction.
|
|
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- en
|
|
|
|
| 4 |
tags:
|
| 5 |
- science fiction
|
| 6 |
- text generation
|
| 7 |
+
datasets: MinzaKhan/HGWells
|
| 8 |
+
pipeline_tag: text-generation
|
| 9 |
---
|
| 10 |
|
| 11 |
This model has been fine-tuned on the novels written by H G Wells. H G Wells is a famous author and is well known for his science fiction novels. He is known as the father of science fiction.
|