Views
No views yet
cyberslm-33m-base —
a 33.5M-parameter cybersecurity-focused small language model trained from
scratch, then supervised-finetuned on 24,980 cybersecurity Q&A
conversations with loss masking on assistant tokens only.LlamaForCausalLM):
384 hidden / 12 layers / 6 heads / SwiGLU 1024 / RMSNorm / RoPE θ=10,000 /
4096 context / 32k SentencePiece vocab / tied embeddings.
Total: 33,531,264 parameters.tokenizer.chat_template):<s>### User:
{question}
### Assistant:
{answer}</s>1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3tok = AutoTokenizer.from_pretrained("sabari2005/cyberslm-33m-instruct")
4model = AutoModelForCausalLM.from_pretrained("sabari2005/cyberslm-33m-instruct")
5
6messages = [{"role": "user", "content": "Explain what a SQL injection attack is and how to prevent it."}]
7ids = tok.apply_chat_template(messages, add_generation_prompt=True,
8 return_tensors="pt", add_special_tokens=False)
9out = model.generate(ids, max_new_tokens=256, do_sample=True,
10 temperature=0.7, top_p=0.9, eos_token_id=3, pad_token_id=0)
11print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))Note: the<s>/</s>markers in the template are literal text (the SentencePiece vocab uses<bos>/<eos>pieces), matching exactly how the model was trained. Useapply_chat_templateand you don't need to think about it.