Instructions to use huggingtweets/tim_cook with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use huggingtweets/tim_cook with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="huggingtweets/tim_cook")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("huggingtweets/tim_cook") model = AutoModelForCausalLM.from_pretrained("huggingtweets/tim_cook", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use huggingtweets/tim_cook with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "huggingtweets/tim_cook" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "huggingtweets/tim_cook", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/huggingtweets/tim_cook
- SGLang
How to use huggingtweets/tim_cook 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/tim_cook" \ --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/tim_cook", "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/tim_cook" \ --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/tim_cook", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use huggingtweets/tim_cook with Docker Model Runner:
docker model run hf.co/huggingtweets/tim_cook
Commit History
-
Update model preview
118b984 -
New model from https://wandb.ai/wandb/huggingtweets/runs/19bm0x3l
14bad8c
-
upload flax model
212939a -
allow flax
55a6b1a
-
Update model preview
2e8fd08 -
Update model preview
4217b01 -
New model from https://wandb.ai/wandb/huggingtweets/runs/2gp3fgex
fbd07d9
-
Update model preview
19170d9 -
Update model preview
01a89c2 -
New model from https://wandb.ai/wandb/huggingtweets/runs/2ihmilbh
d265b13
-
Update README.md
f62890e -
Update README.md
31cdb18 -
Update config.json
5ac803c -
Update special_tokens_map.json
b0102ea -
Update merges.txt
c2dd424 -
Update vocab.json
9bdbd61 -
Update pytorch_model.bin
5585f6d -
Update tokenizer_config.json
e95f612 -
initial commit
abd28be