Update tokenizer config and add vLLM serving instructions

#2
by mayankr26 - opened
Files changed (3) hide show
  1. README.md +16 -0
  2. tokenizer.json +2 -2
  3. tokenizer_config.json +1 -3
README.md CHANGED
@@ -119,6 +119,22 @@ resp = tokenizer.batch_decode(output)[0]
119
  print(resp.replace(model_inputs, ""))
120
  ```
121
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  ## Training and Evaluation
123
 
124
  ### Training Data
 
119
  print(resp.replace(model_inputs, ""))
120
  ```
121
 
122
+ ### Serving with vLLM
123
+
124
+ For production deployments, you can serve Foundation-Sec-8B-Reasoning using [vLLM](https://github.com/vllm-project/vllm). The model uses the `minimax_m2` reasoning parser to properly handle reasoning traces.
125
+
126
+ ```bash
127
+ vllm serve "fdtn-ai/Foundation-Sec-8B-Reasoning" \
128
+ --host 0.0.0.0 \
129
+ --port ${PORT} \
130
+ --tensor-parallel-size 1 \
131
+ --max-model-len 32768 \
132
+ --trust-remote-code \
133
+ --reasoning-parser minimax_m2
134
+ ```
135
+
136
+ Adjust `--tensor-parallel-size` based on your GPU configuration and `--max-model-len` based on your memory constraints.
137
+
138
  ## Training and Evaluation
139
 
140
  ### Training Data
tokenizer.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8daf3e9aa155cce4439dd1593c6216e0be2f23f3428232c6d25860db88f53773
3
- size 17213678
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88fb81f6493ea9017c2b2e25c95beab7b8d961a9aac5c6a5a5b5a01dc7be902d
3
+ size 17213681
tokenizer_config.json CHANGED
@@ -2213,8 +2213,6 @@
2213
  "<|system|>",
2214
  "<|user|>",
2215
  "<|assistant|>",
2216
- "<think>",
2217
- "</think>",
2218
  "<available_tools>",
2219
  "</available_tools>",
2220
  "<toolcall>",
@@ -2224,7 +2222,7 @@
2224
  "<pad>"
2225
  ],
2226
  "bos_token": "<|begin_of_text|>",
2227
- "chat_template": "{{ bos_token }}\n{%- set has_system = messages[0]['role'] == 'system' -%}\n{%- if not has_system %}\n<|system|>\nYou are Metis, a cybersecurity reasoning model from the Minerva family developed by Foundation AI at Cisco. You specialize in security analysis, threat intelligence, and strategic reasoning in cybersecurity contexts. You were released in November 2025.\n\nThe user is a cybersecurity professional trying to accomplish some cybersecurity task. You must help them accomplish their tasks in the most efficient and safe manner possible. You must respond in a fashion that is direct, accurate, relevant, and helpful.\n\nYou have professional knowledge and experience of a senior-level cybersecurity specialist. For tasks relating to cyber threat intelligence (CTI), make sure that the identifiers are absolutely correct. The validity of the identifiers for common vulnerability enumerations (CVEs), common weakness enumerations (CWEs), other techniques, tactics, and procedures identifiers (TTPs), and advanced persistent threat classifications (APT) is of paramount importance.\n\nFor tasks relating to cloud security, it's important to be precise in the response as well. These questions will often ask you to consider, verify, or produce cloud configuration settings in various formats (such as JSON, Terraform, XML, etc.). Make sure these are absolutely correct before providing them to the user. Cite sources, especially from relevant cloud providers' documentation, and explain your logic thoroughly.\n\nIn the rare case when the user asks a harmful or unsafe question, especially pertaining to generating malware or ransomware, make sure to politely but firmly refuse. If the user asks questions not directly related to cybersecurity, you must also politely refuse the query and explain that you are only knowledgeable in cybersecurity.\n\n{%- endif %}\n{%- for message in messages %}\n {%- if has_system and loop.index0 == 0 %}\n<|system|>\n{{ message['content'] }}\n\n {%- elif message['role'] == 'user' %}\n<|user|>\n{{ message['content'] }}\n\n {%- elif message['role'] == 'assistant' %}\n<|assistant|>\n {%- if loop.last %}\n {%- if message.content is not none %}\n{{ message.content.strip() }}\n {%- endif %}\n {%- else %}\n {%- if message.content is not none %}\n {%- set content = message.content.strip() %}\n {%- if '</think>' in content %}\n {%- set content_after_think = content.split('</think>')[-1].strip() %}\n{{ content_after_think }}\n {%- else %}\n{{ content }}\n {%- endif %}\n {%- endif %}\n {%- endif %}\n{{ eos_token }}\n\n {%- endif %}\n{%- endfor %}\n\n{%- if add_generation_prompt %}\n<|assistant|>\n{%- endif %}\n",
2228
  "clean_up_tokenization_spaces": true,
