Instructions to use nirajsaran/AdTextGenerator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nirajsaran/AdTextGenerator with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nirajsaran/AdTextGenerator")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nirajsaran/AdTextGenerator") model = AutoModelForCausalLM.from_pretrained("nirajsaran/AdTextGenerator", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nirajsaran/AdTextGenerator with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nirajsaran/AdTextGenerator" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nirajsaran/AdTextGenerator", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nirajsaran/AdTextGenerator
- SGLang
How to use nirajsaran/AdTextGenerator 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 "nirajsaran/AdTextGenerator" \ --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": "nirajsaran/AdTextGenerator", "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 "nirajsaran/AdTextGenerator" \ --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": "nirajsaran/AdTextGenerator", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nirajsaran/AdTextGenerator with Docker Model Runner:
docker model run hf.co/nirajsaran/AdTextGenerator
Commit History
-
Update README.md
58cb1cd
-
Update README.md
c3a88a9
-
Update README.md
top_p, metrics, model performance comments43001df -
Update README.md
17d9ed5 -
Update README.md
2db922b -
Update README.md
Can set num_return_sequences to > 1 only if we're using Greedy search (we're not, since do_sample by default is True)ab42f7b -
Update README.md
Return 3 sequences59550af -
Update README.md
Additional model parameters - use_cache: false, max_length: 200 tokens, and top_k: 505194e6 -
Update README.md
9d4c192 -
Update README.md
8733b46 -
Update README.md
dcdb494 -
Update README.md
Modified the example inputs - both the names (Example 1..) and the prompts themselvesab8026c -
Update README.md
ad1cadc
-
Upload vocab.json
0c8652d -
Upload tokenizer.json
d83a398 -
Upload tokenizer_config.json
952e031 -
Upload special_tokens_map.json
b30a6fb -
Upload merges.txt
aa0ade9 -
Upload pytorch_model.bin with git-lfs
1af787a -
Upload config.json
a2ce38c -
initial commit
d2f6230