metadata
base_model: meta-llama/Llama-3.2-3B-Instruct
library_name: peft
pipeline_tag: text-generation
tags:
- base_model:adapter:meta-llama/Llama-3.2-3B-Instruct
- lora
- transformers
- configuration-management
- secrets-management
- devops
- multi-cloud
license: mit
language:
- en
AnySecret Assistant
A specialized AI assistant for AnySecret configuration management, fine-tuned on Llama-3.2-3B-Instruct to help with multi-cloud secrets and parameters management.
Model Details
Model Description
This is a LoRA fine-tuned version of Llama-3.2-3B-Instruct, specifically trained to assist with AnySecret configuration management across AWS, GCP, Azure, and Kubernetes environments. The model can help with CLI commands, configuration setup, CI/CD integration, and Python SDK usage.
- Developed by: anysecret-io
- Model type: Causal Language Model (LoRA Adapter)
- Language(s) (NLP): English
- License: MIT
- Finetuned from model: meta-llama/Llama-3.2-3B-Instruct
Model Sources
- Repository: https://github.com/anysecret-io/anysecret-lib
- Documentation: https://docs.anysecret.io
- Demo: Coming soon
Uses
Direct Use
This model is designed to provide expert assistance with:
- AnySecret CLI commands and usage patterns
- Multi-cloud configuration (AWS, GCP, Azure, Kubernetes)
- Secrets vs parameters classification and management
- CI/CD pipeline integration
- Python SDK implementation guidance
Example Usage
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.2-3B-Instruct")
model = PeftModel.from_pretrained(base_model, "anysecret-io/anysecret-assistant")
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-3B-Instruct")
prompt = "### Instruction:\nHow do I configure AnySecret for AWS?\n\n### Response:\n"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=256)
Out-of-Scope Use
This model is specifically trained for AnySecret configuration management and may not perform well on:
- General programming questions unrelated to configuration management
- Other secrets management tools or platforms
- Security vulnerabilities or exploitation techniques
Training Details
Training Data
The model was trained on 43 curated examples across 7 categories:
- CLI Commands (9 examples) - Command usage patterns
- AWS Configuration (6 examples) - AWS Secrets Manager integration
- GCP Configuration (6 examples) - Google Secret Manager setup
- Azure Configuration (6 examples) - Azure Key Vault integration
- Kubernetes (6 examples) - K8s secrets and ConfigMaps
- CI/CD Integration (5 examples) - GitHub Actions, Jenkins workflows
- Python Integration (5 examples) - SDK usage patterns
Training Procedure
Training Hyperparameters
- Base Model: meta-llama/Llama-3.2-3B-Instruct
- LoRA Rank: 16
- LoRA Alpha: 32
- Target Modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
- Learning Rate: 2e-4
- Batch Size: 1 (with gradient accumulation)
- Epochs: 2-3
- Training regime: fp16 mixed precision with 4-bit quantization
How to Get Started with the Model
# Install requirements
pip install torch transformers peft
# Load and use the model
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
base_model = AutoModelForCausalLM.from_pretrained(
"meta-llama/Llama-3.2-3B-Instruct",
torch_dtype=torch.float16,
device_map="auto"
)
model = PeftModel.from_pretrained(base_model, "anysecret-io/anysecret-assistant")
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-3B-Instruct")
def ask_anysecret(question):
prompt = f"### Instruction:\n{question}\n\n### Response:\n"
inputs = tokenizer(prompt, return_tensors="pt").to(device)
with torch.no_grad():
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.1)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
return response.split("### Response:\n")[-1].strip()
# Example usage
print(ask_anysecret("How do I set a secret using anysecret CLI?"))
Environmental Impact
- Hardware Type: NVIDIA RTX 3090 / A6000
- Hours used: ~2-4 hours per training run
- Training Framework: PyTorch with PEFT and BitsAndBytes
- Quantization: 4-bit NF4 for memory efficiency
Technical Specifications
Model Architecture and Objective
- Architecture: Llama-3.2 with LoRA adapters
- Objective: Causal language modeling for instruction following
- LoRA Configuration: Rank 16, Alpha 32, targeting attention and MLP layers
- Quantization: 4-bit NF4 with double quantization
Compute Infrastructure
Hardware
- NVIDIA RTX 3090 (24GB VRAM) for 3B models
- NVIDIA A6000 (48GB VRAM) for 13B models
Software
- PyTorch 2.0+
- Transformers 4.35+
- PEFT 0.6+
- BitsAndBytes 0.41+
Framework versions
- PEFT 0.17.1
- Transformers 4.35.0
- PyTorch 2.0.0
- BitsAndBytes 0.41.0