Instructions to use khazarai/Averroes-R1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use khazarai/Averroes-R1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="khazarai/Averroes-R1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("khazarai/Averroes-R1") model = AutoModelForCausalLM.from_pretrained("khazarai/Averroes-R1") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use khazarai/Averroes-R1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "khazarai/Averroes-R1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "khazarai/Averroes-R1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/khazarai/Averroes-R1
- SGLang
How to use khazarai/Averroes-R1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "khazarai/Averroes-R1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "khazarai/Averroes-R1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "khazarai/Averroes-R1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "khazarai/Averroes-R1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use khazarai/Averroes-R1 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 khazarai/Averroes-R1 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 khazarai/Averroes-R1 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for khazarai/Averroes-R1 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="khazarai/Averroes-R1", max_seq_length=2048, ) - Docker Model Runner
How to use khazarai/Averroes-R1 with Docker Model Runner:
docker model run hf.co/khazarai/Averroes-R1
Model Card for Averroes-R1
Model Details
Model Description
- Base Model: Qwen3-1.7B
- Language(s) (NLP): English
- License: MIT
- Task: Foundational Philosophical Reasoning with Chain-of-Thought (CoT)
- Model Type: Instruction-tuned model emphasizing logical and conceptual reasoning in philosophy
- Dataset: moremilk/CoT_Philosophical_Understanding
Uses
Direct Use
The model is designed for:
- Educational use in teaching and learning philosophy
- Supporting AI assistants and chatbots focused on structured reasoning and conceptual understanding
- Serving as a tool for structured philosophical explanation
- Enhancing automated reasoning systems in conceptual and abstract domains
It is not intended to replace human philosophical analysis or provide moral/personal advice.
Out of Scope
This model is not designed for:
- In-depth exploration of specialized or niche philosophical debates
- Providing personal philosophical advice or opinions
- Real-time discussion or analysis of ongoing philosophical issues
- Handling highly subjective or interpretive arguments lacking foundational grounding
Bias, Risks, and Limitations
- May simplify nuanced philosophical perspectives
- Not suitable for advanced research or subjective debate
- Outputs depend on prompt clarity; ambiguous inputs may yield incomplete reasoning
- Trained for foundational reasoning, not for exhaustive domain knowledge
How to Get Started with the Model
Use the code below to get started with the model.
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("khazarai/Averroes-R1")
model = AutoModelForCausalLM.from_pretrained(
"khazarai/Averroes-R1",
device_map={"": 0}
)
question = """
What is the existentialist dilemma of freedom, and how do concepts like responsibility, anguish, and bad faith relate to it, according to Sartre?
"""
messages = [
{"role" : "user", "content" : question}
]
text = tokenizer.apply_chat_template(
messages,
tokenize = False,
add_generation_prompt = True,
enable_thinking = True,
)
from transformers import TextStreamer
_ = model.generate(
**tokenizer(text, return_tensors = "pt").to("cuda"),
max_new_tokens = 2200,
temperature = 0.6,
top_p = 0.95,
top_k = 20,
streamer = TextStreamer(tokenizer, skip_prompt = True),
)
Training Data
Scope
This model was fine-tuned on tasks emphasizing foundational philosophical reasoning, focusing on:
Understanding key philosophical concepts across major branches (ethics, epistemology, metaphysics, logic, etc.)
Explaining philosophical principles through clear examples and structured reasoning
Highlighting the logical and conceptual steps behind philosophical inquiry
Building a strong foundational understanding of philosophical thought
Illustrative Examples
Explaining the difference between empiricism and rationalism
Describing the reasoning behind the categorical imperative
Analyzing simple logical fallacies within philosophical arguments
Emphasis on Chain-of-Thought (CoT)
The dataset explicitly teaches step-by-step reasoning, allowing the model to show intermediate thoughts when analyzing or explaining philosophical ideas.
Focus on Foundational Knowledge
Rather than diving into complex, specialized debates, the dataset helps build a broad, structured foundation for philosophical reasoning.
- Downloads last month
- 31
