CIRCL/vulnerability
Viewer • Updated • 573k • 197 • 1
How to use CIRCL/vulnerability-description-generation-gpt2-xl with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="CIRCL/vulnerability-description-generation-gpt2-xl") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("CIRCL/vulnerability-description-generation-gpt2-xl")
model = AutoModelForCausalLM.from_pretrained("CIRCL/vulnerability-description-generation-gpt2-xl")How to use CIRCL/vulnerability-description-generation-gpt2-xl with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "CIRCL/vulnerability-description-generation-gpt2-xl"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "CIRCL/vulnerability-description-generation-gpt2-xl",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/CIRCL/vulnerability-description-generation-gpt2-xl
How to use CIRCL/vulnerability-description-generation-gpt2-xl with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "CIRCL/vulnerability-description-generation-gpt2-xl" \
--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": "CIRCL/vulnerability-description-generation-gpt2-xl",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "CIRCL/vulnerability-description-generation-gpt2-xl" \
--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": "CIRCL/vulnerability-description-generation-gpt2-xl",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use CIRCL/vulnerability-description-generation-gpt2-xl with Docker Model Runner:
docker model run hf.co/CIRCL/vulnerability-description-generation-gpt2-xl
This model is a fine-tuned version of gpt2-xl on the dataset CIRCL/vulnerability.
It achieves the following results on the evaluation set:
It is a text generation model and is aimed to assist in writing vulnerability descriptions.
from transformers import pipeline
pipe = pipeline("text-generation", model="CIRCL/vulnerability-description-generation-gpt2-xl")
>>> print(pipe("A new vulnerability in OpenSSL allows", max_length=300))
[{'generated_text': 'A new vulnerability in OpenSSL allows remote attackers to create insecure connections. The impact of this vulnerability is that one or more TLS connections will be created under one username or one username/logon in a session for which another username or logon is valid. An attacker that can control the username or logon string of an openSSL host can effectively manipulate the OpenSSL host in a way that enables the attacker to create arbitrary openSSL connections by calling `http-server-create` in a non-secure sequence across other hosts. The vulnerability may be used to perform a man-in-the-middle attack, making the attacker completely different to the attacker. An exploitation may include MITM attacks and man-in-the-middle attacks. NOTE: the vendor states that "SUSE OpenSSL\'s implementation of \'openSSL_connect`, is not vulnerable to MITM attacks. If the attack vector is a MITM attack, OpenSSL will work under any circumstances." The CVE has been assigned for tracking purposes. In no way does the vendor\'s position change that an OpenSSL client should not use openSSL in the context of another OpenSSL server, but an attacker must choose the vulnerability according to their configuration if they are to exploit their attack. NOTE: the vendor indicates that it has considered the impact of this vulnerability "moderate". If by any measure, an OpenSSL client is susceptible to MITM attacks, that vulnerability would be considered low because it would be difficult to exploit a vulnerability that'}]
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 0.9951 | 1.0 | 24295 | 1.9421 |
| 0.9311 | 2.0 | 48590 | 1.8412 |
| 0.914 | 3.0 | 72885 | 1.8131 |
Base model
openai-community/gpt2-xl