Text Generation
Transformers
Safetensors
English
mixtral
mathematics
reasoning
algebra
arithmetic
geometry
calculus
statistics
number-theory
ai
adaption-labs
autoscientist
lora
education
stem
conversational
text-generation-inference
Instructions to use Charley890/AdaptiveMath with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Charley890/AdaptiveMath with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Charley890/AdaptiveMath") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Charley890/AdaptiveMath") model = AutoModelForCausalLM.from_pretrained("Charley890/AdaptiveMath", device_map="auto") 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 Settings
- vLLM
How to use Charley890/AdaptiveMath with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Charley890/AdaptiveMath" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Charley890/AdaptiveMath", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Charley890/AdaptiveMath
- SGLang
How to use Charley890/AdaptiveMath 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 "Charley890/AdaptiveMath" \ --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": "Charley890/AdaptiveMath", "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 "Charley890/AdaptiveMath" \ --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": "Charley890/AdaptiveMath", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Charley890/AdaptiveMath with Docker Model Runner:
docker model run hf.co/Charley890/AdaptiveMath
| license: apache-2.0 | |
| base_model: mistralai/Mixtral-8x7B-Instruct-v0.1 | |
| library_name: transformers | |
| pipeline_tag: text-generation | |
| tags: | |
| - mathematics | |
| - reasoning | |
| - algebra | |
| - arithmetic | |
| - geometry | |
| - calculus | |
| - statistics | |
| - number-theory | |
| - ai | |
| - adaption-labs | |
| - autoscientist | |
| - lora | |
| - education | |
| - stem | |
| language: | |
| - en | |
| metrics: | |
| - Grade | |
| - Overall Win Rate | |
| - Math Win Rate | |
| - Percentile | |
|  | |
| # Adaptive Math — Mixtral-8x7B | |
| > A PEFT (LoRA) fine-tuned **Mixtral-8x7B-Instruct-v0.1** model specialized for mathematical reasoning, arithmetic, algebra, geometry, statistics and logical problem solving using the **Adaption Labs AutoScientist** workflow. | |
| --- | |
| # Overview | |
| Adaptive Math is a domain-adapted language model developed for mathematical reasoning and instruction following. | |
| The model was fine-tuned using the **Adaption Labs AutoScientist** workflow on a mathematics reasoning dataset containing thousands of mathematical instruction-completion pairs. | |
| Unlike a general language model, this model focuses on structured mathematical reasoning, symbolic manipulation and logical step-by-step solutions. | |
| --- | |
| # Quick Facts | |
| | Item | Value | | |
| |------|-------| | |
| | Domain | Mathematics | | |
| | Task | Mathematical Reasoning | | |
| | Base Model | Mixtral-8x7B-Instruct-v0.1 | | |
| | Fine-tuning Method | PEFT (LoRA) | | |
| | Training Framework | Adaption Labs AutoScientist | | |
| | Dataset | adaption-single-integer-samples | | |
| | Language | English | | |
| | License | Apache-2.0 | | |
| --- | |
| # Training Dataset | |
| Dataset Repository | |
| https://huggingface.co/datasets/Charley890/adaption-single-integer-samples | |
| The training dataset contains mathematical reasoning examples covering: | |
| - Arithmetic | |
| - Algebra | |
| - Number Theory | |
| - Geometry | |
| - Statistics | |
| - Logical Reasoning | |
| - Symbolic Mathematics | |
| - Mathematical Word Problems | |
| --- | |
| # Key Features | |
| - Mathematical Question Answering | |
| - Step-by-Step Reasoning | |
| - Arithmetic Computation | |
| - Algebraic Manipulation | |
| - Geometry Reasoning | |
| - Number Theory | |
| - Statistics | |
| - Symbolic Reasoning | |
| - STEM Education | |
| - AI Tutoring | |
| --- | |
| # Base Model | |
| | Property | Value | | |
| |-----------|-------| | |
| | Base Model | Mixtral-8x7B-Instruct-v0.1 | | |
| | Fine-tuning | PEFT (LoRA) | | |
| | Framework | Adaption Labs AutoScientist | | |
| | Language | English | | |
| --- | |
|  | |
| # Evaluation Results | |
| Evaluation performed using **Adaption Labs AutoScientist** | |
| | Metric | Base Model | Adapted Model | Improvement | | |
| |--------|-----------:|--------------:|------------:| | |
| | Grade | E | A | Excellent | | |
| | Overall Win Rate | 19 | 81 | +62 | | |
| | Math Win Rate | 38 | 63 | +25 | | |
| | Percentile | 0.0 | 57.7 | +57.7 | | |
| | Relative Improvement | — | — | 82% | | |
| --- | |
| # Performance Summary | |
| ``` | |
| ✓ Training Completed Successfully | |
| ✓ Stable Optimization | |
| ✓ Mathematical Reasoning Improved | |
| ✓ Grade Improved from E → A | |
| ✓ Overall Win Rate Improved from 19 → 81 | |
| ✓ Math Win Rate Improved from 38 → 63 | |
| ✓ Percentile Improved from 0.0 → 57.7 | |
| ✓ Relative Quality Improvement: 82% | |
| ``` | |
|  | |
| --- | |
| # Mathematical Knowledge | |
| This model is optimized to solve a broad range of mathematical problems through logical reasoning instead of memorization. | |
| It performs best when explaining every intermediate step before arriving at the final answer. | |
| --- | |
| ## Supported Topics | |
| | Category | Examples | | |
| |-----------|----------| | |
| | Arithmetic | Addition, Subtraction, Multiplication, Division | | |
| | Algebra | Linear Equations, Quadratic Equations, Polynomial Factorization | | |
| | Statistics | Mean, Median, Mode, Variance, Standard Deviation,etc.| | |
| ## Fundamental Mathematical Formulae | |
| | Formula | Equation | | |
| |---------|----------| | |
| | Quadratic Formula | $x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$ | | |
| | Pythagorean Theorem | $a^2+b^2=c^2$ | | |
| | Slope Formula | $m=\frac{y_2-y_1}{x_2-x_1}$,etc. | | |
| --- | |
| # Example Usage | |
| ## Example 1 | |
| **Input** | |
| ```text | |
| Solve: | |
| 2x+7=19 | |
| ``` | |
| **Output** | |
| ```text | |
| Subtract 7 from both sides. | |
| 2x=12 | |
| Divide both sides by 2. | |
| x=6 | |
| ``` | |
| --- | |
| ## Example 2 | |
| **Input** | |
| ```text | |
| Find the derivative of | |
| f(x)=x²+5x+2 | |
| ``` | |
| **Output** | |
| ```text | |
| Using the power rule, | |
| f'(x)=2x+5 | |
| ``` | |
| --- | |
| ## Example 3 | |
| **Input** | |
| ```text | |
| Find the area of a circle with radius 7. | |
| ``` | |
| **Output** | |
| ```text | |
| A=\pi r^2 | |
| A=49\pi | |
| ≈153.94 | |
| y | |
| 10 | ● | |
| 9 | ● | |
| 8 | ● | |
| 7 | ● | |
| 6 | ● | |
| 5 | ● | |
| 4 | ● | |
| 3 | ● | |
| +--------------------------------→ x | |
| 1 2 3 4 5 6 7 8 | |
| ``` | |
| --- | |
| ```text | |
| Frequency | |
| 10 | █ | |
| 9 | █ | |
| 8 | █ █ | |
| 7 | █ █ | |
| 6 | █ █ █ | |
| 5 | █ █ █ █ | |
| 4 | █ █ █ █ | |
| 3 | █ █ █ █ █ | |
| 2 | █ █ █ █ █ | |
| 1 | █ █ █ █ █ | |
| +---------------------------- | |
| A B C D E | |
| ``` | |
| --- | |
| # Inference with Transformers | |
| ```python | |
| from transformers import AutoTokenizer | |
| from transformers import AutoModelForCausalLM | |
| model_name = "Charlie890/Adaptive-Math-Reasoner-Mixtral-8x7B" | |
| tokenizer = AutoTokenizer.from_pretrained(model_name) | |
| model = AutoModelForCausalLM.from_pretrained(model_name) | |
| prompt = "Solve: 3x + 5 = 20" | |
| inputs = tokenizer(prompt, return_tensors="pt") | |
| outputs = model.generate( | |
| **inputs, | |
| max_new_tokens=256 | |
| ) | |
| print(tokenizer.decode(outputs[0], skip_special_tokens=True)) | |
| ``` | |
| --- | |
| # Applications | |
| This model is designed for a wide variety of mathematical and scientific applications. | |
| - AI Tutors | |
| - STEM Education | |
| - Mathematics Chatbots | |
| - Scientific Computing | |
| - Homework Assistance | |
| - Research | |
| - Educational Software and more. | |
| --- | |
| # Limitations | |
| Although highly capable, the model has several limitations. | |
| - May occasionally make arithmetic mistakes on extremely long calculations. | |
| - Complex symbolic manipulations should always be verified. | |
| - Does not replace professional Computer Algebra Systems (CAS) such as Mathematica or Maple. | |
| - Performance depends heavily on prompt quality. | |
| - Mathematical proofs may require human verification. | |
| - May hallucinate unsupported mathematical identities if prompted incorrectly. | |
| - Numerical approximations can accumulate rounding errors. | |
| - High-stakes scientific applications should always be independently validated. | |
| - Performance may decrease on very large expressions or lengthy derivations. | |
| --- | |
| # Future Improvements | |
| Future releases may include: | |
| - Better symbolic reasoning | |
| - Olympiad-level mathematics | |
| - Interactive tutoring | |
| - Diagram understanding | |
| - Mathematical OCR support | |
| - Scientific equation solving and more. | |
| --- | |
| # Acknowledgements | |
| Special thanks to: | |
| - Adaption Labs | |
| - Mixtral Team | |
| - Hugging Face and Kaggle | |
| - Transformers Community | |
| - Open-source AI Community | |
| - Mathematical research contributors | |
| --- | |
| # Citation | |
| If you use this model in your research, please cite: | |
| ```bibtex | |
| @misc{adaptive_math_reasoner, | |
| title = {Adaptive Math Reasoner}, | |
| author = {Edidiong Charlie}, | |
| year = {2026}, | |
| publisher = {Hugging Face}, | |
| model = {Mixtral-8x7B-Instruct}, | |
| framework = {Adaption Labs + AutoScientist}, | |
| license = {Apache-2.0}, | |
| url = {https://huggingface.co/Charlie890/Adaptive-Math-Reasoner-Mixtral-8x7B} | |
| } | |
| ``` | |
| --- | |
| # License | |
| This project is released under the **Apache License 2.0**. | |
| You are free to: | |
| - ✅ Use commercially | |
| - ✅ Modify | |
| - ✅ Distribute | |
| - ✅ Private use | |
| - ✅ Research | |
| - ✅ Education | |
| Subject to the terms and conditions of the Apache License 2.0. | |
| --- | |
| # Performance Goals | |
| The model is optimized to: | |
| - Produce step-by-step mathematical reasoning. | |
| - Solve algebraic equations accurately. | |
| - Handle advanced calculus problems. | |
| - Solve geometry and trigonometry questions. | |
| - Perform statistical computations. | |
| - Explain mathematical concepts clearly. | |
| - Generate clean LaTeX mathematical expressions. | |
| - Assist students, educators, engineers, and researchers. | |
| --- | |
| # Example Prompt Ideas | |
| ```text | |
| Solve: | |
| 3x² + 7x - 10 = 0 | |
| ``` | |
| ```text | |
| Differentiate: | |
| f(x)=sin(x)e^x | |
| ``` | |
| ```text | |
| Integrate: | |
| ∫x²cos(x)dx | |
| ``` | |
| ```text | |
| Find the determinant of | |
| |2 4| | |
| |1 5| | |
| ``` | |
| ```text | |
| Prove the Binomial Theorem. | |
| ``` | |
| ```text | |
| Explain Bayes' Theorem with a practical example. | |
| ``` | |
| ```text | |
| Find the eigenvalues of the matrix: | |
| [[4,2], | |
| [1,3]] | |
| ``` | |
| --- | |
| # Mission | |
| The goal of **Adaptive Math Reasoner** is to provide accurate, explainable, and accessible mathematical reasoning powered by modern Large Language Models. | |
| The project aims to make advanced mathematics easier to learn, explore, and apply across education, engineering, science, finance, and research. | |
| --- | |
| ## Version | |
| **Version:** 1.0.0 | |
| **Base Model:** Mixtral-8x7B-Instruct | |
| **Framework:** Transformers | |
| **License:** Apache-2.0 | |
| **Primary Domain:** Mathematical Reasoning | |
| **Author:** Edidiong Charlie | |
| --- | |
| # Thank You | |
| Thank you for using **Adaptive Math Reasoner**. | |
| We hope this model helps students, educators, researchers, developers, engineers, and the open-source community solve mathematical problems more effectively. | |
| Happy building with AI and Mathematics! 🚀 | |