Instructions to use huggingtweets/indiburger with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use huggingtweets/indiburger with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="huggingtweets/indiburger")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("huggingtweets/indiburger") model = AutoModelForCausalLM.from_pretrained("huggingtweets/indiburger") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use huggingtweets/indiburger with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "huggingtweets/indiburger" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "huggingtweets/indiburger", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/huggingtweets/indiburger
- SGLang
How to use huggingtweets/indiburger 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/indiburger" \ --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/indiburger", "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/indiburger" \ --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/indiburger", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use huggingtweets/indiburger with Docker Model Runner:
docker model run hf.co/huggingtweets/indiburger
| language: en | |
| thumbnail: https://www.huggingtweets.com/indiburger/1614096163881/predictions.png | |
| tags: | |
| - huggingtweets | |
| widget: | |
| - text: "My dream is" | |
| <div> | |
| <div style="width: 132px; height:132px; border-radius: 50%; background-size: cover; background-image: url('https://pbs.twimg.com/profile_images/1357846260934352899/EWTPeA8__400x400.jpg')"> | |
| </div> | |
| <div style="margin-top: 8px; font-size: 19px; font-weight: 800">indi 🍔 🤖 AI Bot </div> | |
| <div style="font-size: 15px">@indiburger bot</div> | |
| </div> | |
| I was made with [huggingtweets](https://github.com/borisdayma/huggingtweets). | |
| Create your own bot based on your favorite user with [the demo](https://colab.research.google.com/github/borisdayma/huggingtweets/blob/master/huggingtweets-demo.ipynb)! | |
| ## How does it work? | |
| The model uses the following pipeline. | |
|  | |
| To understand how the model was developed, check the [W&B report](https://app.wandb.ai/wandb/huggingtweets/reports/HuggingTweets-Train-a-model-to-generate-tweets--VmlldzoxMTY5MjI). | |
| ## Training data | |
| The model was trained on [@indiburger's tweets](https://twitter.com/indiburger). | |
| | Data | Quantity | | |
| | --- | --- | | |
| | Tweets downloaded | 3104 | | |
| | Retweets | 712 | | |
| | Short tweets | 372 | | |
| | Tweets kept | 2020 | | |
| [Explore the data](https://wandb.ai/wandb/huggingtweets/runs/3emok4ku/artifacts), which is tracked with [W&B artifacts](https://docs.wandb.com/artifacts) at every step of the pipeline. | |
| ## Training procedure | |
| The model is based on a pre-trained [GPT-2](https://huggingface.co/gpt2) which is fine-tuned on @indiburger's tweets. | |
| Hyperparameters and metrics are recorded in the [W&B training run](https://wandb.ai/wandb/huggingtweets/runs/rpeuqv5y) for full transparency and reproducibility. | |
| At the end of training, [the final model](https://wandb.ai/wandb/huggingtweets/runs/rpeuqv5y/artifacts) is logged and versioned. | |
| ## How to use | |
| You can use this model directly with a pipeline for text generation: | |
| ```python | |
| from transformers import pipeline | |
| generator = pipeline('text-generation', | |
| model='huggingtweets/indiburger') | |
| generator("My dream is", num_return_sequences=5) | |
| ``` | |
| ## Limitations and bias | |
| The model suffers from [the same limitations and bias as GPT-2](https://huggingface.co/gpt2#limitations-and-bias). | |
| In addition, the data present in the user's tweets further affects the text generated by the model. | |
| ## About | |
| *Built by Boris Dayma* | |
| [](https://twitter.com/intent/follow?screen_name=borisdayma) | |
| For more details, visit the project repository. | |
| [](https://github.com/borisdayma/huggingtweets) | |