Clair-3B is a highly capable 3-billion parameter language model designed for advanced conversational AI, coding assistance, and complex reasoning tasks.
Model Details
Model Name: Clair-3B
Parameters: 3 billion
Architecture: Transformer-based language model
Context Window: 4,096 tokens
Format: GGUF (F16)
Size: 5.75 GB
Key Features
Clair-3B delivers exceptional performance across a wide range of tasks:
It possesses significantly enhanced knowledge and has greatly improved capabilities in coding and mathematics, due to specialized training in these domains.
It demonstrates significant advancements in instruction following, long-text generation, understanding structured data (e.g., tables, JSON), and generating structured outputs, especially in JSON format. It is also highly resilient to diverse system prompts, improving role-play and condition-setting for chatbots.
It supports long contexts of up to 4,096 tokens and can generate coherent, high-quality responses.
It offers multilingual support for over 29 languages, including English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic, and more.
Core Capabilities
Natural Conversation: Engaging and contextually aware dialogue
Code Assistance: Code generation, explanation, debugging, and optimization
Mathematical Reasoning: Complex problem solving and step-by-step explanations
Text Generation: Creative writing, summarization, and content creation
Multilingual Support: Fluent in 29+ languages
Instruction Following: Precise adherence to complex instructions and constraints
Structured Data: Understanding and generating JSON, tables, and structured formats
1FROM ./clair-v4-float16.gguf23SYSTEM """You are Clair, a helpful and friendly AI assistant created by Michael Mlungisi Nkomo from Zimbabwe."""
45PARAMETER temperature 0.7
6PARAMETER top_p 0.9
7PARAMETER top_k 40
8PARAMETER num_predict 512
9PARAMETER repeat_penalty 1.1
10PARAMETER stop "\n\n"
11PARAMETER stop "User:"
12PARAMETER stop "Human:"
13PARAMETER stop "<|im_end|>"
14PARAMETER num_ctx 4096
15PARAMETER num_gpu -1
Create the model:
ollama create clair -f Modelfile
Usage
Interactive Chat
ollama run r245142r/Clair-3B
Then start chatting:
>>> Can you help me with Python?
Of course! I'd be happy to help you with Python. What would you like to work on?
>>> Explain recursion with an example
Recursion is when a function calls itself to solve a problem. Here's a simple factorial example...
>>> Write a function to calculate fibonacci numbers
Here's an efficient fibonacci function using dynamic programming...
API Usage
REST API
bash
1curl http://localhost:11434/api/generate -d '{
2 "model": "r245142r/Clair-3B",
3 "prompt": "What is your name and who made you?"
4}'
1import ollama
23response = ollama.chat(4 model='r245142r/Clair-3B',5 messages=[6{7'role':'user',8'content':'What is your name and who made you?'9}10]11)1213print(response['message']['content'])
JavaScript/Node.js Integration
javascript
1importollamafrom'ollama';23const response =await ollama.chat({4model:'r245142r/Clair-3B',5messages:[6{7role:'user',8content:'What is your name and who made you?'9}10]11});1213console.log(response.message.content);
Model Parameters
Parameter
Value
Description
temperature
0.7
Controls randomness (0.0-1.0)
top_p
0.9
Nucleus sampling threshold
top_k
40
Limits token selection
num_predict
512
Maximum tokens to generate
repeat_penalty
1.1
Penalizes repetitive text
num_ctx
4096
Context window size
num_gpu
-1
GPU layers (-1 = all)
Customizing Parameters
You can override default parameters when running:
ollama run r245142r/Clair-3B --temperature 0.5 --num-predict 1024
Or in your Modelfile:
dockerfile
1PARAMETER temperature 0.5
2PARAMETER num_predict 1024
Context Window
Clair supports a 4,096 token context window, which is approximately:
3,000 words of English text
10-15 pages of a typical document
50-100 lines of code
For longer conversations, consider:
Summarizing previous context
Starting a new conversation
Using the num_ctx parameter to increase context (requires more RAM)
Performance
Hardware Requirements
Configuration
RAM
GPU
Performance
Minimum
6 GB
None
CPU-only, slower
Recommended
8 GB
4+ GB VRAM
GPU-accelerated
Optimal
16 GB
8+ GB VRAM
Fast inference
Speed Benchmarks
On typical hardware:
CPU-only: 5-15 tokens/second
GPU-accelerated: 30-60 tokens/second
Prompting Best Practices
For Best Results
Be specific and clear in your requests
Provide context when asking complex questions
Use examples to clarify your intent
Break down complex tasks into smaller steps
Example Prompts
Good:
Can you explain how recursion works in Python with a simple example?
Better:
I'm learning Python and struggling with recursion. Can you explain it with a factorial function example and walk me through how it works step by step?
System Prompts (Optional)
Clair-3B works excellently without system prompts, but you can use them to customize behavior for specific use cases:
ollama run r245142r/Clair-3B --system "You are a helpful coding tutor specializing in Python."
Or for different roles:
ollama run r245142r/Clair-3B --system "You are a mathematics professor explaining concepts to students."
Troubleshooting
Model Not Found
bash
1# Re-pull the model2ollama pull r245142r/Clair-3B
Out of Memory
If you get OOM errors:
Close other applications
Reduce context window:
ollama run r245142r/Clair-3B --num-ctx 2048
Use CPU-only mode:
ollama run r245142r/Clair-3B --num-gpu 0
Slow Performance
Ensure GPU acceleration is enabled
Close other GPU-intensive applications
Consider using a quantized version (Q4_K_M or Q5_K_M) for faster inference
If you use Clair-3B in your research or projects, please cite:
bibtex
1@misc{clair3b2026,
2 author = {Michael Mlungisi Nkomo},
3 title = {Clair-3B: An AI Assistant From Zimbabwe},
4 year = {2026},
5 publisher = {Ollama},
6 url = {https://ollama.com/r245142r/Clair-3B}
7}
Note: This model represents a novel approach to AI personality embedding through weight-level training rather than prompt engineering. The personality and identity are intrinsic to the model, not added through external prompts.