halencarjunior commited on
Commit
aeb3665
·
verified ·
1 Parent(s): ef79a77

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +50 -30
README.md CHANGED
@@ -1,60 +1,80 @@
1
  ---
2
  library_name: peft
3
- license: other
4
  base_model: meta-llama/Llama-3.2-3B-Instruct
 
 
5
  tags:
6
  - base_model:adapter:meta-llama/Llama-3.2-3B-Instruct
7
  - llama-factory
8
  - lora
9
  - transformers
 
 
 
 
10
  pipeline_tag: text-generation
11
  model-index:
12
  - name: train_cis_2025
13
  results: []
 
 
14
  ---
15
 
16
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
17
- should probably proofread and complete it, then remove this comment. -->
18
 
19
- # train_cis_2025
20
 
21
- This model is a fine-tuned version of [meta-llama/Llama-3.2-3B-Instruct](https://huggingface.co/meta-llama/Llama-3.2-3B-Instruct) on the cis_aws and the identity datasets.
22
 
23
- ## Model description
24
 
25
- More information needed
 
26
 
27
- ## Intended uses & limitations
 
 
 
 
28
 
29
- More information needed
30
 
31
- ## Training and evaluation data
32
 
33
- More information needed
 
 
 
34
 
35
- ## Training procedure
36
 
37
- ### Training hyperparameters
38
 
39
- The following hyperparameters were used during training:
40
- - learning_rate: 5e-05
41
- - train_batch_size: 2
42
- - eval_batch_size: 8
43
- - seed: 42
44
- - gradient_accumulation_steps: 8
45
- - total_train_batch_size: 16
46
- - optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
47
- - lr_scheduler_type: cosine
48
- - num_epochs: 3.0
49
 
50
- ### Training results
 
51
 
 
 
 
 
 
 
 
52
 
 
 
53
 
54
- ### Framework versions
 
 
 
55
 
56
- - PEFT 0.17.1
57
- - Transformers 4.57.3
58
- - Pytorch 2.9.1+cu128
59
- - Datasets 4.0.0
60
- - Tokenizers 0.22.1
 
1
  ---
2
  library_name: peft
3
+ license: llama3.2
4
  base_model: meta-llama/Llama-3.2-3B-Instruct
5
+ language:
6
+ - en
7
  tags:
8
  - base_model:adapter:meta-llama/Llama-3.2-3B-Instruct
9
  - llama-factory
10
  - lora
11
  - transformers
12
+ - security
13
+ - aws
14
+ - cis-benchmark
15
+ - compliance
16
  pipeline_tag: text-generation
17
  model-index:
18
  - name: train_cis_2025
19
  results: []
20
+ datasets:
21
+ - halencarjunior/cis_aws_foundation_benchmark_5_0
22
  ---
23
 
24
+ # CIS AWS Foundations Benchmark v5.0.0 - Fine-Tuned Llama 3.2 3B
 
25
 
26
+ This model is a fine-tuned version of [meta-llama/Llama-3.2-3B-Instruct](https://huggingface.co/meta-llama/Llama-3.2-3B-Instruct) specialized in AWS Cloud Security and Compliance. It has been trained on the **CIS Amazon Web Services Foundations Benchmark v5.0.0** (released March 31, 2025).
27
 
28
+ ## Model Description
29
 
30
+ This model acts as a specialized security assistant for AWS environments. It possesses deep knowledge of the consensus-based best practices for securing Amazon Web Services accounts and resources. The fine-tuning process utilized the specific guidance found in the CIS AWS Foundations Benchmark v5.0.0.
31
 
32
+ ### Key Knowledge Areas
33
+ The model is trained to understand, audit, and provide remediation steps for the following domains covered in the benchmark:
34
 
35
+ * [cite_start]**Identity and Access Management (IAM):** Configuring root accounts, password policies, MFA, access keys, and roles[cite: 2912].
36
+ * [cite_start]**Storage:** Securing S3 buckets (blocking public access, encryption), RDS instances, and EFS encryption[cite: 2914].
37
+ * [cite_start]**Logging:** Configuration of CloudTrail, AWS Config, and S3 server access logging[cite: 2914].
38
+ * [cite_start]**Monitoring:** Setting up CloudWatch alarms for unauthorized API calls, sign-in failures, and changes to network gateways/security groups[cite: 2914, 2916].
39
+ * [cite_start]**Networking:** Securing VPCs, Security Groups, NACLs, and EC2 instance metadata services (IMDSv2)[cite: 2916].
40
 
41
+ ## Intended Uses & Capabilities
42
 
43
+ This model is designed for DevSecOps engineers, Cloud Architects, and Security Auditors who need quick access to compliance rules and remediation scripts.
44
 
45
+ **Use cases include:**
46
+ * **Q&A on Compliance:** Ask specific questions like "How do I ensure CloudTrail is enabled in all regions?" or "What is the remediation for unauthorized API calls monitoring?".
47
+ * **Remediation Steps:** Generate CLI commands or Console steps to fix security findings.
48
+ * **Audit Procedures:** Retrieve the specific commands to verify if a resource is compliant with CIS v5.0.0.
49
 
50
+ ## How to Use
51
 
52
+ To use this model, you need to load the base model and the LoRA adapter.
53
 
54
+ ```python
55
+ import torch
56
+ from transformers import AutoTokenizer, AutoModelForCausalLM
57
+ from peft import PeftModel
 
 
 
 
 
 
58
 
59
+ base_model_id = "meta-llama/Llama-3.2-3B-Instruct"
60
+ adapter_model_id = "halencarjunior/cis_aws_foundation_benchmark_5_0"
61
 
62
+ # 1. Load Base Model
63
+ tokenizer = AutoTokenizer.from_pretrained(base_model_id)
64
+ base_model = AutoModelForCausalLM.from_pretrained(
65
+ base_model_id,
66
+ torch_dtype=torch.float16,
67
+ device_map="auto"
68
+ )
69
 
70
+ # 2. Load Adapter
71
+ model = PeftModel.from_pretrained(base_model, adapter_model_id)
72
 
73
+ # 3. Inference
74
+ messages = [
75
+ {"role": "user", "content": "How do I ensure that S3 buckets are configured with 'Block Public Access' enabled according to CIS v5.0?"}
76
+ ]
77
 
78
+ inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to("cuda")
79
+ outputs = model.generate(inputs, max_new_tokens=512)
80
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))