Instructions to use Azaghast/GPT2-SCP-ContainmentProcedures with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Azaghast/GPT2-SCP-ContainmentProcedures with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Azaghast/GPT2-SCP-ContainmentProcedures")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Azaghast/GPT2-SCP-ContainmentProcedures") model = AutoModelForCausalLM.from_pretrained("Azaghast/GPT2-SCP-ContainmentProcedures") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Azaghast/GPT2-SCP-ContainmentProcedures with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Azaghast/GPT2-SCP-ContainmentProcedures" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Azaghast/GPT2-SCP-ContainmentProcedures", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Azaghast/GPT2-SCP-ContainmentProcedures
- SGLang
How to use Azaghast/GPT2-SCP-ContainmentProcedures 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 "Azaghast/GPT2-SCP-ContainmentProcedures" \ --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": "Azaghast/GPT2-SCP-ContainmentProcedures", "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 "Azaghast/GPT2-SCP-ContainmentProcedures" \ --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": "Azaghast/GPT2-SCP-ContainmentProcedures", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Azaghast/GPT2-SCP-ContainmentProcedures with Docker Model Runner:
docker model run hf.co/Azaghast/GPT2-SCP-ContainmentProcedures
Update model config
Browse files- config.json +4 -2
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
| 3 |
"activation_function": "gelu_new",
|
| 4 |
"architectures": [
|
| 5 |
"GPT2LMHeadModel"
|
|
@@ -18,7 +18,9 @@
|
|
| 18 |
"n_inner": null,
|
| 19 |
"n_layer": 12,
|
| 20 |
"n_positions": 1024,
|
|
|
|
| 21 |
"resid_pdrop": 0.1,
|
|
|
|
| 22 |
"scale_attn_weights": true,
|
| 23 |
"summary_activation": null,
|
| 24 |
"summary_first_dropout": 0.1,
|
|
@@ -32,7 +34,7 @@
|
|
| 32 |
}
|
| 33 |
},
|
| 34 |
"torch_dtype": "float32",
|
| 35 |
-
"transformers_version": "4.
|
| 36 |
"use_cache": true,
|
| 37 |
"vocab_size": 50260
|
| 38 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "Azaghast/GPT2-SCP-ContainmentProcedures",
|
| 3 |
"activation_function": "gelu_new",
|
| 4 |
"architectures": [
|
| 5 |
"GPT2LMHeadModel"
|
|
|
|
| 18 |
"n_inner": null,
|
| 19 |
"n_layer": 12,
|
| 20 |
"n_positions": 1024,
|
| 21 |
+
"reorder_and_upcast_attn": false,
|
| 22 |
"resid_pdrop": 0.1,
|
| 23 |
+
"scale_attn_by_inverse_layer_idx": false,
|
| 24 |
"scale_attn_weights": true,
|
| 25 |
"summary_activation": null,
|
| 26 |
"summary_first_dropout": 0.1,
|
|
|
|
| 34 |
}
|
| 35 |
},
|
| 36 |
"torch_dtype": "float32",
|
| 37 |
+
"transformers_version": "4.19.2",
|
| 38 |
"use_cache": true,
|
| 39 |
"vocab_size": 50260
|
| 40 |
}
|