Instructions to use huggingtweets/theonion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use huggingtweets/theonion with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="huggingtweets/theonion")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("huggingtweets/theonion") model = AutoModelForCausalLM.from_pretrained("huggingtweets/theonion", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use huggingtweets/theonion with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "huggingtweets/theonion" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "huggingtweets/theonion", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/huggingtweets/theonion
- SGLang
How to use huggingtweets/theonion 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 "huggingtweets/theonion" \ --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": "huggingtweets/theonion", "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 "huggingtweets/theonion" \ --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": "huggingtweets/theonion", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use huggingtweets/theonion with Docker Model Runner:
docker model run hf.co/huggingtweets/theonion
Commit History
-
Update model preview
ef6eb8d -
New model from https://wandb.ai/wandb/huggingtweets/runs/1y8p1w9v
dcc7335
-
Update model preview
df1417d -
New model from https://wandb.ai/wandb/huggingtweets/runs/3ufd8cf8
24bf899
-
Update model preview
88a883d -
New model from https://wandb.ai/wandb/huggingtweets/runs/1stemwnw
510f773
-
upload flax model
3bc7181 -
allow flax
cfe214a
-
Update README.md
5bf4800 -
Update README.md
d4c6354 -
Update config.json
f5754ee -
Update tokenizer_config.json
6b94c71 -
Update vocab.json
1c44cde -
Update pytorch_model.bin
ee2d7ca -
Update merges.txt
1b929b2 -
Update special_tokens_map.json
e9a8faa -
Update README.md
9acaf0e -
initial commit
5948c38