Instructions to use Hack90/virus_pythia_14_1024_compliment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Hack90/virus_pythia_14_1024_compliment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Hack90/virus_pythia_14_1024_compliment")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Hack90/virus_pythia_14_1024_compliment") model = AutoModelForCausalLM.from_pretrained("Hack90/virus_pythia_14_1024_compliment", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Hack90/virus_pythia_14_1024_compliment with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Hack90/virus_pythia_14_1024_compliment" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Hack90/virus_pythia_14_1024_compliment", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Hack90/virus_pythia_14_1024_compliment
- SGLang
How to use Hack90/virus_pythia_14_1024_compliment 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 "Hack90/virus_pythia_14_1024_compliment" \ --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": "Hack90/virus_pythia_14_1024_compliment", "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 "Hack90/virus_pythia_14_1024_compliment" \ --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": "Hack90/virus_pythia_14_1024_compliment", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Hack90/virus_pythia_14_1024_compliment with Docker Model Runner:
docker model run hf.co/Hack90/virus_pythia_14_1024_compliment
Download tokenizer.json from Hack90/virus_pythia_14_1024_compliment: direct link, hf CLI and curl.
- Browser
- Download file 1.77 kB
-
https://huggingface.co/Hack90/virus_pythia_14_1024_compliment/resolve/main/tokenizer.json
- Command line
-
hf download hf://Hack90/virus_pythia_14_1024_compliment/tokenizer.json
-
curl -L -o tokenizer.json https://huggingface.co/Hack90/virus_pythia_14_1024_compliment/resolve/main/tokenizer.json
1.77 kB
| { | |
| "version": "1.0", | |
| "truncation": null, | |
| "padding": null, | |
| "added_tokens": [ | |
| { | |
| "id": 0, | |
| "content": "<|beginoftext|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": true, | |
| "special": true | |
| }, | |
| { | |
| "id": 1, | |
| "content": "<|endoftext|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| { | |
| "id": 2, | |
| "content": "<|unknown|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| } | |
| ], | |
| "normalizer": { | |
| "type": "NFC" | |
| }, | |
| "pre_tokenizer": { | |
| "type": "ByteLevel", | |
| "add_prefix_space": false, | |
| "trim_offsets": true, | |
| "use_regex": true | |
| }, | |
| "post_processor": { | |
| "type": "TemplateProcessing", | |
| "single": [ | |
| { | |
| "Sequence": { | |
| "id": "A", | |
| "type_id": 0 | |
| } | |
| } | |
| ], | |
| "pair": [ | |
| { | |
| "Sequence": { | |
| "id": "A", | |
| "type_id": 0 | |
| } | |
| }, | |
| { | |
| "Sequence": { | |
| "id": "B", | |
| "type_id": 1 | |
| } | |
| } | |
| ], | |
| "special_tokens": {} | |
| }, | |
| "decoder": { | |
| "type": "ByteLevel", | |
| "add_prefix_space": false, | |
| "trim_offsets": true, | |
| "use_regex": true | |
| }, | |
| "model": { | |
| "type": "BPE", | |
| "dropout": null, | |
| "unk_token": "<|unknown|>", | |
| "continuing_subword_prefix": null, | |
| "end_of_word_suffix": null, | |
| "fuse_unk": false, | |
| "byte_fallback": false, | |
| "ignore_merges": false, | |
| "vocab": { | |
| "<|beginoftext|>": 0, | |
| "<|endoftext|>": 1, | |
| "<|unknown|>": 2, | |
| "a": 3, | |
| "c": 4, | |
| "g": 5, | |
| "t": 6, | |
| "n": 7 | |
| }, | |
| "merges": [] | |
| } | |
| } |