Views
No views yet
model-00001-of-00009.safetensors ... model-00009-of-00009.safetensors), tokenizer artifacts, and the chat template. Download via huggingface-cli download Kushalkhemka/CVE-OSS or the code sample below.1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4model_id = "Kushalkhemka/CVE-OSS"
5tokenizer = AutoTokenizer.from_pretrained(model_id)
6model = AutoModelForCausalLM.from_pretrained(
7 model_id,
8 torch_dtype=torch.bfloat16,
9 device_map="auto",
10)
11
12messages = [
13 {"role": "system", "content": "You are a seasoned CVE analyst."},
14 {"role": "user", "content": "Provide an in-depth brief on CVE-2021-3712."},
15]
16input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
17output = model.generate(input_ids, max_new_tokens=600, temperature=0.2)
18print(tokenizer.decode(output[0], skip_special_tokens=True))