Instructions to use kedarcv/Clair-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use kedarcv/Clair-3B with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="kedarcv/Clair-3B", filename="gguf/clair-v5-Q3_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use kedarcv/Clair-3B with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf kedarcv/Clair-3B:Q4_K_M # Run inference directly in the terminal: llama cli -hf kedarcv/Clair-3B:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf kedarcv/Clair-3B:Q4_K_M # Run inference directly in the terminal: llama cli -hf kedarcv/Clair-3B:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf kedarcv/Clair-3B:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf kedarcv/Clair-3B:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf kedarcv/Clair-3B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf kedarcv/Clair-3B:Q4_K_M
Use Docker
docker model run hf.co/kedarcv/Clair-3B:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use kedarcv/Clair-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kedarcv/Clair-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kedarcv/Clair-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kedarcv/Clair-3B:Q4_K_M
- Ollama
How to use kedarcv/Clair-3B with Ollama:
ollama run hf.co/kedarcv/Clair-3B:Q4_K_M
- Unsloth Studio
How to use kedarcv/Clair-3B with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for kedarcv/Clair-3B to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for kedarcv/Clair-3B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for kedarcv/Clair-3B to start chatting
- Atomic Chat new
- Docker Model Runner
How to use kedarcv/Clair-3B with Docker Model Runner:
docker model run hf.co/kedarcv/Clair-3B:Q4_K_M
- Lemonade
How to use kedarcv/Clair-3B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull kedarcv/Clair-3B:Q4_K_M
Run and chat with the model
lemonade run user.Clair-3B-Q4_K_M
List all available models
lemonade list
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf kedarcv/Clair-3B:# Run inference directly in the terminal:
llama cli -hf kedarcv/Clair-3B:Use pre-built binary
# Download pre-built binary from:
# https://github.com/ggerganov/llama.cpp/releases# Start a local OpenAI-compatible server with a web UI:
./llama-server -hf kedarcv/Clair-3B:# Run inference directly in the terminal:
./llama-cli -hf kedarcv/Clair-3B:Build from source code
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-server llama-cli# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama-server -hf kedarcv/Clair-3B:# Run inference directly in the terminal:
./build/bin/llama-cli -hf kedarcv/Clair-3B:Use Docker
docker model run hf.co/kedarcv/Clair-3B:Clair-3B
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
Installation
Prerequisites
- Ollama installed on your system
- At least 6 GB of available RAM (8 GB recommended)
- Internet connection for initial download
Quick Install
ollama pull r245142r/Clair-3B
Manual Installation
If you prefer to use a local GGUF file:
- Download the model file (5.75 GB)
- Create a
Modelfile:
FROM ./clair-v4-float16.gguf
SYSTEM """You are Clair, a helpful and friendly AI assistant created by Michael Mlungisi Nkomo from Zimbabwe."""
PARAMETER temperature 0.7
PARAMETER top_p 0.9
PARAMETER top_k 40
PARAMETER num_predict 512
PARAMETER repeat_penalty 1.1
PARAMETER stop "\n\n"
PARAMETER stop "User:"
PARAMETER stop "Human:"
PARAMETER stop "<|im_end|>"
PARAMETER num_ctx 4096
PARAMETER 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
curl http://localhost:11434/api/generate -d '{
"model": "r245142r/Clair-3B",
"prompt": "What is your name and who made you?"
}'
Chat API
curl http://localhost:11434/api/chat -d '{
"model": "r245142r/Clair-3B",
"messages": [
{
"role": "user",
"content": "Tell me about yourself"
}
]
}'
Python Integration
import ollama
response = ollama.chat(
model='r245142r/Clair-3B',
messages=[
{
'role': 'user',
'content': 'What is your name and who made you?'
}
]
)
print(response['message']['content'])
JavaScript/Node.js Integration
import ollama from 'ollama';
const response = await ollama.chat({
model: 'r245142r/Clair-3B',
messages: [
{
role: 'user',
content: 'What is your name and who made you?'
}
]
});
console.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:
PARAMETER temperature 0.5
PARAMETER 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_ctxparameter 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
# Re-pull the model
ollama 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
Model Not Responding Correctly
- Try a fresh conversation
- Clear Ollama cache:
ollama rm r245142r/Clair-3B ollama pull r245142r/Clair-3B
Technical Details
Model Architecture
Clair-3B is built on a transformer architecture with:
- 3 billion parameters
- Optimized for conversational AI
- Fine-tuned for personality embedding
Training Data
The model was trained on a diverse dataset including:
- Conversational data
- Technical documentation
- Code examples
- General knowledge
- Personality-specific examples
Quantization Options
While this release uses F16 (full precision), quantized versions are available:
| Format | Size | Quality | Speed |
|---|---|---|---|
| F16 | 5.75 GB | Best | Baseline |
| Q5_K_M | ~2.1 GB | Excellent | Faster |
| Q4_K_M | ~1.8 GB | Very Good | Fastest |
| Q3_K_M | ~1.5 GB | Good | Fastest |
License and Usage
This model is provided for research and personal use. Please respect the creator's work and use responsibly.
Credits
Created by: Michael Mlungisi Nkomo
Location: Zimbabwe
Project: Clair AI Assistant
Support and Community
For issues, questions, or contributions:
- GitHub: zim-my repository
- Issues: Report bugs or request features on GitHub
Changelog
Version 4 (Current)
- ✅ Personality embedded in model weights
- ✅ Works without system prompts
- ✅ Improved identity consistency
- ✅ Better creator attribution
- ✅ F16 GGUF format for Ollama
Version 3
- Initial LoRA-based implementation
- Required system prompts for personality
- Multiple quantization options
Citation
If you use Clair-3B in your research or projects, please cite:
@misc{clair3b2026,
author = {Michael Mlungisi Nkomo},
title = {Clair-3B: An AI Assistant From Zimbabwe},
year = {2026},
publisher = {Ollama},
url = {https://ollama.com/r245142r/Clair-3B}
}
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.
- Downloads last month
- 258
Install (macOS, Linux)
# Start a local OpenAI-compatible server with a web UI: llama serve -hf kedarcv/Clair-3B:# Run inference directly in the terminal: llama cli -hf kedarcv/Clair-3B: