Instructions to use AndyReas/GenNewsGPT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AndyReas/GenNewsGPT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AndyReas/GenNewsGPT")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AndyReas/GenNewsGPT") model = AutoModelForCausalLM.from_pretrained("AndyReas/GenNewsGPT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AndyReas/GenNewsGPT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AndyReas/GenNewsGPT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AndyReas/GenNewsGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AndyReas/GenNewsGPT
- SGLang
How to use AndyReas/GenNewsGPT 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 "AndyReas/GenNewsGPT" \ --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": "AndyReas/GenNewsGPT", "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 "AndyReas/GenNewsGPT" \ --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": "AndyReas/GenNewsGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AndyReas/GenNewsGPT with Docker Model Runner:
docker model run hf.co/AndyReas/GenNewsGPT
Commit History
-
Upload README.md with huggingface_hub
1f093e0 -
Upload tokenizer
5c58068 -
Upload model
9e0869a -
Upload README.md with huggingface_hub
e183041 -
Upload tokenizer
76b06e6 -
Upload model
cff2d88 -
Upload README.md with huggingface_hub
b9f5ca2 -
Upload tokenizer
9413091 -
Upload model
1bf483f -
Upload README.md with huggingface_hub
6c578dc -
Upload tokenizer
f1caa75 -
Upload model
0938cb6 -
Upload README.md with huggingface_hub
0bb9336 -
Upload tokenizer
3678fd0 -
Upload model
61580ad -
Upload README.md with huggingface_hub
dd43248 -
Upload tokenizer
d4346e7 -
Upload model
fa2b63d -
initial commit
Andreas Thomsenfb7fa42