Instructions to use AndyReas/NewsGPT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AndyReas/NewsGPT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AndyReas/NewsGPT")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AndyReas/NewsGPT") model = AutoModelForCausalLM.from_pretrained("AndyReas/NewsGPT") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AndyReas/NewsGPT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AndyReas/NewsGPT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AndyReas/NewsGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AndyReas/NewsGPT
- SGLang
How to use AndyReas/NewsGPT 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/NewsGPT" \ --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/NewsGPT", "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/NewsGPT" \ --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/NewsGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AndyReas/NewsGPT with Docker Model Runner:
docker model run hf.co/AndyReas/NewsGPT
Commit History
Upload README.md with huggingface_hub ef798e0
Upload tokenizer a5024a4
Upload model 339418a
Upload README.md with huggingface_hub 09f87f8
Upload tokenizer ec84e20
Upload model d837dc9
Upload README.md with huggingface_hub 7fea8f7
Upload tokenizer 1d62d77
Upload model 22e9c6d
Upload README.md with huggingface_hub 144cad3
Upload tokenizer 217dba5
Upload model ebafe30
Upload README.md with huggingface_hub 08f744e
Upload tokenizer 2cb62b7
Upload model 65ae799
Upload README.md with huggingface_hub 91d4fd9
Upload tokenizer 68f0d94
Upload model f61052c
Upload tokenizer 79fd9c4
Upload model c67840b
Update README.md ebf663b
Rename readme.md to README.md 07ef669
Upload readme.md 577b1ea
Upload tokenizer 819cc4a
Upload model bdc3f21
initial commit c9eb875
Andreas Thomsen commited on