Team Ai
Modelpublic

prithivMLmods/Open-Xi-Math-Preview

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes31downloads
README.md112 linesDownload Raw Back to root
1---2license: apache-2.03datasets:4- simplescaling/aime24_figures5- amphora/QwQ-LongCoT-130K6- HuggingFaceH4/MATH-5007- RyotaKadoya1993/math-5000-nemotron-v28language:9- en10base_model:11- Qwen/Qwen2-1.5B-Instruct12pipeline_tag: text-generation13library_name: transformers14tags:15- text-generation-inference16- thinker17- math18---19 20![aaa.png](https://cdn-uploads.huggingface.co/production/uploads/65bb837dbfb878f46c77de4c/RFgIBf5f3bpPiO1g7-pLc.png)21 22# **Open-Xi-Math-Preview**23 24> **Open-Xi-Math-Preview** is a **mathematics-focused reasoning model** fine-tuned on **Qwen2-1.5B-Instruct**, utilizing a **modular dataset** designed for enhancing **mathematical thinking**. It provides robust capabilities in symbolic reasoning, structured deduction, and compact coding — optimized for edge deployment on **resource-constrained devices**.25 26## **Key Improvements**27 281. **Mathematical Reasoning via Modular Data**:29   Fine-tuned on diverse and structured math-focused datasets to handle problem-solving, symbolic computation, and multi-step derivations with efficiency on low-power devices.30 312. **Compact Coding & Math Assistant**:32   Understands multiple programming languages and math representations (e.g., LaTeX, symbolic algebra). Ideal for math-enhanced embedded coding and problem-solving environments.33 343. **Error Detection in Structured Data**:35   Accurately detects and corrects logical errors, malformed math expressions, and data structures (e.g., JSON, XML, LaTeX), all while maintaining low inference latency.36 374. **Instruction Following for Problem-Solving**:38   Enhanced with strong instruction-following performance, particularly for step-wise solutions in math word problems, logic puzzles, and equation derivations.39 405. **Extended Context Support**:41   Supports **128K token inputs** and **8K token outputs**, enabling it to work with long math chains-of-thought and proofs, while remaining lightweight enough for edge inference.42 43## **Quickstart with Transformers**44 45```python46from transformers import AutoModelForCausalLM, AutoTokenizer47 48model_name = "your-username/Open-Xi-Math-Preview"49 50model = AutoModelForCausalLM.from_pretrained(51    model_name,52    torch_dtype="auto",53    device_map="auto"54)55tokenizer = AutoTokenizer.from_pretrained(model_name)56 57prompt = "Solve the equation: 2x^2 - 4x - 6 = 0. Show all steps."58messages = [59    {"role": "system", "content": "You are a helpful and concise mathematical reasoning assistant."},60    {"role": "user", "content": prompt}61]62text = tokenizer.apply_chat_template(63    messages,64    tokenize=False,65    add_generation_prompt=True66)67model_inputs = tokenizer([text], return_tensors="pt").to(model.device)68 69generated_ids = model.generate(70    **model_inputs,71    max_new_tokens=51272)73generated_ids = [74    output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)75]76 77response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]78```79 80## **Intended Use**81 821. **Math-Centric Edge Applications**:83   Designed for embedded AI systems in calculators, educational tools, and mobile math tutoring.84 852. **Advanced Math Reasoning**:86   Effective for solving algebra, geometry, calculus, and competition math problems using logical derivation.87 883. **Educational & Instructional Aids**:89   Useful for step-by-step teaching in math-heavy domains like STEM education, coding classes, and robotics kits.90 914. **Low-Latency Math Agents**:92   Deployable in customer support bots, interactive kiosks, and STEM-based IoT systems for fast math-based interactions.93 945. **Structured Output Generation**:95   Generates LaTeX, JSON, or tabular formats for math answers and reasoning in structured pipelines.96 97## **Limitations**98 991. **Edge Hardware Still Required**:100   Though lightweight, best used with devices equipped with NPUs, GPUs, or optimized ML accelerators.101 1022. **No Internet or Real-Time Info**:103   Static knowledge cutoff; cannot retrieve or interact with live external data sources.104 1053. **Not Suited for Creative Tasks**:106   Focused on deterministic reasoning — not built for abstract, poetic, or generative creative writing.107 1084. **Prompt Sensitivity**:109   Clear, structured prompts yield more accurate reasoning; ambiguous questions may degrade output quality.110 1115. **Potential Dataset Biases**:112   Model may carry forward biases or inconsistencies present in the training datasets; vet outputs in critical settings.