Text Generation
PEFT
Safetensors
Transformers
lora
cybersecurity
vulnerability-remediation
cve
conversational
Instructions to use ramitha2002/SecFix-CVE-Remediation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ramitha2002/SecFix-CVE-Remediation with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("fdtn-ai/Foundation-Sec-8B-Instruct") model = PeftModel.from_pretrained(base_model, "ramitha2002/SecFix-CVE-Remediation") - Transformers
How to use ramitha2002/SecFix-CVE-Remediation with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ramitha2002/SecFix-CVE-Remediation") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ramitha2002/SecFix-CVE-Remediation", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ramitha2002/SecFix-CVE-Remediation with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ramitha2002/SecFix-CVE-Remediation" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ramitha2002/SecFix-CVE-Remediation", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ramitha2002/SecFix-CVE-Remediation
- SGLang
How to use ramitha2002/SecFix-CVE-Remediation 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 "ramitha2002/SecFix-CVE-Remediation" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ramitha2002/SecFix-CVE-Remediation", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "ramitha2002/SecFix-CVE-Remediation" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ramitha2002/SecFix-CVE-Remediation", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ramitha2002/SecFix-CVE-Remediation with Docker Model Runner:
docker model run hf.co/ramitha2002/SecFix-CVE-Remediation
| {"best_metric": 0.0016579071525484324, "best_model_checkpoint": "/root/i/j/server/outputs/checkpoints/secfix_server_lora/checkpoint-6250", "epoch": 1.0, "epoch_number": 1, "global_step": 6250, "logs": [{"epoch": 0.992, "grad_norm": 0.0026881410740315914, "learning_rate": 3.4926330210360846e-09, "loss": 0.016918934881687164, "step": 6200}, {"epoch": 0.9952, "grad_norm": 0.0003010830550920218, "learning_rate": 1.2904819436210247e-09, "loss": 4.504423122853041e-05, "step": 6220}, {"epoch": 0.9984, "grad_norm": 0.002738719340413809, "learning_rate": 1.6248829433518355e-10, "loss": 0.000680431816726923, "step": 6240}, {"epoch": 1.0, "eval_loss": 0.0016579071525484324, "eval_runtime": 251.4825, "eval_samples_per_second": 39.764, "eval_steps_per_second": 9.941, "step": 6250}]} | |