Instructions to use huggingtweets/twomad with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use huggingtweets/twomad with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="huggingtweets/twomad")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("huggingtweets/twomad") model = AutoModelForCausalLM.from_pretrained("huggingtweets/twomad", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use huggingtweets/twomad with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "huggingtweets/twomad" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "huggingtweets/twomad", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/huggingtweets/twomad
- SGLang
How to use huggingtweets/twomad 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/twomad" \ --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/twomad", "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/twomad" \ --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/twomad", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use huggingtweets/twomad with Docker Model Runner:
docker model run hf.co/huggingtweets/twomad
Commit History
-
Update model preview
8ea9f6c -
New model from https://wandb.ai/wandb/huggingtweets/runs/2r604wuk
cdc939e
-
upload flax model
1e8b919 -
allow flax
ae83a89
-
Update model preview
6a60220 -
New model from https://wandb.ai/wandb/huggingtweets/runs/2rwdxqqe
e7ec068
-
Update model preview
1aa77d3 -
New model from https://wandb.ai/wandb/huggingtweets/runs/2rf7y47b
8eb913d
-
Update model preview
4258f36 -
New model from https://wandb.ai/wandb/huggingtweets/runs/2wyqm31w
c9449b2
-
Update README.md
1a24db5 -
Update README.md
1a9bf16 -
Update config.json
c5948c8 -
Update tokenizer_config.json
c85b48e -
Update vocab.json
79a9df7 -
Update pytorch_model.bin
c063835 -
Update merges.txt
c1a0bdb -
Update special_tokens_map.json
8ecd5ba -
Update README.md
e1a6f1b -
initial commit
86a67fa