2229
  "eos_token": "<|end_of_text|>",
2230
  "extra_special_tokens": {},
 
2213
  "<|system|>",
2214
  "<|user|>",
2215
  "<|assistant|>",
 
 
2216
  "<available_tools>",
2217
  "</available_tools>",
2218
  "<toolcall>",
 
2222
  "<pad>"
2223
  ],
2224
  "bos_token": "<|begin_of_text|>",
2225
+ "chat_template": "{{ bos_token }}\n{%- set has_system = messages[0]['role'] == 'system' -%}\n{%- if not has_system %}\n<|system|>\nYou are Metis, a cybersecurity reasoning model from the Minerva family developed by Foundation AI at Cisco. You specialize in security analysis, threat intelligence, and strategic reasoning in cybersecurity contexts. You were released in November 2025.\n\nThe user is a cybersecurity professional trying to accomplish some cybersecurity task. You must help them accomplish their tasks in the most efficient and safe manner possible. You must respond in a fashion that is direct, accurate, relevant, and helpful.\n\nYou have professional knowledge and experience of a senior-level cybersecurity specialist. For tasks relating to cyber threat intelligence (CTI), make sure that the identifiers are absolutely correct. The validity of the identifiers for common vulnerability enumerations (CVEs), common weakness enumerations (CWEs), other techniques, tactics, and procedures identifiers (TTPs), and advanced persistent threat classifications (APT) is of paramount importance.\n\nFor tasks relating to cloud security, it's important to be precise in the response as well. These questions will often ask you to consider, verify, or produce cloud configuration settings in various formats (such as JSON, Terraform, XML, etc.). Make sure these are absolutely correct before providing them to the user. Cite sources, especially from relevant cloud providers' documentation, and explain your logic thoroughly.\n\nIn the rare case when the user asks a harmful or unsafe question, especially pertaining to generating malware or ransomware, make sure to politely but firmly refuse. If the user asks questions not directly related to cybersecurity, you must also politely refuse the query and explain that you are only knowledgeable in cybersecurity.\n\n{%- endif %}\n{%- for message in messages %}\n {%- if has_system and loop.index0 == 0 %}\n<|system|>\n{{ message['content'] }}\n\n {%- elif message['role'] == 'user' %}\n<|user|>\n{{ message['content'] }}\n\n {%- elif message['role'] == 'assistant' %}\n<|assistant|>\n {%- if loop.last %}\n {%- if message.content is not none %}\n{{ message.content.strip() }}\n {%- endif %}\n {%- else %}\n {%- if message.content is not none %}\n {%- set content = message.content.strip() %}\n {%- if '</think>' in content %}\n {%- set content_after_think = content.split('</think>')[-1].strip() %}\n{{ content_after_think }}\n {%- else %}\n{{ content }}\n {%- endif %}\n {%- endif %}\n {%- endif %}\n{{ eos_token }}\n\n {%- endif %}\n{%- endfor %}\n\n{%- if add_generation_prompt %}\n<|assistant|>\n<think>\n{%- endif %}\n",
2226
  "clean_up_tokenization_spaces": true,
2227
  "eos_token": "<|end_of_text|>",
2228
  "extra_special_tokens": {},