CAI-20B: Marketing Strategy Expert

A fine-tuned version of OpenAI's GPT-OSS-20B model specialized for marketing strategy, performance marketing, and business growth advice.

Model Details

Model Description

CAI-20B is a 20-billion parameter language model fine-tuned on high-quality marketing strategy conversations. It excels at providing actionable marketing advice, campaign strategies, budget allocation recommendations, and growth tactics for businesses of all sizes.

  • Developed by: tigres2526
  • Model type: Causal Language Model (Fine-tuned)
  • Language(s): English
  • License: Apache 2.0
  • Finetuned from: openai/gpt-oss-20b

Model Performance

Overall Benchmark Score: 79.5%

Category Performance:

  • 🎯 Performance Marketing: 100%
  • 🏆 Brand Positioning: 100%
  • 📊 Data & Analytics: 94%
  • 📱 Channel Expertise: 79%
  • 🧠 Customer Psychology: 64%
  • 📝 Content Strategy: 64%
  • 📈 Strategic Planning: 56%

Uses

Direct Use

This model is designed for:

  • Marketing strategy consultation
  • Campaign planning and optimization
  • Budget allocation recommendations
  • Channel selection and optimization
  • Customer acquisition strategies
  • Brand positioning advice
  • Content marketing strategies
  • Performance marketing optimization

Recommended Use Cases

  1. Marketing Teams: Get instant strategic advice for campaigns
  2. Startups: Receive guidance on initial marketing strategies
  3. Consultants: Augment expertise with data-driven insights
  4. Educators: Teaching marketing concepts with practical examples

Out-of-Scope Use

This model should NOT be used for:

  • Medical, legal, or financial advice
  • Generating misleading or deceptive content
  • Making final business decisions without human review
  • Personal data processing or storage

Bias, Risks, and Limitations

Known Limitations

  1. Response Artifacts: ~25% of responses may contain minor formatting artifacts that require cleanup
  2. Context Length: Optimal performance with inputs under 2048 tokens
  3. Strategic Planning: Weaker performance on complex multi-year strategic planning (56% accuracy)
  4. Knowledge Cutoff: Training data extends only to 2024-06

Recommendations

  • Always review outputs for accuracy and relevance
  • Use the provided cleanup wrapper for production deployments
  • Implement response validation for critical use cases
  • Monitor response quality and collect user feedback

How to Get Started with the Model

🎯 Recommended: Install Production Utils

pip install cai-20b-utils
from cai_20b_utils import CAI20B

# Initialize model with automatic cleanup
model = CAI20B("tigres2526/CAI-20B")

# Generate clean response (artifacts automatically removed)
response = model.generate("How should I allocate a $10K marketing budget?")
print(response)

Quick One-Liner

from cai_20b_utils import quick_generate

response = quick_generate("What are the best marketing channels for B2B?")

Manual Installation (Without Utils Package)

pip install transformers torch accelerate
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
import re

# Load model
model = AutoModelForCausalLM.from_pretrained(
    "tigres2526/CAI-20B",
    device_map="auto",
    torch_dtype=torch.bfloat16,
    trust_remote_code=True
)

tokenizer = AutoTokenizer.from_pretrained(
    "tigres2526/CAI-20B",
    trust_remote_code=True
)

# IMPORTANT: Response Cleaner (Required for Production)
class ResponseCleaner:
    def __init__(self):
        self.artifact_patterns = [
            r'<\|[^>]+\|>',  # Special tokens
            r'assistantfinal',
            r'assistant\s*final',
            r'We need to.*?(?=\n|$)',
            r'Let me.*?(?=\n|$)',
            r'I need to.*?(?=\n|$)',
            r'According to guidelines.*?(?=\n|$)',
            r'The prompt asks.*?(?=\n|$)',
            r'\\n\\n\\n+',  # Multiple newlines
        ]
    
    def clean_response(self, text):
        cleaned = text
        for pattern in self.artifact_patterns:
            cleaned = re.sub(pattern, '', cleaned, flags=re.IGNORECASE)
        
        # Clean whitespace
        cleaned = re.sub(r'\s+', ' ', cleaned).strip()
        
        # Fix endings
        if cleaned and cleaned[-1] not in '.!?':
            last_sentence = cleaned.split('.')[-1].strip()
            if len(last_sentence) < 20:
                parts = cleaned.rsplit('.', 1)
                if len(parts) > 1:
                    cleaned = parts[0] + '.'
            else:
                cleaned += '.'
        
        return cleaned

