Instructions to use dessertlab/offensive-powershell-CodeGPT-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dessertlab/offensive-powershell-CodeGPT-small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dessertlab/offensive-powershell-CodeGPT-small")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dessertlab/offensive-powershell-CodeGPT-small") model = AutoModelForCausalLM.from_pretrained("dessertlab/offensive-powershell-CodeGPT-small") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use dessertlab/offensive-powershell-CodeGPT-small with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dessertlab/offensive-powershell-CodeGPT-small" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dessertlab/offensive-powershell-CodeGPT-small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/dessertlab/offensive-powershell-CodeGPT-small
- SGLang
How to use dessertlab/offensive-powershell-CodeGPT-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 "dessertlab/offensive-powershell-CodeGPT-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": "dessertlab/offensive-powershell-CodeGPT-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 "dessertlab/offensive-powershell-CodeGPT-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": "dessertlab/offensive-powershell-CodeGPT-small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use dessertlab/offensive-powershell-CodeGPT-small with Docker Model Runner:
docker model run hf.co/dessertlab/offensive-powershell-CodeGPT-small
Delete config.json
Browse files- config.json +0 -33
config.json
DELETED
|
@@ -1,33 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"_name_or_path": "cridin1/codet5p-220m-py-30-1-powershell-last",
|
| 3 |
-
"architectures": [
|
| 4 |
-
"T5Model"
|
| 5 |
-
],
|
| 6 |
-
"bos_token_id": 1,
|
| 7 |
-
"classifier_dropout": 0.0,
|
| 8 |
-
"d_ff": 3072,
|
| 9 |
-
"d_kv": 64,
|
| 10 |
-
"d_model": 768,
|
| 11 |
-
"decoder_start_token_id": 0,
|
| 12 |
-
"dense_act_fn": "relu",
|
| 13 |
-
"dropout_rate": 0.1,
|
| 14 |
-
"eos_token_id": 2,
|
| 15 |
-
"feed_forward_proj": "relu",
|
| 16 |
-
"initializer_factor": 1.0,
|
| 17 |
-
"is_encoder_decoder": true,
|
| 18 |
-
"is_gated_act": false,
|
| 19 |
-
"layer_norm_epsilon": 1e-06,
|
| 20 |
-
"model_type": "t5",
|
| 21 |
-
"n_positions": 512,
|
| 22 |
-
"num_decoder_layers": 12,
|
| 23 |
-
"num_heads": 12,
|
| 24 |
-
"num_layers": 12,
|
| 25 |
-
"output_past": true,
|
| 26 |
-
"pad_token_id": 0,
|
| 27 |
-
"relative_attention_max_distance": 128,
|
| 28 |
-
"relative_attention_num_buckets": 32,
|
| 29 |
-
"torch_dtype": "float32",
|
| 30 |
-
"transformers_version": "4.33.2",
|
| 31 |
-
"use_cache": true,
|
| 32 |
-
"vocab_size": 32100
|
| 33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|