Downloads · 30 days
29
6% of all-time downloads
Keak-AI/keak-CRO-llama-3.1-8B-instruct
keak-CRO-llama-3.1-8B-instruct is a text generation model from Keak-AI. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as llama3.1.
A LoRA-fine-tuned variant of Meta’s Llama 3.1 8B Instruct, optimized for Conversion Rate Optimization (CRO) and A/B testing automation. Developed by Keak AI, this model generates high-converting website copy, structur…
Downloads · 30 days
29
6% of all-time downloads
All-time downloads
495
Public
Repo size
24 MB
Likes
11
Public
Click a slice to open those files.
.json17.3 MB · 72%
From the Hugging Face model README
A LoRA-fine-tuned variant of Meta’s Llama 3.1 8B Instruct, optimized for Conversion Rate Optimization (CRO) and A/B testing automation.
Developed by Keak AI, this model generates high-converting website copy, structured business insights, and persuasive content that aligns with CRO best practices.
Base Model: meta-llama/Meta-Llama-3.1-8B-Instruct
Adapter Type: LoRA (Low-Rank Adaptation) via PEFT
Trained By: Keak AI
Specialization: Conversion rate optimization, persuasive copywriting, and structured web analysis
This model enhances Llama 3.1’s reasoning and language generation with CRO-specific knowledge, enabling it to:
The model is designed for:
It performs best when used in two steps:
(1) Analyze context → (2) Generate optimized variant.
Fine-tuned on Keak AI’s proprietary A/B testing dataset, containing real conversion experiments and human-evaluated high-performing variants.
This dataset reflects diverse industries (e-commerce, SaaS, marketing) and is continuously updated for improvement.
You are an expert conversion rate optimization specialist with deep expertise in persuasive copywriting, consumer psychology, and A/B testing. Your singular goal is to generate variations that maximize conversion rates.
The model expects input in this structured schema:
Business: [Organization name and type]
Core Offering: [Primary service/product in 1–2 sentences]
Value Proposition: [Main benefit/outcome for customers]
Target Audience: [Who this is for]
Primary Pain Point: [Problem being solved]
Key Differentiators:
* [Unique selling point 1]
* [Unique selling point 2]
* [Unique selling point 3]
Conversion Goal: [Primary CTA/desired action]
Trust Signals: [Credentials, certifications, guarantees]
Location/Context: [Geographic area served, if relevant]
Visual Identity:
* Primary colors: [List main colors with hex codes if identifiable]
* Accent colors: [List accent colors with hex codes if identifiable]
* Overall tone: [Professional, Playful, Serious, Warm, etc.]
* Style: [Minimalist, Bold, Corporate, Creative, etc.]
Prompt:
Analyze the following webpage and extract both business context and visual identity.
URL: [https://example.com](https://example.com)
Dominant colors: #000000, #3e3b41, #0d0e11, #294a85, #181c28
WEBPAGE CONTENT:
TITLE: Example Company
META: Description of the business...
H1: Main headline
H2: Subheadings...
P: Paragraph content...
Output strictly in the structured Page Context format.
Prompt:
Generate a high-converting variation for A/B testing.
# Page Context
Business: Keak, a SaaS company specializing in AI-powered website optimization
Core Offering: AI-driven A/B testing and CRO automation platform
...
# Current Element
Type: headline
Selector: #hero-headline
Current text: "Boost your website's conversion rates with AI-powered testing"
# Optimization Requirements
Length: ±20% of original
Tone: Keep brand voice
CRO Principles: Clarity, Curiosity, Urgency, Benefits
# Output Format
Variation: [new variant]
Justification: [2–3 sentences on why it improves conversions]
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
import torch
# Model identifiers
base = "meta-llama/Meta-Llama-3.1-8B-Instruct" # Base Llama 3.1 8B model
adapter = "Keak-AI/keak-CRO-llama-3.1-8B-instruct" # Fine-tuned adapter for conversion rate optimization
# Configure 4-bit quantization (same as training)
bnb_config = BitsAndBytesConfig(
load_in_4bit=True, # Enable 4-bit quantization for memory efficiency
bnb_4bit_quant_type="nf4", # Use NormalFloat4 quantization type
bnb_4bit_compute_dtype=torch.bfloat16, # Computation dtype for better precision
bnb_4bit_use_double_quant=True, # Enable nested quantization for additional memory savings
)
# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained(base)
tokenizer.pad_token = tokenizer.eos_token # Set padding token to end-of-sequence token
tokenizer.padding_side = "right" # Pad sequences on the right side
# Load base model with quantization
model = AutoModelForCausalLM.from_pretrained(
base,
quantization_config=bnb_config, # Apply 4-bit quantization
device_map="auto", # Automatically distribute model across available devices
dtype=torch.bfloat16 # Use bfloat16 for model weights
)
# Load and merge the PEFT adapter on top of base model
model = PeftModel.from_pretrained(model, adapter)
# Generate function
def generate_variant(messages, max_new_tokens=256):
# Format messages using the model's chat template
formatted_input = tokenizer.apply_chat_template(
messages,
tokenize=False, # Return string instead of tokens
add_generation_prompt=True # Add prompt for model to start generation
)
# Tokenize the formatted input and move to model's device
inputs = tokenizer(formatted_input, return_tensors="pt").to(model.device)
# Generate response without computing gradients
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=max_new_tokens, # Maximum tokens to generate
temperature=0.7, # Sampling temperature (higher = more random)
do_sample=True, # Enable sampling instead of greedy decoding
top_p=0.9, # Nucleus sampling threshold
pad_token_id=tokenizer.pad_token_id, # Padding token ID
eos_token_id=tokenizer.eos_token_id, # End-of-sequence token ID
)
# Decode only the newly generated tokens (skip the input)
response = tokenizer.decode(
outputs[0][inputs.input_ids.shape[1]:], # Slice to get only generated tokens
skip_special_tokens=True # Remove special tokens from output
)
return response.strip() # Remove leading/trailing whitespace
# Example usage
messages = [
{"role": "system", "content": "You are an expert conversion rate optimization specialist..."},
{"role": "user", "content": "Generate a headline variation for..."}
]
result = generate_variant(messages)
print(result)
meta-llama/Meta-Llama-3.1-8B-InstructLoraConfig(
r=4,
lora_alpha=8,
target_modules=["q_proj", "v_proj"],
lora_dropout=0.1,
bias="none",
task_type="CAUSAL_LM",
)
| Setting | Value |
|---|---|
| Epochs | 3 |
| Learning Rate | 2e-5 |
| Batch Size | 1 (per GPU, eff. 8 with grad accum.) |
| Optimizer | paged_adamw_8bit |
| Scheduler | cosine, 10 % warmup |
| Weight Decay | 0.01 |
| Max Grad Norm | 0.3 |
| Seq Length | 2048 |
| Gradient Checkpointing | ✅ Enabled |
Released under the Llama 3.1 Community License Agreement. Use is permitted for commercial and research applications within the license terms. See Meta Llama 3.1 License for details.
@misc{keak2025cro,
title={Keak CRO LoRA — Llama 3.1 8B Instruct Fine-Tuned Adapter},
author={Keak AI},
year={2025},
publisher={Hugging Face},
howpublished={\url{https://huggingface.co/Keak-AI/keak-CRO-llama-3.1-8B-instruct}}
}
For questions or collaboration inquiries, contact Keak AI via https://huggingface.co/Keak-AI or open an issue in the model repository.