Instructions to use huggingtweets/stdoval_ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use huggingtweets/stdoval_ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="huggingtweets/stdoval_")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("huggingtweets/stdoval_") model = AutoModelForCausalLM.from_pretrained("huggingtweets/stdoval_", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use huggingtweets/stdoval_ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "huggingtweets/stdoval_" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "huggingtweets/stdoval_", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/huggingtweets/stdoval_
- SGLang
How to use huggingtweets/stdoval_ 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/stdoval_" \ --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/stdoval_", "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/stdoval_" \ --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/stdoval_", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use huggingtweets/stdoval_ with Docker Model Runner:
docker model run hf.co/huggingtweets/stdoval_
|
Download README.md from huggingtweets/stdoval_: direct link, hf CLI and curl.
- Browser
- Download file 2.85 kB
-
https://huggingface.co/huggingtweets/stdoval_/resolve/main/README.md
- Command line
-
hf download hf://huggingtweets/stdoval_/README.md
-
curl -L -o README.md https://huggingface.co/huggingtweets/stdoval_/resolve/main/README.md
2.85 kB
| language: en | |
| thumbnail: https://www.huggingtweets.com/stdoval_/1614174048334/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/1342243892100534274/-1_pP6Do_400x400.jpg')"> | |
| </div> | |
| <div style="margin-top: 8px; font-size: 19px; font-weight: 800">π―ππππ πΎπ. π―ππππ π€ AI Bot </div> | |
| <div style="font-size: 15px">@stdoval_ 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 [@stdoval_'s tweets](https://twitter.com/stdoval_). | |
| | Data | Quantity | | |
| | --- | --- | | |
| | Tweets downloaded | 3059 | | |
| | Retweets | 2250 | | |
| | Short tweets | 154 | | |
| | Tweets kept | 655 | | |
| [Explore the data](https://wandb.ai/wandb/huggingtweets/runs/d4oj280h/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 @stdoval_'s tweets. | |
| Hyperparameters and metrics are recorded in the [W&B training run](https://wandb.ai/wandb/huggingtweets/runs/1b6xui8t) for full transparency and reproducibility. | |
| At the end of training, [the final model](https://wandb.ai/wandb/huggingtweets/runs/1b6xui8t/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/stdoval_') | |
| 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) | |