Instructions to use Hack90/virus_pythia_small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Hack90/virus_pythia_small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Hack90/virus_pythia_small")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Hack90/virus_pythia_small") model = AutoModelForCausalLM.from_pretrained("Hack90/virus_pythia_small", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Hack90/virus_pythia_small with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Hack90/virus_pythia_small" # 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_small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Hack90/virus_pythia_small
- SGLang
How to use Hack90/virus_pythia_small 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_small" \ --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_small", "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_small" \ --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_small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Hack90/virus_pythia_small with Docker Model Runner:
docker model run hf.co/Hack90/virus_pythia_small
Update tokenizer.json
Browse files- tokenizer.json +1 -3
tokenizer.json
CHANGED
|
@@ -59,7 +59,6 @@
|
|
| 59 |
"vocab": {
|
| 60 |
"<|endoftext|>": 0,
|
| 61 |
"<|padding|>": 1,
|
| 62 |
-
"q":8,
|
| 63 |
"a": 2,
|
| 64 |
"c": 3,
|
| 65 |
"g": 4,
|
|
@@ -67,7 +66,6 @@
|
|
| 67 |
"n": 6,
|
| 68 |
"y":7
|
| 69 |
|
| 70 |
-
}
|
| 71 |
-
"merges": []
|
| 72 |
}
|
| 73 |
}
|
|
|
|
| 59 |
"vocab": {
|
| 60 |
"<|endoftext|>": 0,
|
| 61 |
"<|padding|>": 1,
|
|
|
|
| 62 |
"a": 2,
|
| 63 |
"c": 3,
|
| 64 |
"g": 4,
|
|
|
|
| 66 |
"n": 6,
|
| 67 |
"y":7
|
| 68 |
|
| 69 |
+
}
|
|
|
|
| 70 |
}
|
| 71 |
}
|