Text Generation
Transformers
Safetensors
PEFT
English
llama
llama-3
finetuned
cyber-security
reasoning
instruction-tuning
lora
conversational
text-generation-inference
4-bit precision
bitsandbytes
Instructions to use OpenPathAI/Orbit-3-8B-Llama-thinking with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenPathAI/Orbit-3-8B-Llama-thinking with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OpenPathAI/Orbit-3-8B-Llama-thinking") 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("OpenPathAI/Orbit-3-8B-Llama-thinking") model = AutoModelForCausalLM.from_pretrained("OpenPathAI/Orbit-3-8B-Llama-thinking", 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]:])) - PEFT
How to use OpenPathAI/Orbit-3-8B-Llama-thinking with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OpenPathAI/Orbit-3-8B-Llama-thinking with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenPathAI/Orbit-3-8B-Llama-thinking" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenPathAI/Orbit-3-8B-Llama-thinking", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/OpenPathAI/Orbit-3-8B-Llama-thinking
- SGLang
How to use OpenPathAI/Orbit-3-8B-Llama-thinking 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 "OpenPathAI/Orbit-3-8B-Llama-thinking" \ --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": "OpenPathAI/Orbit-3-8B-Llama-thinking", "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 "OpenPathAI/Orbit-3-8B-Llama-thinking" \ --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": "OpenPathAI/Orbit-3-8B-Llama-thinking", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use OpenPathAI/Orbit-3-8B-Llama-thinking with Docker Model Runner:
docker model run hf.co/OpenPathAI/Orbit-3-8B-Llama-thinking
File size: 4,773 Bytes
1f5e4bf 0304b08 af2fcaf 0304b08 af2fcaf 0304b08 ada7004 1f5e4bf 0304b08 f64aa28 0304b08 af2fcaf f64aa28 0304b08 f64aa28 0304b08 f64aa28 0304b08 af2fcaf 0304b08 f64aa28 0304b08 f64aa28 5c48534 f64aa28 0304b08 af2fcaf f64aa28 af2fcaf f64aa28 af2fcaf f64aa28 af2fcaf f64aa28 af2fcaf f64aa28 af2fcaf f64aa28 af2fcaf f64aa28 af2fcaf f64aa28 af2fcaf 0304b08 f64aa28 af2fcaf f64aa28 af2fcaf f64aa28 af2fcaf f64aa28 0304b08 af2fcaf 0304b08 af2fcaf 0304b08 af2fcaf 0304b08 f64aa28 0304b08 af2fcaf 0304b08 af2fcaf 0304b08 af2fcaf f64aa28 0304b08 f64aa28 0304b08 f64aa28 0304b08 f64aa28 0304b08 f64aa28 0304b08 f64aa28 0304b08 f64aa28 0304b08 f64aa28 0304b08 f64aa28 0304b08 f64aa28 0304b08 af2fcaf f64aa28 0304b08 af2fcaf f64aa28 0304b08 af2fcaf 0304b08 f64aa28 0304b08 af2fcaf f64aa28 af2fcaf f64aa28 af2fcaf f64aa28 af2fcaf f64aa28 af2fcaf 0304b08 f64aa28 af2fcaf f64aa28 af2fcaf f64aa28 af2fcaf f64aa28 af2fcaf f64aa28 af2fcaf f64aa28 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | ---
license: apache-2.0
library_name: transformers
tags:
- llama
- llama-3
- finetuned
- cyber-security
- reasoning
- instruction-tuning
- lora
- peft
- text-generation
language:
- en
pipeline_tag: text-generation
base_model: meta-llama/Meta-Llama-3-8B-Instruct
new_version: OpenPathAI/Orbit-3.1-Llama-thinking
---
# Orbit-3-8B-Llama-thinking
**A Fine-tuned Llama 3 for Advanced Cybersecurity Reasoning**
---
## Overview
Orbit-3-8B-Llama-thinking is a language model fine-tuned from `meta-llama/Meta-Llama-3-8B-Instruct` using a cybersecurity reasoning dataset to enhance its analytical reasoning and problem-solving capabilities in the cybersecurity domain.
This model is specifically designed for:
- Malware analysis and threat intelligence
- Secure programming and code writing
- Security documentation and best practices
- Exploit research and vulnerability analysis
- Reasoning for security problem-solving
---
## Model Architecture
| Component | Detail |
|-----------|--------|
| Base Model | `meta-llama/Meta-Llama-3-8B-Instruct` |
| Model Type | Causal Language Model (Decoder-only) |
| Total Parameters | 8.07 Billion |
| Trained Parameters | 41.9 Million (0.52%) |
| Architecture | Transformer-based |
| Context Length | 8.192 tokens (during training) |
| Language | English |
---
## Training Configuration
| Parameter | Value |
|-----------|-------|
| Training Epochs | 3 |
| Fine-tuning Method | LoRA (Low-Rank Adaptation) |
| Precision | FP16 |
| Learning Rate | 2e-4 |
| Batch Size | 2 (per device) |
| Gradient Accumulation | 16 |
| Optimizer | AdamW |
| Warmup Steps | 100 |
| Max Gradient Norm | 1.0 |
### LoRA Configuration
| Parameter | Value |
|-----------|-------|
| LoRA Rank (r) | 16 |
| LoRA Alpha | 32 |
| LoRA Dropout | 0.05 |
| Bias | None |
| Target Modules | `q_proj`, `k_proj`, `v_proj`, `o_proj`, `gate_proj`, `up_proj`, `down_proj` |
---
## Dataset Distribution
| Domain | Description |
|--------|-------------|
| `programming_general` | General programming and secure code writing |
| `soc_threat_intel` | SOC operations and threat intelligence |
| `malware_analysis` | Malware triage and analysis |
| `security_docs` | Security documentation and best practices |
| `exploit_development` | Exploit research and vulnerability analysis |
| `tool_calls` | Security tool usage and automation |
---
### Installation
```bash
pip install transformers torch accelerate
```
Basic Usage
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
MODEL_NAME = "OpenPathAI/Orbit-3-8B-Llama-thinking"
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
model = AutoModelForCausalLM.from_pretrained(
MODEL_NAME,
torch_dtype=torch.float16,
device_map="auto",
)
question = "Explain about malware and how to prevent it"
prompt = f"### Instruction:\n{question}\n\n### Response:\n"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=256,
temperature=0.7,
top_p=0.9,
do_sample=True,
pad_token_id=tokenizer.eos_token_id,
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
response = response.replace(prompt, "").strip()
print(response)
```
---
Chat Format
Standard Format
```
### Instruction:
[Your question or instruction]
### Response:
[The model's answer]
```
With System Prompt
```
### System:
[System instruction or context]
### Instruction:
[Your question or instruction]
### Response:
[The model's answer]
```
Example
Input:
```
### System:
You are a cybersecurity expert. Provide detailed and accurate information.
### Instruction:
How can SQL injection attacks be prevented?
### Response:
```
Output:
```
SQL injection attacks can be prevented through several methods:
1. Use parameterized queries (prepared statements)
2. Validate and sanitize input
3. Escape special characters
4. Use ORM frameworks
5. Apply the principle of least privilege
```
---
Recommended Use Cases
- Cybersecurity education and training
- Security documentation creation
- Code review and secure coding assistance
- Threat intelligence analysis
- Security best practice recommendations
---
Responsible Use Guidelines
Guideline Description
Educational Use Use for learning and research purposes
Defensive Security Help improve security posture
Illegal Activities DO NOT use for illegal activities
Malware Creation DO NOT use to create malicious software
Human Oversight Always verify security advice with experts
---
License
This model is licensed under the Apache License 2.0. See LICENSE for more details.
---
Developed by OpenPathAI
This model was fine-tuned using LoRA and merged with the base model for ease of use. |