Text Generation
Transformers
Safetensors
English
code
t5
text2text-generation
security
vulnerability-fix
code-repair
code-generation
codet5
owasp
cwe
Eval Results (legacy)
text-generation-inference
Instructions to use ayshajavd/codet5p-vuln-fixer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ayshajavd/codet5p-vuln-fixer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ayshajavd/codet5p-vuln-fixer")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("ayshajavd/codet5p-vuln-fixer") model = AutoModelForSeq2SeqLM.from_pretrained("ayshajavd/codet5p-vuln-fixer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ayshajavd/codet5p-vuln-fixer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ayshajavd/codet5p-vuln-fixer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ayshajavd/codet5p-vuln-fixer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ayshajavd/codet5p-vuln-fixer
- SGLang
How to use ayshajavd/codet5p-vuln-fixer 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 "ayshajavd/codet5p-vuln-fixer" \ --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": "ayshajavd/codet5p-vuln-fixer", "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 "ayshajavd/codet5p-vuln-fixer" \ --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": "ayshajavd/codet5p-vuln-fixer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ayshajavd/codet5p-vuln-fixer with Docker Model Runner:
docker model run hf.co/ayshajavd/codet5p-vuln-fixer
v3: Test metrics (BLEU/ROUGE/exact_match)
Browse files- test_metrics.json +12 -0
test_metrics.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"test_loss": 0.5855351090431213,
|
| 3 |
+
"test_bleu": 80.9960114403252,
|
| 4 |
+
"test_rouge1": 0.8024324514048476,
|
| 5 |
+
"test_rouge2": 0.7445122033334747,
|
| 6 |
+
"test_rougeL": 0.787991981438898,
|
| 7 |
+
"test_codebleu": 0.0,
|
| 8 |
+
"test_exact_match": 0.01381509032943677,
|
| 9 |
+
"test_runtime": 1021.1841,
|
| 10 |
+
"test_samples_per_second": 0.921,
|
| 11 |
+
"test_steps_per_second": 0.058
|
| 12 |
+
}
|