Run this model with HF Jobs
Run trend-cybertron/Llama-Primus-Nemotron-70B-Base on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/trend-cybertron/Llama-Primus-Nemotron-70B-Base. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/trend-cybertron/Llama-Primus-Nemotron-70B-Base on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/trend-cybertron/Llama-Primus-Nemotron-70B-Base. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/trend-cybertron/Llama-Primus-Nemotron-70B-Base. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use trend-cybertron/Llama-Primus-Nemotron-70B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use trend-cybertron/Llama-Primus-Nemotron-70B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="trend-cybertron/Llama-Primus-Nemotron-70B-Base") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("trend-cybertron/Llama-Primus-Nemotron-70B-Base") model = AutoModelForCausalLM.from_pretrained("trend-cybertron/Llama-Primus-Nemotron-70B-Base", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use trend-cybertron/Llama-Primus-Nemotron-70B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "trend-cybertron/Llama-Primus-Nemotron-70B-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "trend-cybertron/Llama-Primus-Nemotron-70B-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/trend-cybertron/Llama-Primus-Nemotron-70B-Base
- SGLang
How to use trend-cybertron/Llama-Primus-Nemotron-70B-Base 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 "trend-cybertron/Llama-Primus-Nemotron-70B-Base" \ --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": "trend-cybertron/Llama-Primus-Nemotron-70B-Base", "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 "trend-cybertron/Llama-Primus-Nemotron-70B-Base" \ --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": "trend-cybertron/Llama-Primus-Nemotron-70B-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use trend-cybertron/Llama-Primus-Nemotron-70B-Base with Docker Model Runner:
docker model run hf.co/trend-cybertron/Llama-Primus-Nemotron-70B-Base
Llama-Primus-Nemotron-70B-Base
Introduction
The Llama-Primus-Nemotron series builds upon nvidia/Llama-3.1-Nemotron-70B-Instruct through continued training. Following the same methodology as described in the Primus paper, we first performed pre-training on large-scale cybersecurity corpora (over 10B tokens) to obtain Llama-Primus-Nemotron-Base. We then conducted supervised-finetuning and applied DELLA to merge with the original Nemotron, resulting in Llama-Primus-Nemotron-70B-Instruct.
Llama-Primus-Nemotron-Base achieves an 11.19% improvement in aggregate scores across several public cybersecurity benchmarks.
Benchmark Result
Cybersecurity
| Metric (5-shot, w/o chat template) | Llama-3.1-Nemotron-70B-Instruct | Llama-Primus-Nemotron-70B-Base |
|---|---|---|
| CTI-Bench (MCQ) | 0.6900 | 0.7148 |
| CTI-Bench (CVE → CWE) | 0.6590 | 0.7410 |
| CTI-Bench (CVSS, lower is better) | 1.1893 | 1.0281 |
| CTI-Bench (ATE) | 0.3905 | 0.4540 |
| CyberMetric (500) | 0.9380 | 0.9280 |
| SecEval | 0.7177 | 0.7208 |
| CISSP (Exam Questions) | 0.8527 | 0.8703 |
| Aggregate | 3.0586 | 3.4008 ↑11.19% 🔥 |
CTI-Bench(CVSS) is scored using Mean Absolute Deviation (lower is better), CTI-ATE uses F1 score, and the others use accuracy. The aggregate score (Agg.) is the sum of all benchmarks, with CTI-Bench(CVSS) negated.
References:
- CyberMetric: CyberMetric: A Benchmark Dataset based on Retrieval-Augmented...
- CTI-Bench: CTIBench: A Benchmark for Evaluating LLMs in Cyber Threat Intelligence
- SecEval: SecEval: A Comprehensive Benchmark for Evaluating Cybersecurity Knowledge of Foundation Models
Training Datasets
Pre-training:
- Primus-Seed-V2 (0.417B): An enhanced version of Primus-Seed, enriched with blogs, news, books, websites, Wikipedia, MITRE and Trend Micro knowledge.
- Primus-FineWeb (2.57B): Cybersecurity text filtered from FineWeb-edu-score-2. Link
- Primus-Nemotron-CC (7.6B): Cybersecurity text filtered from Nemotron-CC. Link
Note: Dataset Primus-Seed-V2 is not yet open-sourced and are currently under discussion. Feel free to reach out if you're interested.
Disclaimer: No Trend Micro customer information is included.
About Primus
Primus is Trend Micro's pioneering family of lightweight, state-of-the-art open cybersecurity language models and datasets. Developed through our cutting-edge research initiatives and advanced technology, these resources share the innovative foundation that powers our enterprise-class Trend Cybertron solution. As an industry leader in cybersecurity, Trend Micro is proud to contribute these powerful, efficiency-optimized models and datasets to the community, while maintaining the excellence and reliability that define our global security standards.
Acknowledgments
We would like to thank NVIDIA for generously providing computing resources (Taipei-1), which enabled the training and development of this model.
License
This model is based on the MIT license, but you must also comply with the Llama 3.1 Community License Agreement.
- Downloads last month
- 91
Model tree for trend-cybertron/Llama-Primus-Nemotron-70B-Base
Base model
meta-llama/Llama-3.1-70B