AlicanKiraz0/All-CVE-Records-Training-Dataset
Viewer • Updated • 297k • 5.71k • 59
How to use Kushalkhemka/CyberOSS-CVE with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Kushalkhemka/CyberOSS-CVE")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Kushalkhemka/CyberOSS-CVE")
model = AutoModelForCausalLM.from_pretrained("Kushalkhemka/CyberOSS-CVE")
messages = [
{"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use Kushalkhemka/CyberOSS-CVE with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Kushalkhemka/CyberOSS-CVE"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Kushalkhemka/CyberOSS-CVE",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/Kushalkhemka/CyberOSS-CVE
How to use Kushalkhemka/CyberOSS-CVE with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Kushalkhemka/CyberOSS-CVE" \
--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": "Kushalkhemka/CyberOSS-CVE",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "Kushalkhemka/CyberOSS-CVE" \
--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": "Kushalkhemka/CyberOSS-CVE",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use Kushalkhemka/CyberOSS-CVE with Docker Model Runner:
docker model run hf.co/Kushalkhemka/CyberOSS-CVE
Fine-tuned gpt-oss-20b on the AlicanKiraz0/All-CVE-Records-Training-Dataset using Unsloth with LoRA (rank 32) and merged back to BF16 for compatibility with vLLM, Hugging Face Transformers, and GGUF conversions.
unsloth/gpt-oss-20b-BF16AlicanKiraz0/All-CVE-Records-Training-Datasetmodel-0000X-of-00009.safetensors: merged BF16 shardsconfig.json: GPT-OSS architecture configtokenizer.json and template: Harmony/GPT-OSS chat formatchat_template.jinja: OpenAI Harmony-compatible chat templatepip install vllm==0.11.2 transformers==4.57.2
python - <<'PY'
from vllm import LLM, SamplingParams
from transformers.processing_utils import ProcessorMixin
import transformers
transformers.ProcessorMixin = ProcessorMixin
llm = LLM(
model="Kushalkhemka/CyberOSS-CVE",
tokenizer="unsloth/gpt-oss-20b-BF16",
dtype="bfloat16",
)
prompt = "You are a cybersecurity assistant. Summarize CVE-2010-3763."
out = llm.generate([prompt], SamplingParams(max_tokens=128))[0]
print(out.outputs[0].text)
PY
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("Kushalkhemka/CyberOSS-CVE", torch_dtype="bfloat16", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("unsloth/gpt-oss-20b-BF16")
Matches upstream unsloth/gpt-oss-20b (LGPL-3.0). Respect dataset terms when redistributing.
docker model run hf.co/Kushalkhemka/CyberOSS-CVE