Instructions to use PeterBrendan/AdsGPT2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PeterBrendan/AdsGPT2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="PeterBrendan/AdsGPT2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("PeterBrendan/AdsGPT2") model = AutoModelForCausalLM.from_pretrained("PeterBrendan/AdsGPT2") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use PeterBrendan/AdsGPT2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PeterBrendan/AdsGPT2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PeterBrendan/AdsGPT2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/PeterBrendan/AdsGPT2
- SGLang
How to use PeterBrendan/AdsGPT2 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 "PeterBrendan/AdsGPT2" \ --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": "PeterBrendan/AdsGPT2", "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 "PeterBrendan/AdsGPT2" \ --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": "PeterBrendan/AdsGPT2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use PeterBrendan/AdsGPT2 with Docker Model Runner:
docker model run hf.co/PeterBrendan/AdsGPT2
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("PeterBrendan/AdsGPT2")
model = AutoModelForCausalLM.from_pretrained("PeterBrendan/AdsGPT2")Model: GPT-2
Model name: AdsGPT2
Model description: This is a fine-tuned version of the GPT-2 model trained on a dataset of 10,000+ programmatic ad creatives. This model is designed to generate ad content given a product or a brand. For instance, when given the input "Nike Basketball", it will generate a sample ad and also suggest an ad size. The model's main purpose is to inspire ad creatives and provide a starting point for creating effective marketing content.
Intended uses: This model is designed to be used as a starting point for creating ad creatives. You could use it in the early stages of your ad design process to generate creative ideas and inspiration.
Limitations: This model has the potential to produce unusual or unexpected results, due to the varied and complex nature of advertising language. It should not be relied upon to produce perfect ad copy, but rather as a tool to inspire creative ideas. Also, the model might not have complete understanding of specific brand guidelines and may not adhere to them.
How to use: You can use this model by providing a product or brand name as an input. For example: Nike Air Force Ones
Training data: This model was trained on a dataset consisting of over 10,000 programmatic ad creatives, which included a variety of different product and brand advertisements. The data was collected from various ad platforms and represents a wide range of ad styles and formats.
Training procedure: The model was fine-tuned using the GPT-2 base model with the aforementioned training data.
Evaluation results: As this model's primary objective is to generate creative ads, traditional evaluation metrics such as accuracy or F1 score are not applicable. However, the model's performance has been informally assessed based on the relevancy and creativity of the generated ads.
Safety and bias considerations: This model shares the same safety and bias considerations as the base GPT-2 model. It may generate content that is offensive or inappropriate. Also, as the model is trained on data from the internet, it may reflect the biases present in those sources.
Users should carefully review the generated ads to ensure they align with their brand's values and guidelines before using them. The model is not intended to replace the role of a human in creating ad copy, but rather to assist and provide inspiration.
- Downloads last month
- 125
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="PeterBrendan/AdsGPT2")