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