Instructions to use hugohrban/progen2-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hugohrban/progen2-small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hugohrban/progen2-small", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("hugohrban/progen2-small", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hugohrban/progen2-small with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hugohrban/progen2-small" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hugohrban/progen2-small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hugohrban/progen2-small
- SGLang
How to use hugohrban/progen2-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 "hugohrban/progen2-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": "hugohrban/progen2-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 "hugohrban/progen2-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": "hugohrban/progen2-small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hugohrban/progen2-small with Docker Model Runner:
docker model run hf.co/hugohrban/progen2-small
Upload tokenizer.json
Browse files- tokenizer.json +91 -0
tokenizer.json
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"version": "1.0",
|
| 3 |
+
"truncation": null,
|
| 4 |
+
"padding": null,
|
| 5 |
+
"added_tokens": [
|
| 6 |
+
{
|
| 7 |
+
"id": 0,
|
| 8 |
+
"special": true,
|
| 9 |
+
"content": "<|pad|>",
|
| 10 |
+
"single_word": false,
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"rstrip": false,
|
| 13 |
+
"normalized": false
|
| 14 |
+
},
|
| 15 |
+
{
|
| 16 |
+
"id": 1,
|
| 17 |
+
"special": true,
|
| 18 |
+
"content": "<|bos|>",
|
| 19 |
+
"single_word": false,
|
| 20 |
+
"lstrip": false,
|
| 21 |
+
"rstrip": false,
|
| 22 |
+
"normalized": false
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
"id": 2,
|
| 26 |
+
"special": true,
|
| 27 |
+
"content": "<|eos|>",
|
| 28 |
+
"single_word": false,
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"rstrip": false,
|
| 31 |
+
"normalized": false
|
| 32 |
+
}
|
| 33 |
+
],
|
| 34 |
+
"normalizer": null,
|
| 35 |
+
"pre_tokenizer": {
|
| 36 |
+
"type": "ByteLevel",
|
| 37 |
+
"add_prefix_space": false,
|
| 38 |
+
"trim_offsets": true
|
| 39 |
+
},
|
| 40 |
+
"post_processor": {
|
| 41 |
+
"type": "ByteLevel",
|
| 42 |
+
"add_prefix_space": true,
|
| 43 |
+
"trim_offsets": true
|
| 44 |
+
},
|
| 45 |
+
"decoder": {
|
| 46 |
+
"type": "ByteLevel",
|
| 47 |
+
"add_prefix_space": true,
|
| 48 |
+
"trim_offsets": true
|
| 49 |
+
},
|
| 50 |
+
"model": {
|
| 51 |
+
"type": "BPE",
|
| 52 |
+
"dropout": null,
|
| 53 |
+
"unk_token": null,
|
| 54 |
+
"continuing_subword_prefix": null,
|
| 55 |
+
"end_of_word_suffix": null,
|
| 56 |
+
"fuse_unk": false,
|
| 57 |
+
"vocab": {
|
| 58 |
+
"<|pad|>": 0,
|
| 59 |
+
"<|bos|>": 1,
|
| 60 |
+
"<|eos|>": 2,
|
| 61 |
+
"1": 3,
|
| 62 |
+
"2": 4,
|
| 63 |
+
"A": 5,
|
| 64 |
+
"B": 6,
|
| 65 |
+
"C": 7,
|
| 66 |
+
"D": 8,
|
| 67 |
+
"E": 9,
|
| 68 |
+
"F": 10,
|
| 69 |
+
"G": 11,
|
| 70 |
+
"H": 12,
|
| 71 |
+
"I": 13,
|
| 72 |
+
"K": 14,
|
| 73 |
+
"L": 15,
|
| 74 |
+
"M": 16,
|
| 75 |
+
"N": 17,
|
| 76 |
+
"O": 18,
|
| 77 |
+
"P": 19,
|
| 78 |
+
"Q": 20,
|
| 79 |
+
"R": 21,
|
| 80 |
+
"S": 22,
|
| 81 |
+
"T": 23,
|
| 82 |
+
"U": 24,
|
| 83 |
+
"V": 25,
|
| 84 |
+
"W": 26,
|
| 85 |
+
"X": 27,
|
| 86 |
+
"Y": 28,
|
| 87 |
+
"Z": 29
|
| 88 |
+
},
|
| 89 |
+
"merges": []
|
| 90 |
+
}
|
| 91 |
+
}
|