Instructions to use prithivMLmods/Omni-Reasoner-o1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/Omni-Reasoner-o1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="prithivMLmods/Omni-Reasoner-o1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("prithivMLmods/Omni-Reasoner-o1", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use prithivMLmods/Omni-Reasoner-o1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/Omni-Reasoner-o1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/Omni-Reasoner-o1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/prithivMLmods/Omni-Reasoner-o1
- SGLang
How to use prithivMLmods/Omni-Reasoner-o1 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 "prithivMLmods/Omni-Reasoner-o1" \ --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": "prithivMLmods/Omni-Reasoner-o1", "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 "prithivMLmods/Omni-Reasoner-o1" \ --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": "prithivMLmods/Omni-Reasoner-o1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use prithivMLmods/Omni-Reasoner-o1 with Docker Model Runner:
docker model run hf.co/prithivMLmods/Omni-Reasoner-o1
Omni-Reasoner-o1: Overview
Omni-Reasoner-o1 is a specialized AI model built upon the Sky T1 32B architecture, combined with Qwen 2.5 32B, and fine-tuned using synthetic data from OpenAI pipeline-generated records. It is optimized for mathematical reasoning and complex problem-solving.
Quickstart with Transformers
Here provides a code snippet with apply_chat_template to show you how to load the tokenizer and model and how to generate contents.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "prithivMLmods/Omni-Reasoner-o1"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "How many r in strawberry."
messages = [
{"role": "system", "content": "You are a helpful and harmless assistant. You are Qwen developed by Alibaba. You should think step-by-step."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=512
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
Key Features
Hybrid Architecture:
- Combines Sky T1 32B and Qwen 2.5 32B to leverage strengths in both natural language understanding and mathematical reasoning.
- Enables robust problem-solving across diverse domains.
Mathematical Expertise:
- Trained specifically as a mathematical reasoner and problem solver.
- Excels in numerical computations, symbolic mathematics, proofs, and equation-solving.
Synthetic Data Fine-Tuning:
- Leveraged high-quality synthetic data generated by OpenAI pipelines.
- Ensures enhanced generalization across a wide range of problem-solving scenarios.
Natural Language Processing (NLP):
- Capable of understanding and interpreting complex language inputs related to mathematical queries.
- Provides step-by-step explanations for solutions, fostering user understanding.
Multi-Task Capability:
- Handles a variety of mathematical tasks including algebra, calculus, combinatorics, and statistics.
- Suitable for word problems and domain-specific queries requiring logic and reasoning.
Scalability:
- Designed for seamless integration into educational platforms, scientific research tools, and automated reasoning systems.
Intended Use
Educational Applications:
- Acts as a tutor for students in mathematics and related fields.
- Provides explanations, step-by-step solutions, and practice problem generation.
Scientific Research:
- Aids researchers in automating repetitive mathematical calculations or exploring new problem-solving methodologies.
Professional Use Cases:
- Supports professionals in domains like engineering, data science, and finance by solving domain-specific mathematical problems.
AI-Assisted Development:
- Assists in coding environments for algorithm development and debugging by identifying mathematical bottlenecks or issues.
Automated Systems:
- Integrates into automated reasoning and decision-making systems for operations requiring quantitative analysis.
Limitations
Reliance on Synthetic Data:
- Despite its extensive training, reliance on synthetic data might lead to biases or overfitting in specific scenarios.
- May struggle with real-world edge cases not reflected in its training data.
Domain-Specific Gaps:
- While excelling in mathematics, it may not perform as well in non-mathematical or interdisciplinary problem-solving tasks.
Resource Intensive:
- Due to its hybrid 32B architecture, deploying the model requires significant computational resources.
Interpretation Errors:
- Misinterprets poorly structured or ambiguous natural language queries.
- May provide overly verbose explanations that aren't always user-friendly.
Limitations in Creativity:
- Not designed for creative or abstract tasks outside mathematical reasoning, such as writing, art, or subjective decision-making.
Dependency on Prompt Quality:
- Performance can degrade with unclear, poorly framed, or overly complex prompts
- Downloads last month
- 8
Model tree for prithivMLmods/Omni-Reasoner-o1
Base model
Qwen/Qwen2.5-32B