# Generate with cleanup
def get_marketing_advice(question):
    prompt = f"""You are a marketing strategy expert. Provide actionable advice.
CRITICAL: Output ONLY the final answer. No internal reasoning.

User: {question}
Assistant:"""
    
    inputs = tokenizer(prompt, return_tensors="pt", truncation=True, max_length=2048)
    
    with torch.no_grad():
        outputs = model.generate(
            **inputs,
            max_new_tokens=250,
            temperature=0.7,
            top_p=0.9,
            repetition_penalty=1.1,
            no_repeat_ngram_size=3,
            do_sample=True,
            pad_token_id=tokenizer.pad_token_id
        )
    
    raw_response = tokenizer.decode(outputs[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True)
    
    # IMPORTANT: Clean the response
    cleaner = ResponseCleaner()
    clean_response = cleaner.clean_response(raw_response)
    
    return clean_response

# Example usage
advice = get_marketing_advice("How should I spend $10K on marketing for my SaaS startup?")
print(advice)

⚠️ Important Production Notes

  1. Always use cleanup: ~25% of responses contain artifacts that need cleaning
  2. Recommended settings: temperature=0.7, repetition_penalty=1.1, no_repeat_ngram_size=3
  3. Use the utils package: pip install cai-20b-utils for automatic cleanup and retries
  4. Monitor responses: Some outputs may still need manual review

Training Details

Training Data

The model was fine-tuned on:

  • 1,000+ curated marketing strategy conversations
  • 100+ real-world marketing scenarios
  • 50+ preference optimization pairs
  • Topics covering all major marketing domains

Training Procedure

Training Hyperparameters

  • Training regime: QLoRA with 4-bit quantization
  • LoRA Rank: 32
  • LoRA Alpha: 64
  • Learning Rate: 1e-5 (SFT), 5e-6 (DPO)
  • Batch Size: 4
  • Epochs: 4 (SFT) + 2 (DPO)
  • Optimizer: Paged AdamW 32-bit

Hardware

  • GPU: NVIDIA H100 80GB
  • Training Time: ~18 hours total
  • Framework: PyTorch 2.0 with Transformers 4.40+

Evaluation

Testing Methodology

Evaluated on 200+ marketing strategy questions across 7 categories:

  • Performance Marketing
  • Brand Positioning
  • Strategic Planning
  • Content Strategy
  • Customer Psychology
  • Data & Analytics
  • Channel Expertise

Metrics

  • Overall Accuracy: 79.5%
  • Response Coherence: 85%
  • Actionability: 82%
  • Technical Accuracy: 88%

Environmental Impact

  • Hardware Type: NVIDIA H100
  • Hours used: ~18
  • Carbon Emitted: Estimated 2.7 kg CO2eq

Technical Specifications

Model Architecture

  • Base Model: GPT-OSS-20B
  • Parameters: 20 billion
  • Context Length: 128K (optimal: 2-4K)
  • Vocabulary Size: 200K (o200k_harmony tokenizer)

Compute Infrastructure

  • Single H100 80GB GPU
  • Ubuntu 22.04
  • CUDA 12.1
  • PyTorch 2.0

Citation

If you use this model, please cite:

@misc{cai20b2025,
  title={CAI-20B: Marketing Strategy Expert},
  author={tigres2526},
  year={2025},
  publisher={Hugging Face},
  howpublished={\url{https://huggingface.co/tigres2526/CAI-20B}}
}

Model Card Authors

tigres2526

Model Card Contact

Please open an issue on the Hugging Face repository for questions or feedback.

Disclaimer

This model is provided "as is" without warranties. Users should validate outputs for their specific use cases. Not intended to replace professional marketing consultants.

Downloads last month
160
Safetensors
Model size
20.9B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for tigres2526/CAI-20B

Base model

openai/gpt-oss-20b
Finetuned
(193)
this model
Quantizations
1 model