Text Generation
Transformers
PyTorch
Safetensors
gpt2
passwords
cybersecurity
text-generation-inference
Instructions to use javirandor/passgpt-10characters with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use javirandor/passgpt-10characters with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="javirandor/passgpt-10characters")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("javirandor/passgpt-10characters") model = AutoModelForCausalLM.from_pretrained("javirandor/passgpt-10characters", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use javirandor/passgpt-10characters with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "javirandor/passgpt-10characters" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "javirandor/passgpt-10characters", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/javirandor/passgpt-10characters
- SGLang
How to use javirandor/passgpt-10characters 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 "javirandor/passgpt-10characters" \ --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": "javirandor/passgpt-10characters", "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 "javirandor/passgpt-10characters" \ --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": "javirandor/passgpt-10characters", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use javirandor/passgpt-10characters with Docker Model Runner:
docker model run hf.co/javirandor/passgpt-10characters
| { | |
| "version": "1.0", | |
| "truncation": null, | |
| "padding": null, | |
| "added_tokens": [ | |
| { | |
| "id": 0, | |
| "content": "<s>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": true, | |
| "special": true | |
| }, | |
| { | |
| "id": 1, | |
| "content": "<pad>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": true, | |
| "special": true | |
| }, | |
| { | |
| "id": 2, | |
| "content": "</s>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": true, | |
| "special": true | |
| }, | |
| { | |
| "id": 3, | |
| "content": "<unk>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": true, | |
| "special": true | |
| }, | |
| { | |
| "id": 4, | |
| "content": "<mask>", | |
| "single_word": false, | |
| "lstrip": true, | |
| "rstrip": false, | |
| "normalized": true, | |
| "special": true | |
| } | |
| ], | |
| "normalizer": null, | |
| "pre_tokenizer": { | |
| "type": "ByteLevel", | |
| "add_prefix_space": false, | |
| "trim_offsets": true, | |
| "use_regex": true | |
| }, | |
| "post_processor": { | |
| "type": "RobertaProcessing", | |
| "sep": [ | |
| "</s>", | |
| 2 | |
| ], | |
| "cls": [ | |
| "<s>", | |
| 0 | |
| ], | |
| "trim_offsets": true, | |
| "add_prefix_space": false | |
| }, | |
| "decoder": { | |
| "type": "ByteLevel", | |
| "add_prefix_space": true, | |
| "trim_offsets": true, | |
| "use_regex": true | |
| }, | |
| "model": { | |
| "type": "BPE", | |
| "dropout": null, | |
| "unk_token": null, | |
| "continuing_subword_prefix": "", | |
| "end_of_word_suffix": "", | |
| "fuse_unk": false, | |
| "byte_fallback": false, | |
| "vocab": { | |
| "<s>": 0, | |
| "<pad>": 1, | |
| "</s>": 2, | |
| "<unk>": 3, | |
| "<mask>": 4, | |
| "!": 5, | |
| "\"": 6, | |
| "#": 7, | |
| "$": 8, | |
| "%": 9, | |
| "&": 10, | |
| "'": 11, | |
| "(": 12, | |
| ")": 13, | |
| "*": 14, | |
| "+": 15, | |
| ",": 16, | |
| "-": 17, | |
| ".": 18, | |
| "/": 19, | |
| "0": 20, | |
| "1": 21, | |
| "2": 22, | |
| "3": 23, | |
| "4": 24, | |
| "5": 25, | |
| "6": 26, | |
| "7": 27, | |
| "8": 28, | |
| "9": 29, | |
| ":": 30, | |
| ";": 31, | |
| "<": 32, | |
| "=": 33, | |
| ">": 34, | |
| "?": 35, | |
| "@": 36, | |
| "A": 37, | |
| "B": 38, | |
| "C": 39, | |
| "D": 40, | |
| "E": 41, | |
| "F": 42, | |
| "G": 43, | |
| "H": 44, | |
| "I": 45, | |
| "J": 46, | |
| "K": 47, | |
| "L": 48, | |
| "M": 49, | |
| "N": 50, | |
| "O": 51, | |
| "P": 52, | |
| "Q": 53, | |
| "R": 54, | |
| "S": 55, | |
| "T": 56, | |
| "U": 57, | |
| "V": 58, | |
| "W": 59, | |
| "X": 60, | |
| "Y": 61, | |
| "Z": 62, | |
| "[": 63, | |
| "\\": 64, | |
| "]": 65, | |
| "^": 66, | |
| "_": 67, | |
| "`": 68, | |
| "a": 69, | |
| "b": 70, | |
| "c": 71, | |
| "d": 72, | |
| "e": 73, | |
| "f": 74, | |
| "g": 75, | |
| "h": 76, | |
| "i": 77, | |
| "j": 78, | |
| "k": 79, | |
| "l": 80, | |
| "m": 81, | |
| "n": 82, | |
| "o": 83, | |
| "p": 84, | |
| "q": 85, | |
| "r": 86, | |
| "s": 87, | |
| "t": 88, | |
| "u": 89, | |
| "v": 90, | |
| "w": 91, | |
| "x": 92, | |
| "y": 93, | |
| "z": 94, | |
| "{": 95, | |
| "|": 96, | |
| "}": 97, | |
| "~": 98 | |
| }, | |
| "merges": [] | |
| } | |
| } |