Instructions to use huggingtweets/deepfates with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use huggingtweets/deepfates with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="huggingtweets/deepfates")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("huggingtweets/deepfates") model = AutoModelForCausalLM.from_pretrained("huggingtweets/deepfates") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use huggingtweets/deepfates with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "huggingtweets/deepfates" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "huggingtweets/deepfates", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/huggingtweets/deepfates
- SGLang
How to use huggingtweets/deepfates 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/deepfates" \ --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/deepfates", "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/deepfates" \ --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/deepfates", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use huggingtweets/deepfates with Docker Model Runner:
docker model run hf.co/huggingtweets/deepfates
| language: en | |
| thumbnail: https://www.huggingtweets.com/deepfates/1617047160223/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/1360640553373716482/Ai7f4fzH_400x400.jpg')"> | |
| </div> | |
| <div style="margin-top: 8px; font-size: 19px; font-weight: 800">invisible college dropout 🤖 AI Bot </div> | |
| <div style="font-size: 15px">@deepfates 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://wandb.ai/wandb/huggingtweets/reports/HuggingTweets-Train-a-Model-to-Generate-Tweets--VmlldzoxMTY5MjI). | |
| ## Training data | |
| The model was trained on [@deepfates's tweets](https://twitter.com/deepfates). | |
| | Data | Quantity | | |
| | --- | --- | | |
| | Tweets downloaded | 3246 | | |
| | Retweets | 230 | | |
| | Short tweets | 647 | | |
| | Tweets kept | 2369 | | |
| [Explore the data](https://wandb.ai/wandb/huggingtweets/runs/3jkblzyg/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 @deepfates's tweets. | |
| Hyperparameters and metrics are recorded in the [W&B training run](https://wandb.ai/wandb/huggingtweets/runs/3lia0i7h) for full transparency and reproducibility. | |
| At the end of training, [the final model](https://wandb.ai/wandb/huggingtweets/runs/3lia0i7h/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/deepfates') | |
| 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) | |