Persona-based Conversational AI with Emotion, Reasoning & Tool Capabilities
ci (pronounced "see") is a persona-based conversational AI model developed by ClokAI. It combines advanced language modeling with specialized modules for emotion recognition, persona consistency, tool usage, and multi-step reasoning.
This is the base version of the ci model family.
| Feature | Description |
|---|---|
| 🎭 Emotion Understanding | Recognizes 12 emotional states and responds appropriately |
| 🧠 Persona Consistency | Maintains stable personality across conversations |
| 🔧 Tool Usage | Identifies when external tools are needed |
| 💭 Multi-step Reasoning | Processes complex queries through reasoning steps |
- Transformer-based with Grouped Query Attention (GQA)
- Mixture of Experts (MoE) for efficient computation
- KAN Layers for adaptive function approximation
- SNN Layers for spike-based processing
- SwiGLU activation for better performance
| Specification | Value |
|---|---|
| Model Name | ci-base |
| Model Type | ci (custom) |
| Parameters | ~350M |
| Hidden Size | 1024 |
| Layers | 16 |
| Attention Heads | 16 |
| KV Heads | 8 |
| Context Length | 512 tokens |
| Vocabulary Size | 32,000 |
| Precision | FP16 |
# Install ClokAI library
pip install clokai
# install all dependencies
pip install torch transformers safetensorsfrom clokai import AutoClokAI
# Load model and tokenizer
model = AutoClokAI.from_pretrained("ClokAI/ci-base")
tokenizer = AutoClokAI.load_tokenizer("ClokAI/ci-base")
# Generate response
prompt = "<s> User: Hello! How are you? Assistant:"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))from clokai import AutoClokAI
import torch
# Load with specific settings
model = AutoClokAI.from_pretrained(
"ClokAI/ci-base",
torch_dtype=torch.float16,
device_map="auto"
)
tokenizer = AutoClokAI.load_tokenizer("ClokAI/ci-base")
# Chat with parameters
def chat(message, temperature=0.7, max_tokens=200):
formatted = f"<s> User: {message} Assistant:"
inputs = tokenizer(formatted, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=max_tokens,
temperature=temperature,
top_p=0.9,
do_sample=True
)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
# Test
print(chat("What is machine learning?"))The emotion module recognizes 12 different emotional states:
| Emotion | Description |
|---|---|
| Joy | Happiness, excitement |
| Sadness | Sorrow, disappointment |
| Anger | Frustration, irritation |
| Fear | Anxiety, worry |
| Surprise | Astonishment, amazement |
| Disgust | Revulsion, aversion |
| Trust | Confidence, reliance |
| Anticipation | Expectation, hope |
| Love | Affection, care |
| Hope | Optimism, aspiration |
| Confusion | Uncertainty, puzzlement |
| Calm | Serenity, peace |
Maintains consistent personality traits across conversations. The model adopts a stable persona while adapting responses to context.
Supports 8 tool types for augmented capabilities:
| Tool Type | Use Case |
|---|---|
| search | Web/database search |
| calculate | Mathematical computations |
| translate | Language translation |
| summarize | Text summarization |
| code | Code generation/execution |
| file_op | File operations |
| api_call | External API calls |
| database | Database queries |
Multi-step reasoning for complex queries:
- Step 1: Initial analysis
- Step 2: Deep processing
- Step 3: Final synthesis
| Parameter | Value |
|---|---|
| Current Step | 74,000 |
| Target Steps | 100,000 |
| Effective Batch Size | 32 |
| Learning Rate | 3e-4 |
| Warmup Steps | 1,000 |
| Dataset Size | ~500K samples |
| Resource | Link |
|---|---|
| Model Weights | ClokAI/ci-base |
| ClokAI Library | PyPI |
| Organization | ClokAI |
@misc{clokai2024ci,
title={ci: A Persona-based Conversational AI Model},
author={ClokAI Team},
year={2024},
publisher={HuggingFace},
howpublished={\url{https://huggingface.co/clokai/ci-base}}
}Apache 2.0
Built with ❤️ by ClokAI