CAI-1-32B: Marketing AI with Tool-Calling
A fine-tuned version of Qwen3-32B specialized for marketing tasks with native tool-calling capabilities.
(This model is a prototype and not designed for user interaction its meant to serve as an Neural RAG the first of it's kind via a MCP server)
Model Overview
CAI-1-32B is a 32B parameter model fine-tuned for marketing expertise with native tool-calling capabilities.
Training Details
- Base Model: Qwen3-32B
- Fine-tuning Method: QLoRA (4-bit quantization + LoRA adapters)
- Training Hardware: H200 GPU (143GB VRAM)
- Training Duration: 7 hours
- Training Data:
- Batch 1: Marketing knowledge and strategies
- Batch 2: 3,000 examples (33.1% with tool-calling)
- Tool Functions: 7 marketing-specific tools including:
optimize_email_sequence(215 examples)generate_sales_copy(183 examples)analyze_creative_performance(134 examples)- And more...
Performance
- Evaluation Loss: 0.222 (57.5% reduction from baseline)
- Generalization: Excellent (no overfitting detected)
- Grade: A+ (98.1/100 in comprehensive evaluation)
Optimal Usage
1. For Tool-Calling
Temperature: Use 0.1-0.3 for consistent JSON formatting
# Example prompt that triggers tool usage
prompt = "Can you optimize our email sequence for better conversions?"
# Generation settings
generation_config = {
"temperature": 0.3, # Low for tool consistency
"max_new_tokens": 500,
"do_sample": True,
"top_p": 0.9
}
Trigger Words that activate tool usage:
- "optimize" (4.3% of tool examples)
- "analyze" (5.3% of tool examples)
- "automate" (1.8% of tool examples)
- "campaign", "segment", "personalize"
Expected Response Pattern:
Assistant: I'll optimize email sequence for conversions to provide detailed insights.
{
"tool_calls": [{
"id": "call_xxx",
"type": "function",
"function": {
"name": "optimize_email_sequence",
"arguments": "{...}"
}
}]
}
[Detailed marketing strategy follows...]
2. For Marketing Expertise
Temperature: Use 0.5-0.7 for creative marketing content
# Example for marketing strategy
prompt = "What's the best strategy to increase customer retention for a SaaS product?"
generation_config = {
"temperature": 0.7, # Higher for creativity
"max_new_tokens": 800,
"do_sample": True,
"top_p": 0.9
}
Key Insights
Tool-Calling Pattern: The model ALWAYS explains what it's doing before calling a tool ("I'll [action] to provide detailed insights")
Marketing Domain: Specialized in:
- Email marketing optimization
- Sales copy generation
- Creative performance analysis
- A/B testing frameworks
- Statistical significance calculations
Best Practices:
- Use action-oriented prompts for tool activation
- Lower temperature (0.1-0.3) for tool JSON consistency
- Higher temperature (0.5-0.7) for creative marketing content
- Include marketing context in system prompts
Example Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# Load model
model = AutoModelForCausalLM.from_pretrained(
"tigres2526/CAI-1-32B",
device_map="auto",
torch_dtype=torch.bfloat16,
load_in_4bit=True # Optional: for memory efficiency
)
tokenizer = AutoTokenizer.from_pretrained("tigres2526/CAI-1-32B")
# Tool-calling example
messages = [
{"role": "system", "content": "You are a marketing AI with access to optimization tools."},
{"role": "user", "content": "Analyze our email campaign performance and suggest improvements"}
]
# Apply chat template
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt")
# Generate with low temperature for tools
outputs = model.generate(
**inputs,
max_new_tokens=500,
temperature=0.3,
do_sample=True,
top_p=0.9
)
response = tokenizer.decode(outputs[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True)
print(response)
Troubleshooting
Issue: Model doesn't output tool calls
- Solution: Use trigger words + lower temperature (0.1-0.3)
- Check: Ensure prompts contain action verbs (optimize, analyze, etc.)
Issue: Inconsistent JSON formatting
- Solution: Set temperature to 0.1 or use greedy decoding (do_sample=False)
Issue: Generic responses instead of marketing expertise
- Solution: Include marketing context in system prompt
- Example: "You are a senior marketing strategist with 20 years of experience..."
Training Details
- Learning Rate: 1e-5
- Batch Size: 16 (effective)
- LoRA Config: r=64, alpha=256
- Gradient Checkpointing: Enabled
- Dynamic Padding: Enabled
License
Same as Qwen2.5-32B base model.
Citation
If you use this model, please cite:
@misc{cai1-32b,
title={CAI-1-32B: Marketing AI with Tool-Calling},
author={tigres2526},
year={2024}
}
- Downloads last month
- 10